Place Orders

State-changing operations must prevent duplicate submission.

Preview Order

Operation

TradeApiService.PREVIEW_ORDER = preview_order. Uses server method preview_order.

Request

TigerRequest<TigerDictResponse>

ModelValue: PlaceOrderModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
OrderIdInt32order_idNone (omitted if not set)Optional
SecTypeSecTypesec_typeNone (omitted if not set)Optional
MarketMarketmarketNone (omitted if not set)OptionalEnum value
CurrencyCurrencycurrencyNone (omitted if not set)Optional
SymbolstringsymbolnullRequired
Rightstring (nullable)rightnullOptional
Strikestring (nullable)strikenullOptional
Expirystring (nullable)expirynullOptional
ActionActionTypeactionNone (omitted if not set)Optional
OrderTypeOrderTypeorder_typeNone (omitted if not set)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_limitNone (omitted if not set)Optional
AuxPriceDouble (nullable)aux_pricenullOptionalconditional order-price field
TrailingPercentDouble (nullable)trailing_percentnullOptionalconditional order-price field
TimeInForceTimeInForcetime_in_forceTimeInForce.DAYOptional
ExpireTimelongexpire_timeNone (omitted if not set)Optional
OutsideRthBooleanoutside_rthtrueOptional
TradingSessionTypeTradeSessiontrading_session_typeNone (omitted if not set)Optional
ExchangestringexchangenullOptional
MultiplierdoublemultiplierNone (omitted if not set)Optional
LocalSymbolstringlocal_symbolnullOptional
AllocAccountslist of stringalloc_accountsnullOptional
AllocShareslist of Doublealloc_sharesnullOptional
AlgoStrategystringalgo_strategynullOptional
AlgoParamslist of 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_typeNone (omitted if not set)Optional
ProfitTakerOrderIdInt32profit_taker_orderIdNone (omitted if not set)Optional
ProfitTakerPriceDoubleprofit_taker_priceNone (omitted if not set)Optional
ProfitTakerTifTimeInForceprofit_taker_tifNone (omitted if not set)Optional
ProfitTakerRthBooleanprofit_taker_rthNone (omitted if not set)Optional
StopLossOrderTypeOrderTypestop_loss_order_typeNone (omitted if not set)Optional
StopLossOrderIdInt32stop_loss_orderIdNone (omitted if not set)Optional
StopLossPriceDoublestop_loss_priceNone (omitted if not set)Optional
StopLossLimitPriceDoublestop_loss_limit_priceNone (omitted if not set)Optional
StopLossTifTimeInForcestop_loss_tifNone (omitted if not set)Optional
StopLossTrailingPercentDoublestop_loss_trailing_percentNone (omitted if not set)Optional
StopLossTrailingAmountDoublestop_loss_trailing_amountNone (omitted if not set)Optional
ComboTypestringcombo_typenullOptional

Return

TigerDictResponse inherits TigerResponse; its data property is dictionary from string to object. Key SDK fields: dynamic fields.

Example

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,
        Symbol = "YOUR_SYMBOL",
        Action = ActionType.BUY,
        OrderType = OrderType.LMT,
        TotalQuantity = 1,
        LimitPrice = 0.01
    }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);

Response type

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

Related APIs

See Requests, responses, and operations.

Place Order

Operation

TradeApiService.PLACE_ORDER = place_order. Uses server method place_order.

Request

TigerRequest<PlaceOrderResponse>

ModelValue: PlaceOrderModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
OrderIdInt32order_idNone (omitted if not set)Optional
SecTypeSecTypesec_typeNone (omitted if not set)Optional
MarketMarketmarketNone (omitted if not set)OptionalEnum value
CurrencyCurrencycurrencyNone (omitted if not set)Optional
SymbolstringsymbolnullRequired
Rightstring (nullable)rightnullOptional
Strikestring (nullable)strikenullOptional
Expirystring (nullable)expirynullOptional
ActionActionTypeactionNone (omitted if not set)Optional
OrderTypeOrderTypeorder_typeNone (omitted if not set)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_limitNone (omitted if not set)Optional
AuxPriceDouble (nullable)aux_pricenullOptionalconditional order-price field
TrailingPercentDouble (nullable)trailing_percentnullOptionalconditional order-price field
TimeInForceTimeInForcetime_in_forceTimeInForce.DAYOptional
ExpireTimelongexpire_timeNone (omitted if not set)Optional
OutsideRthBooleanoutside_rthtrueOptional
TradingSessionTypeTradeSessiontrading_session_typeNone (omitted if not set)Optional
ExchangestringexchangenullOptional
MultiplierdoublemultiplierNone (omitted if not set)Optional
LocalSymbolstringlocal_symbolnullOptional
AllocAccountslist of stringalloc_accountsnullOptional
AllocShareslist of Doublealloc_sharesnullOptional
AlgoStrategystringalgo_strategynullOptional
AlgoParamslist of 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_typeNone (omitted if not set)Optional
ProfitTakerOrderIdInt32profit_taker_orderIdNone (omitted if not set)Optional
ProfitTakerPriceDoubleprofit_taker_priceNone (omitted if not set)Optional
ProfitTakerTifTimeInForceprofit_taker_tifNone (omitted if not set)Optional
ProfitTakerRthBooleanprofit_taker_rthNone (omitted if not set)Optional
StopLossOrderTypeOrderTypestop_loss_order_typeNone (omitted if not set)Optional
StopLossOrderIdInt32stop_loss_orderIdNone (omitted if not set)Optional
StopLossPriceDoublestop_loss_priceNone (omitted if not set)Optional
StopLossLimitPriceDoublestop_loss_limit_priceNone (omitted if not set)Optional
StopLossTifTimeInForcestop_loss_tifNone (omitted if not set)Optional
StopLossTrailingPercentDoublestop_loss_trailing_percentNone (omitted if not set)Optional
StopLossTrailingAmountDoublestop_loss_trailing_amountNone (omitted if not set)Optional
ComboTypestringcombo_typenullOptional

Return

PlaceOrderResponse inherits TigerResponse; its data property is PlaceOrderItem. Key SDK fields: Id: long, SubIds: list of Int64, Orders: list of TradeOrder.

Example

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,
        Symbol = "YOUR_SYMBOL",
        Action = ActionType.BUY,
        OrderType = OrderType.LMT,
        TotalQuantity = 1,
        LimitPrice = 0.01
    }
};
// This submits a real order. Replace every placeholder, review the request, then call:
// PlaceOrderResponse? response = await tradeClient.ExecuteAsync(request);

Response type

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

Response Example

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

Related APIs

See Requests, responses, and operations.


Did this page help you?