Modify and Cancel Orders

State-changing operations must prevent duplicate submission.

Modify Order

Operation

TradeApiService.MODIFY_ORDER = modify_order. Use this constant for TigerRequest.ApiMethodName.

Request

TigerRequest<TigerDictResponse>

ModelValue: ModifyOrderModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangCLR default; omitted during serializationno
Accountstring (nullable)accountnullAuto-filled if emptyIf empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty
SecretKeystringsecret_keynullno
IdlongidCLR default; omitted during serializationRequired
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<string, object>.

The order ID in a successful response confirms only that the modify request was submitted. Continue querying the order: ReplaceStatus=REPLACED confirms success, FAILED confirms failure, and other values remain intermediate and must be interpreted with Status.

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

Data fields

TypeSDK contract
Dictionary<string, object>Dynamic dictionary; the SDK defines no fixed keys or nested object types.

Response Example

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

Rate limit

Base tier: 120 requests per minute.

Related APIs

See Requests, responses, and operations.

Cancel Order

Operation

TradeApiService.CANCEL_ORDER = cancel_order. Use this constant for TigerRequest.ApiMethodName.

Request

TigerRequest<TigerDictResponse>

ModelValue: CancelOrderModel.

Parameters

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangCLR default; omitted during serializationno
Accountstring (nullable)accountnullAuto-filled if emptyIf empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty
SecretKeystringsecret_keynullno
IdlongidCLR default; omitted during serializationRequired

Return

TigerDictResponse inherits TigerResponse; its data property is Dictionary<string, object>.

The order ID in a successful response confirms only that the cancellation request was submitted. Continue querying until Status=Cancelled or the order reaches another final state, such as a fill that completed first; do not treat CancelStatus=RECEIVED as completion.

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

Data fields

TypeSDK contract
Dictionary<string, object>Dynamic dictionary; the SDK defines no fixed keys or nested object types.

Response Example

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

Rate limit

Base tier: 120 requests per minute.

Related APIs

See Requests, responses, and operations.


Did this page help you?