Get Contracts

State-changing operations must prevent duplicate submission.

Get Contract

Operation

TradeApiService.CONTRACT = contract. Uses server method contract.

Request

TigerRequest<ContractResponse>

ModelValue: ContractModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
SecTypestringsec_typeTigerOpenAPI.Common.Enum.SecType.STK.ToString()Optional
CurrencystringcurrencynullOptional
RightstringrightnullOptional
StrikeDoublestrikeNone (omitted if not set)Optional
ExpirystringexpirynullOptional
ExchangestringexchangenullOptional
SymbolstringsymbolnullRequired

Return

ContractResponse inherits TigerResponse; its data property is ContractItem. Key SDK fields: ContractId: Int32, Identifier: string, Symbol: string, SecType: string, Expiry: string, ContractMonth: string, Strike: Double, Right: string.

Example

TigerRequest<ContractResponse> request = new()
{
    ApiMethodName = TradeApiService.CONTRACT,
    ModelValue = new ContractModel { Account = tradeClient.GetDefaultAccount, SecType = "STK", Currency = "USD", Strike = 200.0, Symbol = "AAPL" }
};
ContractResponse? response = await tradeClient.ExecuteAsync(request);

Response type

ContractItem? data = response?.Data; // null when response or data is absent

Response Example

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": [
    {
      "symbol": "AAPL",
      "secType": "STK",
      "exchange": "SMART",
      "market": "US",
      "lotSize": 1,
      "currency": "USD",
      "name": "Apple Inc"
    }
  ]
}

Related APIs

See Requests, responses, and operations.

Get Contracts

Operation

TradeApiService.CONTRACTS = contracts. Uses server method contracts.

Request

TigerRequest<ContractsResponse>

ModelValue: ContractsModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
SecTypestringsec_typeTigerOpenAPI.Common.Enum.SecType.STK.ToString()Optional
CurrencystringcurrencynullOptional
RightstringrightnullOptional
StrikeDoublestrikeNone (omitted if not set)Optional
ExpirystringexpirynullOptional
ExchangestringexchangenullOptional
Symbolslist of stringsymbolsnullRequiredNon-empty list

Return

ContractsResponse inherits TigerResponse; its data property is dictionary from string to list of ContractItem. Key SDK fields: dynamic fields.

Example

TigerRequest<ContractsResponse> request = new()
{
    ApiMethodName = TradeApiService.CONTRACTS,
    ModelValue = new ContractsModel { Account = tradeClient.GetDefaultAccount, SecType = "STK", Currency = "USD", Strike = 200.0, Symbols = new List<string> { "AAPL" } }
};
ContractsResponse? response = await tradeClient.ExecuteAsync(request);

Response type

Dictionary<string, List<ContractItem>>? data = response?.Data; // null when response or data is absent

Related APIs

See Requests, responses, and operations.


Did this page help you?