Modify and Cancel Orders
State-changing operations must prevent duplicate submission.
Modify Order
Operation
TradeApiService.MODIFY_ORDER = modify_order. Uses server method modify_order.
Request
TigerRequest<TigerDictResponse>ModelValue: ModifyOrderModel.
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 | — |
Id | long | id | None (omitted if not set) | Required | — |
OrderType | OrderType (nullable) | order_type | null | 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 |
AuxPrice | Double (nullable) | aux_price | null | Optional | conditional order-price field |
TrailingPercent | Double (nullable) | trailing_percent | null | Optional | conditional order-price field |
CashAmount | Double (nullable) | cash_amount | null | Optional | — |
DisplaySize | Int64 (nullable) | display_size | null | Optional | — |
MinDisplaySize | Int64 (nullable) | min_display_size | null | Optional | — |
PriceType | string (nullable) | price_type | null | Optional | — |
CheckIntervals | Int64 (nullable) | check_intervals | 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 |
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.MODIFY_ORDER,
ModelValue = new ModifyOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L, OrderType = OrderType.LMT, TotalQuantity = 1, LimitPrice = 200.0 }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);Response type
Dictionary<string, object>? data = response?.Data; // null when response or data is absentResponse Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 123456,
"orderId": 789012
}
}Related APIs
See Requests, responses, and operations.
Cancel Order
Operation
TradeApiService.CANCEL_ORDER = cancel_order. Uses server method cancel_order.
Request
TigerRequest<TigerDictResponse>ModelValue: CancelOrderModel.
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 | — |
Id | long | id | None (omitted if not set) | Required | — |
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.CANCEL_ORDER,
ModelValue = new CancelOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);Response type
Dictionary<string, object>? data = response?.Data; // null when response or data is absentResponse Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 123456,
"orderId": 789012
}
}Related APIs
Updated 1 day ago
Did this page help you?
