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 property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
OrderId | Int32 | order_id | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | Optional | Enum value |
Currency | Currency | currency | None (omitted if not set) | Optional | — |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
Action | ActionType | action | None (omitted if not set) | Optional | — |
OrderType | OrderType | order_type | None (omitted if not set) | Optional | price fields are conditionally required by order type |
TotalQuantity | Int64 (nullable) | total_quantity | null | Optional | — |
TotalQuantityScale | Int32 (nullable) | total_quantity_scale | null | Optional | — |
LimitPrice | Double (nullable) | limit_price | null | Optional | conditional order-price field |
CashAmount | Double (nullable) | cash_amount | null | Optional | — |
AdjustLimit | Double | adjust_limit | None (omitted if not set) | Optional | — |
AuxPrice | Double (nullable) | aux_price | null | Optional | conditional order-price field |
TrailingPercent | Double (nullable) | trailing_percent | null | Optional | conditional order-price field |
TimeInForce | TimeInForce | time_in_force | TimeInForce.DAY | Optional | — |
ExpireTime | long | expire_time | None (omitted if not set) | Optional | — |
OutsideRth | Boolean | outside_rth | true | Optional | — |
TradingSessionType | TradeSession | trading_session_type | None (omitted if not set) | Optional | — |
Exchange | string | exchange | null | Optional | — |
Multiplier | double | multiplier | None (omitted if not set) | Optional | — |
LocalSymbol | string | local_symbol | null | Optional | — |
AllocAccounts | list of string | alloc_accounts | null | Optional | — |
AllocShares | list of Double | alloc_shares | null | Optional | — |
AlgoStrategy | string | algo_strategy | null | Optional | — |
AlgoParams | list of TagValue | algo_params | null | Optional | — |
DisplaySize | Int64 (nullable) | display_size | null | Optional | — |
MinDisplaySize | Int64 (nullable) | min_display_size | null | Optional | — |
CheckIntervals | Int64 (nullable) | check_intervals | null | Optional | — |
PriceType | string (nullable) | price_type | null | Optional | — |
StartTime | Int64 (nullable) | start_time | null | Optional | Timestamp or date format; maintain chronological order |
EndTime | Int64 (nullable) | end_time | null | Optional | Timestamp or date format; maintain chronological order |
UserMark | string | user_mark | null | Optional | — |
AttachType | AttachType | attach_type | None (omitted if not set) | Optional | — |
ProfitTakerOrderId | Int32 | profit_taker_orderId | None (omitted if not set) | Optional | — |
ProfitTakerPrice | Double | profit_taker_price | None (omitted if not set) | Optional | — |
ProfitTakerTif | TimeInForce | profit_taker_tif | None (omitted if not set) | Optional | — |
ProfitTakerRth | Boolean | profit_taker_rth | None (omitted if not set) | Optional | — |
StopLossOrderType | OrderType | stop_loss_order_type | None (omitted if not set) | Optional | — |
StopLossOrderId | Int32 | stop_loss_orderId | None (omitted if not set) | Optional | — |
StopLossPrice | Double | stop_loss_price | None (omitted if not set) | Optional | — |
StopLossLimitPrice | Double | stop_loss_limit_price | None (omitted if not set) | Optional | — |
StopLossTif | TimeInForce | stop_loss_tif | None (omitted if not set) | Optional | — |
StopLossTrailingPercent | Double | stop_loss_trailing_percent | None (omitted if not set) | Optional | — |
StopLossTrailingAmount | Double | stop_loss_trailing_amount | None (omitted if not set) | Optional | — |
ComboType | string | combo_type | null | Optional | — |
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 absentRelated 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 property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
OrderId | Int32 | order_id | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | Optional | Enum value |
Currency | Currency | currency | None (omitted if not set) | Optional | — |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
Action | ActionType | action | None (omitted if not set) | Optional | — |
OrderType | OrderType | order_type | None (omitted if not set) | Optional | price fields are conditionally required by order type |
TotalQuantity | Int64 (nullable) | total_quantity | null | Optional | — |
TotalQuantityScale | Int32 (nullable) | total_quantity_scale | null | Optional | — |
LimitPrice | Double (nullable) | limit_price | null | Optional | conditional order-price field |
CashAmount | Double (nullable) | cash_amount | null | Optional | — |
AdjustLimit | Double | adjust_limit | None (omitted if not set) | Optional | — |
AuxPrice | Double (nullable) | aux_price | null | Optional | conditional order-price field |
TrailingPercent | Double (nullable) | trailing_percent | null | Optional | conditional order-price field |
TimeInForce | TimeInForce | time_in_force | TimeInForce.DAY | Optional | — |
ExpireTime | long | expire_time | None (omitted if not set) | Optional | — |
OutsideRth | Boolean | outside_rth | true | Optional | — |
TradingSessionType | TradeSession | trading_session_type | None (omitted if not set) | Optional | — |
Exchange | string | exchange | null | Optional | — |
Multiplier | double | multiplier | None (omitted if not set) | Optional | — |
LocalSymbol | string | local_symbol | null | Optional | — |
AllocAccounts | list of string | alloc_accounts | null | Optional | — |
AllocShares | list of Double | alloc_shares | null | Optional | — |
AlgoStrategy | string | algo_strategy | null | Optional | — |
AlgoParams | list of TagValue | algo_params | null | Optional | — |
DisplaySize | Int64 (nullable) | display_size | null | Optional | — |
MinDisplaySize | Int64 (nullable) | min_display_size | null | Optional | — |
CheckIntervals | Int64 (nullable) | check_intervals | null | Optional | — |
PriceType | string (nullable) | price_type | null | Optional | — |
StartTime | Int64 (nullable) | start_time | null | Optional | Timestamp or date format; maintain chronological order |
EndTime | Int64 (nullable) | end_time | null | Optional | Timestamp or date format; maintain chronological order |
UserMark | string | user_mark | null | Optional | — |
AttachType | AttachType | attach_type | None (omitted if not set) | Optional | — |
ProfitTakerOrderId | Int32 | profit_taker_orderId | None (omitted if not set) | Optional | — |
ProfitTakerPrice | Double | profit_taker_price | None (omitted if not set) | Optional | — |
ProfitTakerTif | TimeInForce | profit_taker_tif | None (omitted if not set) | Optional | — |
ProfitTakerRth | Boolean | profit_taker_rth | None (omitted if not set) | Optional | — |
StopLossOrderType | OrderType | stop_loss_order_type | None (omitted if not set) | Optional | — |
StopLossOrderId | Int32 | stop_loss_orderId | None (omitted if not set) | Optional | — |
StopLossPrice | Double | stop_loss_price | None (omitted if not set) | Optional | — |
StopLossLimitPrice | Double | stop_loss_limit_price | None (omitted if not set) | Optional | — |
StopLossTif | TimeInForce | stop_loss_tif | None (omitted if not set) | Optional | — |
StopLossTrailingPercent | Double | stop_loss_trailing_percent | None (omitted if not set) | Optional | — |
StopLossTrailingAmount | Double | stop_loss_trailing_amount | None (omitted if not set) | Optional | — |
ComboType | string | combo_type | null | Optional | — |
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 absentResponse Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 123458,
"orderId": 789014,
"subIds": []
}
}Related APIs
Updated 1 day ago
Did this page help you?
