Order Queries
Get Order
Signature
pub async fn get_order(&self, req: GetOrderRequest) -> Result<Option<Order>, TigerError>Description
Get details of a single order by ID.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.id | Option<i64> | Conditional: at least one of id / order_id | None (omitted) |
| req.order_id | Option<i64> | Conditional: at least one of id / order_id | None (omitted) |
| req.is_brief | Option<bool> | Optional | None (omitted) |
| req.show_charges | Option<bool> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Response
Result<Option<Order>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | i64 | Global order ID |
| order_id | i64 | Order number |
| account | String | Account |
| symbol | String | Symbol |
| sec_type | String | Security type |
| action | String | BUY/SELL |
| order_type | String | MKT/LMT/STP/STP_LMT/TRAIL |
| total_quantity | i64 | Order quantity |
| filled_quantity | i64 | Filled quantity |
| limit_price | f64 | Limit price |
| aux_price | f64 | Stop/trailing price |
| avg_fill_price | f64 | Volume-weighted average of fill prices, excluding commissions and other fees |
| status | String | Order status |
| time_in_force | String | DAY/GTC/GTD |
| outside_rth | bool | Extended hours allowed |
| commission | f64 | Commission; the model uses a non-nullable number, so a missing field and an explicit zero both appear as 0 |
| realized_pnl | f64 | Realized P&L; commission and GST are returned separately. Refer to the account statement for the exact calculation basis and currency |
| open_time | i64 | Order time (ms) |
| update_time | i64 | Update time (ms) |
| currency | String | Currency |
| market | String | Market |
| can_modify | bool | Can modify |
| can_cancel | bool | Can cancel |
| trailing_percent | f64 | Trailing-stop percentage |
| order_legs | Vec<OrderLeg> | Attached order legs |
| algo_params | Option<AlgoParams> | Algorithm-order parameters |
| expiry | String | Expiration date |
| strike | String | Strike price |
| right | String | PUT/CALL |
| identifier | String | Contract identifier |
| name | String | Contract name |
| open_time | i64 | Order time (ms) |
| update_time | i64 | Update time (ms) |
| latest_time | i64 | Last status-change time |
| remark | String | Order remark |
| source | String | Order source |
| user_mark | String | User mark |
| external_id | String | External order ID |
| total_quantity_scale | i32 | Order-quantity scale |
| filled_quantity_scale | i32 | Filled-quantity scale |
| filled_cash_amount | f64 | Filled cash amount |
| gst | f64 | GST; the model uses a non-nullable number, so a missing field and an explicit zero both appear as 0 |
| liquidation | bool | Whether this is a liquidation order |
| attr_desc | String | Order attribute description |
| attr_list | Vec<String> | Order attribute list |
| algo_strategy | String | Algorithm strategy |
| discount | f64 | Discount |
| replace_status | String | Asynchronous modify status |
| cancel_status | String | Asynchronous cancel status |
| is_open | bool | Whether the order is open |
| order_discount | f64 | Order discount |
| trading_session_type | String | Trading session type |
| latest_price | f64 | Latest price |
| display_size | i64 | Iceberg display size |
| min_display_size | i64 | Iceberg minimum display size |
| check_intervals | i64 | Iceberg price-check interval (seconds) |
| price_type | String | Iceberg price type |
| start_time | i64 | Iceberg effective start time (ms timestamp) |
| end_time | i64 | Iceberg effective end time (ms timestamp) |
OrderLeg fields:
| Field | Rust type | Description |
|---|---|---|
| leg_type | String | Attached order-leg type |
| price | f64 | Price |
| time_in_force | String | Time in force |
| quantity | i64 | Quantity |
AlgoParams fields:
| Field | Rust type | Description |
|---|---|---|
| algo_strategy | String | Algorithm strategy |
| start_time | String | Algorithm start time |
| end_time | String | Algorithm end time |
| participation_rate | f64 | Participation rate |
All numeric and boolean Order fields are non-nullable Rust types. Missing response fields deserialize to their default values, so they cannot be distinguished from explicitly returned defaults.
Example
use tigeropen::model::trade_requests::GetOrderRequest;
let order = trade.get_order(GetOrderRequest { id: Some(31234567), ..Default::default() }).await?;
if let Some(o) = order {
println!("{} {} {} qty={} status={}", o.symbol, o.action, o.order_type, o.total_quantity, o.status);
}Response Example
{
"id": 31234567,
"orderId": 100234,
"account": "402901",
"symbol": "AAPL",
"secType": "STK",
"action": "BUY",
"orderType": "LMT",
"totalQuantity": 100,
"filledQuantity": 100,
"limitPrice": 195.50,
"avgFillPrice": 195.48,
"status": "Filled",
"timeInForce": "DAY",
"commission": 1.99,
"currency": "USD",
"market": "US"
}Rate limit
The base rate limit is 120 requests/min.
Get Orders
Signature
pub async fn get_orders(&self, req: OrdersRequest) -> Result<Vec<Order>, TigerError>Description
Get all orders with optional filters.
Both start_date and end_date are optional. Omitting either bound means that the corresponding time filter is not applied. The interface defines no maximum query span, but each response is constrained by limit. Use a reasonably bounded time range.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.sec_type | Option<String> | Optional | None (omitted) |
| req.market | Option<String> | Optional | None (omitted) |
| req.symbol | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional; start time as a Unix millisecond timestamp | None (omitted) |
| req.end_date | Option<i64> | Optional; end time as a Unix millisecond timestamp | None (omitted) |
| req.limit | Option<i32> | Optional; maximum number of results | None (omitted) |
| req.is_brief | Option<bool> | Optional | None (omitted) |
| req.states | Option<Vec<String>> | Optional | None (omitted) |
| req.sort_by | Option<String> | Optional; omnibus accounts only. LATEST_CREATED sorts descending and filters start_date/end_date by order creation/submission time; LATEST_STATUS_UPDATED sorts descending and filters them by the most recent order status update time | None (omitted); the server defaults to LATEST_CREATED |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional; pagination token | None (omitted) |
| req.parent_id | Option<i64> | Optional | None (omitted) |
Response
Same fields as Get Order, including the Order, OrderLeg, and AlgoParams field tables.
Example
let orders = trade.get_orders(OrdersRequest { limit: Some(20), ..Default::default() }).await?;
for o in &orders {
println!("[{}] {} {} {}", o.id, o.symbol, o.action, o.status);
}Response example
[{"id":31234567,"symbol":"AAPL","status":"Filled"}]Rate limit
The base rate limit is 120 requests/min.
Get Active Orders
Signature
pub async fn get_active_orders(&self, req: OrdersRequest) -> Result<Vec<Order>, TigerError>Description
Get pending (active) orders.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.sec_type | Option<String> | Optional | None (omitted) |
| req.market | Option<String> | Optional | None (omitted) |
| req.symbol | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional; start time as a Unix millisecond timestamp | None (omitted) |
| req.end_date | Option<i64> | Optional; end time as a Unix millisecond timestamp | None (omitted) |
| req.limit | Option<i32> | Optional; maximum number of results | None (omitted) |
| req.is_brief | Option<bool> | Optional | None (omitted) |
| req.states | Option<Vec<String>> | Optional | None (omitted) |
| req.sort_by | Option<String> | Optional; omnibus accounts only. LATEST_CREATED sorts descending and filters start_date/end_date by order creation/submission time; LATEST_STATUS_UPDATED sorts descending and filters them by the most recent order status update time | None (omitted); the server defaults to LATEST_CREATED |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional; pagination token | None (omitted) |
| req.parent_id | Option<i64> | Optional | None (omitted) |
Response
Same fields as Get Order, including the Order, OrderLeg, and AlgoParams field tables.
Example
let active = trade.get_active_orders(OrdersRequest::default()).await?;
println!("{} active orders", active.len());Response example
[{"id":31234567,"symbol":"AAPL","status":"Submitted"}]Rate limit
The base rate limit is 120 requests/min.
Get Inactive Orders
Signature
pub async fn get_inactive_orders(&self, req: OrdersRequest) -> Result<Vec<Order>, TigerError>Description
Get cancelled or expired orders.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.sec_type | Option<String> | Optional | None (omitted) |
| req.market | Option<String> | Optional | None (omitted) |
| req.symbol | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional; start time as a Unix millisecond timestamp | None (omitted) |
| req.end_date | Option<i64> | Optional; end time as a Unix millisecond timestamp | None (omitted) |
| req.limit | Option<i32> | Optional; maximum number of results | None (omitted) |
| req.is_brief | Option<bool> | Optional | None (omitted) |
| req.states | Option<Vec<String>> | Optional | None (omitted) |
| req.sort_by | Option<String> | Optional; omnibus accounts only. LATEST_CREATED sorts descending and filters start_date/end_date by order creation/submission time; LATEST_STATUS_UPDATED sorts descending and filters them by the most recent order status update time | None (omitted); the server defaults to LATEST_CREATED |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional; pagination token | None (omitted) |
| req.parent_id | Option<i64> | Optional | None (omitted) |
Response
Same fields as Get Order, including the Order, OrderLeg, and AlgoParams field tables.
Example
let inactive = trade.get_inactive_orders(OrdersRequest::default()).await?;Response example
[{"id":31234567,"symbol":"AAPL","status":"Cancelled"}]Rate limit
The base rate limit is 120 requests/min.
Get Filled Orders
Signature
pub async fn get_filled_orders(&self, req: OrdersRequest) -> Result<Vec<Order>, TigerError>Description
Get filled orders. Use start_date/end_date to filter by time range.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.sec_type | Option<String> | Optional | None (omitted) |
| req.market | Option<String> | Optional | None (omitted) |
| req.symbol | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional; start time as a Unix millisecond timestamp | None (omitted) |
| req.end_date | Option<i64> | Optional; end time as a Unix millisecond timestamp | None (omitted) |
| req.limit | Option<i32> | Optional; maximum number of results | None (omitted) |
| req.is_brief | Option<bool> | Optional | None (omitted) |
| req.states | Option<Vec<String>> | Optional | None (omitted) |
| req.sort_by | Option<String> | Optional; omnibus accounts only. LATEST_CREATED sorts descending and filters start_date/end_date by order creation/submission time; LATEST_STATUS_UPDATED sorts descending and filters them by the most recent order status update time | None (omitted); the server defaults to LATEST_CREATED |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional; pagination token | None (omitted) |
| req.parent_id | Option<i64> | Optional | None (omitted) |
Response
Same fields as Get Order, including the Order, OrderLeg, and AlgoParams field tables.
Example
let filled = trade.get_filled_orders(OrdersRequest::default()).await?;
for o in &filled {
println!("{} {} avg_price={} commission={}", o.symbol, o.action, o.avg_fill_price, o.commission);
}Response example
[{"id":31234567,"symbol":"AAPL","status":"Filled","filledQuantity":100,"avgFillPrice":195.48}]Rate limit
The base rate limit is 120 requests/min.
Get Order Transactions
Signature
pub async fn get_order_transactions(&self, req: OrderTransactionsRequest) -> Result<Vec<Transaction>, TigerError>Description
Get trade execution records.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.order_id | Option<i64> | Optional; filter by order ID | None (omitted) |
| req.symbol | Option<String> | Required by the server; not prevalidated by the SDK | None (omitted) |
| req.sec_type | Option<String> | Optional; filter by security type | None (omitted) |
| req.start_date | Option<i64> | Optional; start time as a Unix millisecond timestamp | None (omitted) |
| req.end_date | Option<i64> | Optional; end time as a Unix millisecond timestamp | None (omitted) |
| req.limit | Option<i32> | Optional; maximum number of results | None (omitted) |
| req.expiry | Option<String> | Optional | None (omitted) |
| req.strike | Option<f64> | Optional | None (omitted) |
| req.put_call | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional; pagination token | None (omitted) |
Response
Result<Vec<Transaction>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | i64 | Transaction ID |
| order_id | i64 | Order number |
| account | String | Account |
| symbol | String | Symbol |
| sec_type | String | Security type |
| action | String | BUY/SELL |
| filled_price | f64 | Fill price |
| filled_quantity | i64 | Fill quantity |
| filled_amount | f64 | Fill amount |
| commission | f64 | Commission |
| transacted_at | String | Transaction time |
| transaction_time | i64 | Transaction timestamp (ms) |
Example
use tigeropen::model::trade_requests::OrderTransactionsRequest;
let txns = trade.get_order_transactions(OrderTransactionsRequest {
symbol: Some("AAPL".into()),
..Default::default()
}).await?;
for t in &txns {
println!("{} {} price={} qty={}", t.symbol, t.action, t.filled_price, t.filled_quantity);
}Response Example
[
{
"id": 987654,
"orderId": 100234,
"account": "402901",
"symbol": "AAPL",
"secType": "STK",
"action": "BUY",
"filledPrice": 195.48,
"filledQuantity": 100,
"filledAmount": 19548.0,
"commission": 1.99,
"transactedAt": "2025-06-24T15:30:01Z",
"transactionTime": 1719240601000
}
]Rate limit
The base rate limit is 60 requests/min.
Updated about 1 month ago
