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 propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
IdlongidNone (omitted if not set)Required
OrderTypeOrderType (nullable)order_typenullOptionalprice fields are conditionally required by order type
TotalQuantityInt64 (nullable)total_quantitynullOptional
TotalQuantityScaleInt32 (nullable)total_quantity_scalenullOptional
LimitPriceDouble (nullable)limit_pricenullOptionalconditional order-price field
AuxPriceDouble (nullable)aux_pricenullOptionalconditional order-price field
TrailingPercentDouble (nullable)trailing_percentnullOptionalconditional order-price field
CashAmountDouble (nullable)cash_amountnullOptional
DisplaySizeInt64 (nullable)display_sizenullOptional
MinDisplaySizeInt64 (nullable)min_display_sizenullOptional
PriceTypestring (nullable)price_typenullOptional
CheckIntervalsInt64 (nullable)check_intervalsnullOptional
StartTimeInt64 (nullable)start_timenullOptionalTimestamp or date format; maintain chronological order
EndTimeInt64 (nullable)end_timenullOptionalTimestamp 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 absent

Response 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 propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullAuto-filled if emptyTradeClient uses DefaultAccount when empty
SecretKeystringsecret_keynullno
IdlongidNone (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 absent

Response Example

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": {
    "id": 123456,
    "orderId": 789012
  }
}

Related APIs

See Requests, responses, and operations.


Did this page help you?