订单查询
获取订单号
操作名
TradeApiService.ORDER_NO = order_no. 使用服务端方法 order_no。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<TigerDictResponse>ModelValue: TradeModel.
参数
| 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 | — |
返回
TigerDictResponse inherits TigerResponse; its data property is 字典,键为 string,值为 object. Key SDK fields: 动态字段.
示例
TigerRequest<TigerDictResponse> request = new()
{
ApiMethodName = TradeApiService.ORDER_NO,
ModelValue = new TradeModel { Account = tradeClient.GetDefaultAccount }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);响应类型
Dictionary<string, object>? data = response?.Data; // response 或 data 缺失时为 null获取订单列表
操作名
TradeApiService.ORDERS = orders. 使用服务端方法 orders。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
参数
| 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 | Int64 | id | None (omitted if not set) | Required | — |
IsShowCharges | Boolean | show_charges | None (omitted if not set) | Optional | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | 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 | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | None (omitted if not set) | Optional | — |
PageToken | string | page_token | null | Optional | — |
返回
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem. Key SDK fields: Items: list of TradeOrder.
示例
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);响应类型
OrderBatchItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"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
}
]
}
}获取待成交订单
操作名
TradeApiService.ACTIVE_ORDERS = active_orders. 使用服务端方法 active_orders。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
参数
| 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 | Int64 | id | None (omitted if not set) | Required | — |
IsShowCharges | Boolean | show_charges | None (omitted if not set) | Optional | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | 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 | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | None (omitted if not set) | Optional | — |
PageToken | string | page_token | null | Optional | — |
返回
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem. Key SDK fields: Items: list of TradeOrder.
示例
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);响应类型
OrderBatchItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"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
}
]
}
}获取已撤销订单
操作名
TradeApiService.INACTIVE_ORDERS = inactive_orders. 使用服务端方法 inactive_orders。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
参数
| 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 | Int64 | id | None (omitted if not set) | Required | — |
IsShowCharges | Boolean | show_charges | None (omitted if not set) | Optional | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | 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 | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | None (omitted if not set) | Optional | — |
PageToken | string | page_token | null | Optional | — |
返回
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem. Key SDK fields: Items: list of TradeOrder.
示例
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);响应类型
OrderBatchItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"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"
}
]
}
}获取已成交订单
操作名
TradeApiService.FILLED_ORDERS = filled_orders. 使用服务端方法 filled_orders。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<OrderBatchResponse>ModelValue: QueryOrderModel.
参数
| 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 | Int64 | id | None (omitted if not set) | Required | — |
IsShowCharges | Boolean | show_charges | None (omitted if not set) | Optional | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | 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 | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 100 | Optional | Positive integer |
SortBy | OrderSortBy | sort_by | None (omitted if not set) | Optional | — |
PageToken | string | page_token | null | Optional | — |
返回
OrderBatchResponse inherits TigerResponse; its data property is OrderBatchItem. Key SDK fields: Items: list of TradeOrder.
示例
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);响应类型
OrderBatchItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"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"
}
]
}
}获取成交记录
操作名
TradeApiService.ORDER_TRANSACTIONS = order_transactions. 使用服务端方法 order_transactions。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<OrderTransactionsResponse>ModelValue: OrderTransactionsModel.
参数
| 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 | — |
OrderId | Int64 | order_id | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | 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 | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
EndDate | Int64 | end_date | None (omitted if not set) | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | 20 | Optional | Positive integer |
返回
OrderTransactionsResponse inherits TigerResponse; its data property is OrderTransactionsItem. Key SDK fields: Items: list of OrderTransactions.
示例
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);响应类型
OrderTransactionsItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"id": 123456,
"orderId": 789012,
"symbol": "AAPL",
"action": "BUY",
"filledQuantity": 100,
"filledPrice": 149.95,
"transactionTime": 1785441650000
}
]
}Updated 9 days ago
