Order Queries
State-changing operations must prevent duplicate submission.
In TradeOrder, AvgFillPrice is the volume-weighted average of fill prices and excludes commissions and other fees. RealizedPnl is realized P&L. Commission and Gst are returned separately. Refer to the account statement for the exact calculation basis and currency. Commission, Gst, AvgFillPrice, and RealizedPnl are non-nullable Double properties in this SDK, so they cannot distinguish a missing field from an explicit 0. ReplaceStatus=REPLACED is final modify success and FAILED is failure; CancelStatus=RECEIVED only means the cancellation request was accepted, while the final result comes from order Status.
Get Order Number
Operation
TradeApiService.ORDER_NO = order_no. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<TigerDictResponse>ModelValue: TradeModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
Return
TigerDictResponse inherits TigerResponse; its data property is Dictionary<string, object>.
Example
TigerRequest<TigerDictResponse> request = new()
{
ApiMethodName = TradeApiService.ORDER_NO,
ModelValue = new TradeModel { Account = tradeClient.GetDefaultAccount }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);Response type
Dictionary<string, object>? data = response?.Data; // null when response or data is absentData fields
| Type | SDK contract |
|---|---|
Dictionary<string, object> | Dynamic dictionary; the SDK defines no fixed keys or nested object types. |
Rate limit
Base tier: 120 requests per minute.
Related APIs
See Requests, responses, and operations.
Get Orders
Operation
TradeApiService.ORDERS = orders. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
Id | Int64 | id | CLR default; omitted during serialization | Required | — |
IsShowCharges | Boolean | show_charges | CLR default; omitted during serialization | Optional | — |
SegType | SegmentType | seg_type | CLR default; omitted during serialization | Optional | — |
SecType | SecType | sec_type | CLR default; omitted during serialization | Optional | — |
Market | Market | market | CLR default; omitted during serialization | Optional | Enum value |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
StartDate | Int64 | start_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
EndDate | Int64 | end_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | CLR default; omitted during serialization | Optional | Omnibus accounts only. LATEST_CREATED: sorts descending and filters by order creation/submission time; LATEST_STATUS_UPDATED: sorts descending and filters by the most recent order status update time. |
PageToken | string | page_token | null | Optional | — |
Time range: SortBy selects both the ordering and the timestamp filtered by StartDate and EndDate: LATEST_CREATED uses the order creation/submission time, while LATEST_STATUS_UPDATED uses the most recent order status update time. With NONE or an omitted SortBy, the C# serializer sends no sort_by field and the omnibus service defaults to LATEST_CREATED. StartDate and EndDate are optional; an omitted bound adds no filter for that side. The interface has no maximum time span, but pagination and per-response result limits still apply. Use a reasonably bounded range.
Return
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem.
Example
TigerRequest<OrderBatchResponse> request = new()
{
ApiMethodName = TradeApiService.ORDERS,
ModelValue = new QueryOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L, SegType = SegmentType.SEC, SecType = SecType.STK, Market = Market.US }
};
OrderBatchResponse? response = await tradeClient.ExecuteAsync(request);Response type
OrderBatchItem? data = response?.Data; // null when response or data is absentData fields (OrderBatchItem)
| Field | API field | C# type | Description |
|---|---|---|---|
NextPageToken | nextPageToken | string | Token for the next page. |
Items | items | List<TradeOrder> | Order records. |
Each TradeOrder in Items:
| Field | API field | C# type | Description |
|---|---|---|---|
Symbol | symbol | string | Contract symbol. |
Market | market | string | Market. |
SecType | secType | string | Security type. |
Currency | currency | string | Trading currency. |
Expiry | expiry | string | Contract expiry date. |
Strike | strike | string | Option strike price. |
Right | right | string | Option right. |
Multiplier | multiplier | double | Contract multiplier. |
Identifier | identifier | string | Contract identifier. |
Id | id | Int64 | Order identifier. |
OrderId | orderId | int | Order number. |
ExternalId | externalId | string | External order identifier. |
ParentId | parentId | Int64 | Parent order identifier. |
Account | account | string | Account identifier. |
Action | action | string | Order action. |
OrderType | orderType | string | Order type. |
LimitPrice | limitPrice | Double | Limit price. |
AuxPrice | auxPrice | Double | Auxiliary price. |
TrailingPercent | trailingPercent | Double | Trailing percentage. |
TotalQuantity | totalQuantity | Int64 | Total order quantity. |
TotalQuantityScale | totalQuantityScale | Int32 | Decimal scale for total quantity. |
FilledQuantity | filledQuantity | Int64 | Filled quantity. |
FilledQuantityScale | filledQuantityScale | Int32 | Decimal scale for filled quantity. |
TotalCashAmount | totalCashAmount | Double | Total cash amount. |
FilledCashAmount | filledCashAmount | Double | Filled cash amount. |
RefundCashAmount | refundCashAmount | Double | Refunded cash amount. |
LastFillPrice | lastFillPrice | Double | Last fill price. |
AvgFillPrice | avgFillPrice | Double | Average fill price. |
TimeInForce | timeInForce | string | Time-in-force instruction. |
ExpireTime | expireTime | Int64 | Order expiry timestamp. |
GoodTillDate | goodTillDate | string | Good-until date. |
OutsideRth | outsideRth | Boolean | Whether execution outside regular trading hours is allowed. |
TradingSessionType | tradingSessionType | string | Trading session type. |
Commission | commission | Double | Commission amount. |
Gst | gst | Double | Goods and Services Tax amount. |
RealizedPnl | realizedPnl | Double | Realized profit or loss. |
Remark | remark | string | Order remark. |
Liquidation | liquidation | Boolean | Whether this is a forced liquidation order. |
TriggerStatus | triggerStatus | string | Trigger status. |
OpenTime | openTime | Int64 | Order open timestamp. |
UpdateTime | updateTime | Int64 | Order update timestamp. |
LatestTime | latestTime | Int64 | Latest order timestamp. |
Name | name | string | Contract name. |
LatestPrice | latestPrice | Double | Latest price. |
AttrDesc | attrDesc | string | Order attribute description. |
UserMark | userMark | string | User-defined order mark. |
AttrList | attrList | List<string> | Order attributes. |
OcaGroupId | ocaGroupId | int | One-cancels-all group identifier. |
ComboLegs | comboLegs | string | Combination-leg information. |
AllocAccounts | allocAccounts | List<string> | Allocated account identifiers. |
AllocShares | allocShares | List<Double> | Allocated share quantities. |
AlgoStrategy | algoStrategy | string | Algorithmic strategy. |
AlgoParameters | algoParameters | List<TagValue> | Algorithmic strategy parameters. |
Status | status | OrderStatus | Order status. |
ReplaceStatus | replaceStatus | string | Order replacement status. |
CancelStatus | cancelStatus | string | Order cancellation status. |
Source | source | string | Order source. |
Discount | discount | Int32 | Discount value. |
CanModify | canModify | Boolean | Whether the order can be modified. |
CanCancel | canCancel | Boolean | Whether the order can be canceled. |
IsOpen | isOpen | Boolean | Whether the order is open. |
ComboType | comboType | string | Combination order type. |
ComboTypeDesc | comboTypeDesc | string | Combination order type description. |
Legs | legs | List<OrderLeg> | Multi-leg order details. |
Each AlgoParameters item is a TagValue:
| Field | API field | C# type | Description |
|---|---|---|---|
Tag | tag | string | Parameter name. |
Value | value | string? | Parameter value. |
Each Legs item is an OrderLeg:
| Field | API field | C# type | Description |
|---|---|---|---|
Market | market | string | Market. |
Currency | currency | string | Trading currency. |
Multiplier | multiplier | Double | Contract multiplier. |
TotalQuantity | totalQuantity | Double | Total leg quantity. |
FilledQuantity | filledQuantity | Double | Filled leg quantity. |
AvgFilledPrice | avgFilledPrice | Double | Average leg fill price. |
CreatedAt | createdAt | Int64 | Creation timestamp. |
UpdatedAt | updatedAt | Int64 | Last update timestamp. |
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"items": [
{
"id": 123456,
"orderId": 789012,
"symbol": "AAPL",
"action": "BUY",
"orderType": "LMT",
"totalQuantity": 100,
"filledQuantity": 100,
"limitPrice": 150.0,
"avgFillPrice": 149.95,
"status": "Filled",
"openTime": 1785441600000,
"latestTime": 1785441650000
}
]
}
}Rate limit
Base tier: 120 requests per minute.
Related APIs
See Requests, responses, and operations.
Get Active Orders
Operation
TradeApiService.ACTIVE_ORDERS = active_orders. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
Id | Int64 | id | CLR default; omitted during serialization | Required | — |
IsShowCharges | Boolean | show_charges | CLR default; omitted during serialization | Optional | — |
SegType | SegmentType | seg_type | CLR default; omitted during serialization | Optional | — |
SecType | SecType | sec_type | CLR default; omitted during serialization | Optional | — |
Market | Market | market | CLR default; omitted during serialization | Optional | Enum value |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
StartDate | Int64 | start_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
EndDate | Int64 | end_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | CLR default; omitted during serialization | Optional | Omnibus accounts only. LATEST_CREATED: sorts descending and filters by order creation/submission time; LATEST_STATUS_UPDATED: sorts descending and filters by the most recent order status update time. With NONE or omission, no field is serialized and the service defaults to LATEST_CREATED. |
PageToken | string | page_token | null | Optional | — |
Return
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem.
Example
TigerRequest<OrderBatchResponse> request = new()
{
ApiMethodName = TradeApiService.ACTIVE_ORDERS,
ModelValue = new QueryOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L, SegType = SegmentType.SEC, SecType = SecType.STK, Market = Market.US }
};
OrderBatchResponse? response = await tradeClient.ExecuteAsync(request);Response type
OrderBatchItem? data = response?.Data; // null when response or data is absentData fields
| Field | API field | C# type | Description |
|---|---|---|---|
NextPageToken | nextPageToken | string | Token for the next page. |
Items | items | List<TradeOrder> | Order records. |
See Order-list Data fields for every TradeOrder field.
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"items": [
{
"id": 123457,
"orderId": 789013,
"symbol": "TSLA",
"action": "BUY",
"orderType": "LMT",
"totalQuantity": 50,
"filledQuantity": 0,
"limitPrice": 280.0,
"status": "PendingSubmit",
"openTime": 1785527000000
}
]
}
}Rate limit
Base tier: 120 requests per minute.
Related APIs
See Requests, responses, and operations.
Get Inactive Orders
Operation
TradeApiService.INACTIVE_ORDERS = inactive_orders. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
Id | Int64 | id | CLR default; omitted during serialization | Required | — |
IsShowCharges | Boolean | show_charges | CLR default; omitted during serialization | Optional | — |
SegType | SegmentType | seg_type | CLR default; omitted during serialization | Optional | — |
SecType | SecType | sec_type | CLR default; omitted during serialization | Optional | — |
Market | Market | market | CLR default; omitted during serialization | Optional | Enum value |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
StartDate | Int64 | start_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
EndDate | Int64 | end_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | CLR default; omitted during serialization | Optional | Omnibus accounts only. LATEST_CREATED: sorts descending and filters by order creation/submission time; LATEST_STATUS_UPDATED: sorts descending and filters by the most recent order status update time. With NONE or omission, no field is serialized and the service defaults to LATEST_CREATED. |
PageToken | string | page_token | null | Optional | — |
Return
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem.
Example
TigerRequest<OrderBatchResponse> request = new()
{
ApiMethodName = TradeApiService.INACTIVE_ORDERS,
ModelValue = new QueryOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L, SegType = SegmentType.SEC, SecType = SecType.STK, Market = Market.US }
};
OrderBatchResponse? response = await tradeClient.ExecuteAsync(request);Response type
OrderBatchItem? data = response?.Data; // null when response or data is absentData fields
| Field | API field | C# type | Description |
|---|---|---|---|
NextPageToken | nextPageToken | string | Token for the next page. |
Items | items | List<TradeOrder> | Order records. |
See Order-list Data fields for every TradeOrder field.
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"items": [
{
"id": 123456,
"orderId": 789012,
"symbol": "AAPL",
"action": "BUY",
"orderType": "LMT",
"totalQuantity": 100,
"filledQuantity": 100,
"limitPrice": 150.0,
"avgFillPrice": 149.95,
"status": "Filled"
}
]
}
}Rate limit
Base tier: 120 requests per minute.
Related APIs
See Requests, responses, and operations.
Get Filled Orders
Operation
TradeApiService.FILLED_ORDERS = filled_orders. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
Id | Int64 | id | CLR default; omitted during serialization | Required | — |
IsShowCharges | Boolean | show_charges | CLR default; omitted during serialization | Optional | — |
SegType | SegmentType | seg_type | CLR default; omitted during serialization | Optional | — |
SecType | SecType | sec_type | CLR default; omitted during serialization | Optional | — |
Market | Market | market | CLR default; omitted during serialization | Optional | Enum value |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
StartDate | Int64 | start_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
EndDate | Int64 | end_date | CLR default; omitted during serialization | Optional | Timestamp or date format; filter against the timestamp selected by SortBy and maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | CLR default; omitted during serialization | Optional | Omnibus accounts only. LATEST_CREATED: sorts descending and filters by order creation/submission time; LATEST_STATUS_UPDATED: sorts descending and filters by the most recent order status update time. With NONE or omission, no field is serialized and the service defaults to LATEST_CREATED. |
PageToken | string | page_token | null | Optional | — |
Return
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem.
Example
TigerRequest<OrderBatchResponse> request = new()
{
ApiMethodName = TradeApiService.FILLED_ORDERS,
ModelValue = new QueryOrderModel { Account = tradeClient.GetDefaultAccount, Id = 1234567890L, SegType = SegmentType.SEC, SecType = SecType.STK, Market = Market.US }
};
OrderBatchResponse? response = await tradeClient.ExecuteAsync(request);Response type
OrderBatchItem? data = response?.Data; // null when response or data is absentData fields
| Field | API field | C# type | Description |
|---|---|---|---|
NextPageToken | nextPageToken | string | Token for the next page. |
Items | items | List<TradeOrder> | Order records. |
See Order-list Data fields for every TradeOrder field.
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"items": [
{
"id": 123456,
"orderId": 789012,
"symbol": "AAPL",
"action": "BUY",
"orderType": "LMT",
"totalQuantity": 100,
"filledQuantity": 100,
"limitPrice": 150.0,
"avgFillPrice": 149.95,
"status": "Filled"
}
]
}
}Rate limit
Base tier: 120 requests per minute.
Related APIs
See Requests, responses, and operations.
Get Transactions
Operation
TradeApiService.ORDER_TRANSACTIONS = order_transactions. Use this constant for TigerRequest.ApiMethodName.
Request
TigerRequest<OrderTransactionsResponse>ModelValue: OrderTransactionsModel.
Parameters
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR default; omitted during serialization | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | If empty, TradeClient injects TigerConfig.DefaultAccount; validation fails if it remains empty |
SecretKey | string | secret_key | null | no | — |
OrderId | Int64 | order_id | CLR default; omitted during serialization | Optional | — |
SecType | SecType | sec_type | CLR default; omitted during serialization | Optional | — |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
StartDate | Int64 | start_date | CLR default; omitted during serialization | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | CLR default; omitted during serialization | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 20 | Optional | Positive integer |
Return
OrderTransactionsResponse inherits TigerResponse; its data property is OrderTransactionsItem.
Example
TigerRequest<OrderTransactionsResponse> request = new()
{
ApiMethodName = TradeApiService.ORDER_TRANSACTIONS,
ModelValue = new OrderTransactionsModel { Account = tradeClient.GetDefaultAccount, OrderId = 1234567890L, SecType = SecType.STK, Symbol = "AAPL", Strike = "200" }
};
OrderTransactionsResponse? response = await tradeClient.ExecuteAsync(request);Response type
OrderTransactionsItem? data = response?.Data; // null when response or data is absentData fields (OrderTransactionsItem)
| Field | API field | C# type | Description |
|---|---|---|---|
Items | items | List<OrderTransactions> | Order transaction records. |
Each OrderTransactions in Items:
| Field | API field | C# type | Description |
|---|---|---|---|
Id | id | Int64 | Order transaction identifier. |
OrderId | orderId | Int64 | Order identifier. |
AccountId | accountId | string | Account identifier. |
SecType | secType | string | Security type. |
Market | market | string | Market. |
Currency | currency | string | Trading currency. |
Symbol | symbol | string | Contract symbol. |
Expiry | expiry | string | Contract expiry date. |
Strike | strike | string | Option strike price. |
Right | right | string | Option right. |
Action | action | string | Order action. |
FilledQuantity | filledQuantity | Int64 | Filled quantity. |
FilledPrice | filledPrice | Double | Fill price. |
FilledAmount | filledAmount | Double | Filled amount. |
TransactedAt | transactedAt | string | Transaction time string. |
TransactionTime | transactionTime | Int64 | Transaction timestamp. |
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"id": 123456,
"orderId": 789012,
"symbol": "AAPL",
"action": "BUY",
"filledQuantity": 100,
"filledPrice": 149.95,
"transactionTime": 1785441650000
}
]
}Rate limit
Base tier: 60 requests per minute.
Related APIs
Updated 23 days ago
