下单

状态变更操作必须防止重复提交。

预览订单

操作名

TradeApiService.PREVIEW_ORDER = preview_order。该常量用于设置 TigerRequest.ApiMethodName。

请求

TigerRequest<TigerDictResponse>

ModelValue: PlaceOrderModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangCLR 默认值;序列化时省略no—
Accountstring (nullable)accountnullAuto-filled if empty为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败
SecretKeystringsecret_keynullno—
OrderIdInt32order_idCLR 默认值;序列化时省略Optional—
SecTypeSecTypesec_typeCLR 默认值;序列化时省略Optional—
MarketMarketmarketCLR 默认值;序列化时省略OptionalEnum value
CurrencyCurrencycurrencyCLR 默认值;序列化时省略Optional—
SymbolstringsymbolnullRequired—
Rightstring (nullable)rightnullOptional—
Strikestring (nullable)strikenullOptional—
Expirystring (nullable)expirynullOptional—
ActionActionTypeactionCLR 默认值;序列化时省略Optional—
OrderTypeOrderTypeorder_typeCLR 默认值;序列化时省略Optionalprice fields are conditionally required by order type
TotalQuantityInt64 (nullable)total_quantitynullOptional—
TotalQuantityScaleInt32 (nullable)total_quantity_scalenullOptional—
LimitPriceDouble (nullable)limit_pricenullOptionalconditional order-price field
CashAmountDouble (nullable)cash_amountnullOptional—
AdjustLimitDoubleadjust_limitCLR 默认值;序列化时省略Optional—
AuxPriceDouble (nullable)aux_pricenullOptionalconditional order-price field
TrailingPercentDouble (nullable)trailing_percentnullOptionalconditional order-price field
TimeInForceTimeInForcetime_in_forceTimeInForce.DAYOptional—
ExpireTimelongexpire_timeCLR 默认值;序列化时省略Optional—
OutsideRthBooleanoutside_rthtrueOptional—
TradingSessionTypeTradeSessiontrading_session_typeCLR 默认值;序列化时省略Optional—
ExchangestringexchangenullOptional—
MultiplierdoublemultiplierCLR 默认值;序列化时省略Optional—
LocalSymbolstringlocal_symbolnullOptional—
AllocAccounts列表,元素为 stringalloc_accountsnullOptional—
AllocShares列表,元素为 Doublealloc_sharesnullOptional—
AlgoStrategystringalgo_strategynullOptional—
AlgoParams列表,元素为 TagValuealgo_paramsnullOptional—
DisplaySizeInt64 (nullable)display_sizenullOptional—
MinDisplaySizeInt64 (nullable)min_display_sizenullOptional—
CheckIntervalsInt64 (nullable)check_intervalsnullOptional—
PriceTypestring (nullable)price_typenullOptional—
StartTimeInt64 (nullable)start_timenullOptionalTimestamp or date format; maintain chronological order
EndTimeInt64 (nullable)end_timenullOptionalTimestamp or date format; maintain chronological order
UserMarkstringuser_marknullOptional—
AttachTypeAttachTypeattach_typeCLR 默认值;序列化时省略Optional—
ProfitTakerOrderIdInt32profit_taker_orderIdCLR 默认值;序列化时省略Optional—
ProfitTakerPriceDoubleprofit_taker_priceCLR 默认值;序列化时省略Optional—
ProfitTakerTifTimeInForceprofit_taker_tifCLR 默认值;序列化时省略Optional—
ProfitTakerRthBooleanprofit_taker_rthCLR 默认值;序列化时省略Optional—
StopLossOrderTypeOrderTypestop_loss_order_typeCLR 默认值;序列化时省略Optional—
StopLossOrderIdInt32stop_loss_orderIdCLR 默认值;序列化时省略Optional—
StopLossPriceDoublestop_loss_priceCLR 默认值;序列化时省略Optional—
StopLossLimitPriceDoublestop_loss_limit_priceCLR 默认值;序列化时省略Optional—
StopLossTifTimeInForcestop_loss_tifCLR 默认值;序列化时省略Optional—
StopLossTrailingPercentDoublestop_loss_trailing_percentCLR 默认值;序列化时省略Optional—
StopLossTrailingAmountDoublestop_loss_trailing_amountCLR 默认值;序列化时省略Optional—
ComboTypestringcombo_typenullOptional—

返回

TigerDictResponse inherits TigerResponse; its data property is Dictionary<string, object>.

示例

TigerRequest<TigerDictResponse> request = new()
{
    ApiMethodName = TradeApiService.PREVIEW_ORDER,
    ModelValue = new PlaceOrderModel { Account = tradeClient.GetDefaultAccount, OrderId = 12345, SecType = SecType.STK, Market = Market.US, Currency = Currency.USD }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);

响应类型

Dictionary<string, object>? data = response?.Data; // response 或 data 缺失时为 null

Data 字段

类型SDK 约定
Dictionary<string, object>动态字典;SDK 未定义固定键或嵌套对象类型。

下单

操作名

TradeApiService.PLACE_ORDER = place_order。该常量用于设置 TigerRequest.ApiMethodName。

请求

TigerRequest<PlaceOrderResponse>

ModelValue: PlaceOrderModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangCLR 默认值;序列化时省略no—
Accountstring (nullable)accountnullAuto-filled if empty为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败
SecretKeystringsecret_keynullno—
OrderIdInt32order_idCLR 默认值;序列化时省略Optional—
SecTypeSecTypesec_typeCLR 默认值;序列化时省略Optional—
MarketMarketmarketCLR 默认值;序列化时省略OptionalEnum value
CurrencyCurrencycurrencyCLR 默认值;序列化时省略Optional—
SymbolstringsymbolnullRequired—
Rightstring (nullable)rightnullOptional—
Strikestring (nullable)strikenullOptional—
Expirystring (nullable)expirynullOptional—
ActionActionTypeactionCLR 默认值;序列化时省略Optional—
OrderTypeOrderTypeorder_typeCLR 默认值;序列化时省略Optionalprice fields are conditionally required by order type
TotalQuantityInt64 (nullable)total_quantitynullOptional—
TotalQuantityScaleInt32 (nullable)total_quantity_scalenullOptional—
LimitPriceDouble (nullable)limit_pricenullOptionalconditional order-price field
CashAmountDouble (nullable)cash_amountnullOptional—
AdjustLimitDoubleadjust_limitCLR 默认值;序列化时省略Optional—
AuxPriceDouble (nullable)aux_pricenullOptionalconditional order-price field
TrailingPercentDouble (nullable)trailing_percentnullOptionalconditional order-price field
TimeInForceTimeInForcetime_in_forceTimeInForce.DAYOptional—
ExpireTimelongexpire_timeCLR 默认值;序列化时省略Optional—
OutsideRthBooleanoutside_rthtrueOptional—
TradingSessionTypeTradeSessiontrading_session_typeCLR 默认值;序列化时省略Optional—
ExchangestringexchangenullOptional—
MultiplierdoublemultiplierCLR 默认值;序列化时省略Optional—
LocalSymbolstringlocal_symbolnullOptional—
AllocAccounts列表,元素为 stringalloc_accountsnullOptional—
AllocShares列表,元素为 Doublealloc_sharesnullOptional—
AlgoStrategystringalgo_strategynullOptional—
AlgoParams列表,元素为 TagValuealgo_paramsnullOptional—
DisplaySizeInt64 (nullable)display_sizenullOptional—
MinDisplaySizeInt64 (nullable)min_display_sizenullOptional—
CheckIntervalsInt64 (nullable)check_intervalsnullOptional—
PriceTypestring (nullable)price_typenullOptional—
StartTimeInt64 (nullable)start_timenullOptionalTimestamp or date format; maintain chronological order
EndTimeInt64 (nullable)end_timenullOptionalTimestamp or date format; maintain chronological order
UserMarkstringuser_marknullOptional—
AttachTypeAttachTypeattach_typeCLR 默认值;序列化时省略Optional—
ProfitTakerOrderIdInt32profit_taker_orderIdCLR 默认值;序列化时省略Optional—
ProfitTakerPriceDoubleprofit_taker_priceCLR 默认值;序列化时省略Optional—
ProfitTakerTifTimeInForceprofit_taker_tifCLR 默认值;序列化时省略Optional—
ProfitTakerRthBooleanprofit_taker_rthCLR 默认值;序列化时省略Optional—
StopLossOrderTypeOrderTypestop_loss_order_typeCLR 默认值;序列化时省略Optional—
StopLossOrderIdInt32stop_loss_orderIdCLR 默认值;序列化时省略Optional—
StopLossPriceDoublestop_loss_priceCLR 默认值;序列化时省略Optional—
StopLossLimitPriceDoublestop_loss_limit_priceCLR 默认值;序列化时省略Optional—
StopLossTifTimeInForcestop_loss_tifCLR 默认值;序列化时省略Optional—
StopLossTrailingPercentDoublestop_loss_trailing_percentCLR 默认值;序列化时省略Optional—
StopLossTrailingAmountDoublestop_loss_trailing_amountCLR 默认值;序列化时省略Optional—
ComboTypestringcombo_typenullOptional—

返回

PlaceOrderResponse inherits TigerResponse; its data property is PlaceOrderItem.

示例

TigerRequest<PlaceOrderResponse> request = new()
{
    ApiMethodName = TradeApiService.PLACE_ORDER,
    ModelValue = new PlaceOrderModel { Account = tradeClient.GetDefaultAccount, OrderId = 12345, SecType = SecType.STK, Market = Market.US, Currency = Currency.USD }
};
PlaceOrderResponse? response = await tradeClient.ExecuteAsync(request);

响应类型

PlaceOrderItem? data = response?.Data; // response 或 data 缺失时为 null

Data 字段(PlaceOrderItem)

字段API 字段C# 类型说明
Ididlong已提交订单的内部标识
SubIdssubIdsList<Int64>子订单标识列表
OrdersordersList<TradeOrder>订单详情列表

Orders 中每个 TradeOrder 的完整字段见订单查询的 TradeOrder 字段。

返回示例

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": {
    "id": 123458,
    "orderId": 789014,
    "subIds": []
  }
}

频率限制

基础额度:每分钟 120 次。


Did this page help you?