修改与撤销订单
改单
操作名
TradeApiService.MODIFY_ORDER = modify_order. 使用服务端方法 modify_order。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<TigerDictResponse>ModelValue: ModifyOrderModel.
参数
| 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 |
返回
TigerDictResponse inherits TigerResponse; its data property is 字典,键为 string,值为 object. Key SDK fields: 动态字段.
示例
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);响应类型
Dictionary<string, object>? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 123456,
"orderId": 789012
}
}撤单
操作名
TradeApiService.CANCEL_ORDER = cancel_order. 使用服务端方法 cancel_order。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<TigerDictResponse>ModelValue: CancelOrderModel.
参数
| 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 | — |
返回
TigerDictResponse inherits TigerResponse; its data property is 字典,键为 string,值为 object. Key SDK fields: 动态字段.
示例
TigerRequest<TigerDictResponse> request = new()
{
ApiMethodName = TradeApiService.CANCEL_ORDER,
ModelValue = new CancelOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);响应类型
Dictionary<string, object>? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 123456,
"orderId": 789012
}
}Updated 9 days ago
Did this page help you?
