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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.idOption<i64>Conditional: at least one of id / order_idNone (omitted)
req.order_idOption<i64>Conditional: at least one of id / order_idNone (omitted)
req.is_briefOption<bool>OptionalNone (omitted)
req.show_chargesOption<bool>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)

Response

Result<Option<Order>, TigerError>

FieldTypeDescription
idi64Global order ID
order_idi64Order number
accountStringAccount
symbolStringSymbol
sec_typeStringSecurity type
actionStringBUY/SELL
order_typeStringMKT/LMT/STP/STP_LMT/TRAIL
total_quantityi64Order quantity
filled_quantityi64Filled quantity
limit_pricef64Limit price
aux_pricef64Stop/trailing price
avg_fill_pricef64Volume-weighted average of fill prices, excluding commissions and other fees
statusStringOrder status
time_in_forceStringDAY/GTC/GTD
outside_rthboolExtended hours allowed
commissionf64Commission; the model uses a non-nullable number, so a missing field and an explicit zero both appear as 0
realized_pnlf64Realized P&L; commission and GST are returned separately. Refer to the account statement for the exact calculation basis and currency
open_timei64Order time (ms)
update_timei64Update time (ms)
currencyStringCurrency
marketStringMarket
can_modifyboolCan modify
can_cancelboolCan 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:

FieldRust typeDescription
leg_typeStringAttached order-leg type
pricef64Price
time_in_forceStringTime in force
quantityi64Quantity

AlgoParams fields:

FieldRust typeDescription
algo_strategyStringAlgorithm strategy
start_timeStringAlgorithm start time
end_timeStringAlgorithm end time
participation_ratef64Participation 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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.sec_typeOption<String>OptionalNone (omitted)
req.marketOption<String>OptionalNone (omitted)
req.symbolOption<String>OptionalNone (omitted)
req.start_dateOption<i64>Optional; start time as a Unix millisecond timestampNone (omitted)
req.end_dateOption<i64>Optional; end time as a Unix millisecond timestampNone (omitted)
req.limitOption<i32>Optional; maximum number of resultsNone (omitted)
req.is_briefOption<bool>OptionalNone (omitted)
req.statesOption<Vec<String>>OptionalNone (omitted)
req.sort_byOption<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 timeNone (omitted); the server defaults to LATEST_CREATED
req.seg_typeOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)
req.page_tokenOption<String>Optional; pagination tokenNone (omitted)
req.parent_idOption<i64>OptionalNone (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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.sec_typeOption<String>OptionalNone (omitted)
req.marketOption<String>OptionalNone (omitted)
req.symbolOption<String>OptionalNone (omitted)
req.start_dateOption<i64>Optional; start time as a Unix millisecond timestampNone (omitted)
req.end_dateOption<i64>Optional; end time as a Unix millisecond timestampNone (omitted)
req.limitOption<i32>Optional; maximum number of resultsNone (omitted)
req.is_briefOption<bool>OptionalNone (omitted)
req.statesOption<Vec<String>>OptionalNone (omitted)
req.sort_byOption<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 timeNone (omitted); the server defaults to LATEST_CREATED
req.seg_typeOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)
req.page_tokenOption<String>Optional; pagination tokenNone (omitted)
req.parent_idOption<i64>OptionalNone (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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.sec_typeOption<String>OptionalNone (omitted)
req.marketOption<String>OptionalNone (omitted)
req.symbolOption<String>OptionalNone (omitted)
req.start_dateOption<i64>Optional; start time as a Unix millisecond timestampNone (omitted)
req.end_dateOption<i64>Optional; end time as a Unix millisecond timestampNone (omitted)
req.limitOption<i32>Optional; maximum number of resultsNone (omitted)
req.is_briefOption<bool>OptionalNone (omitted)
req.statesOption<Vec<String>>OptionalNone (omitted)
req.sort_byOption<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 timeNone (omitted); the server defaults to LATEST_CREATED
req.seg_typeOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)
req.page_tokenOption<String>Optional; pagination tokenNone (omitted)
req.parent_idOption<i64>OptionalNone (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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.sec_typeOption<String>OptionalNone (omitted)
req.marketOption<String>OptionalNone (omitted)
req.symbolOption<String>OptionalNone (omitted)
req.start_dateOption<i64>Optional; start time as a Unix millisecond timestampNone (omitted)
req.end_dateOption<i64>Optional; end time as a Unix millisecond timestampNone (omitted)
req.limitOption<i32>Optional; maximum number of resultsNone (omitted)
req.is_briefOption<bool>OptionalNone (omitted)
req.statesOption<Vec<String>>OptionalNone (omitted)
req.sort_byOption<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 timeNone (omitted); the server defaults to LATEST_CREATED
req.seg_typeOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)
req.page_tokenOption<String>Optional; pagination tokenNone (omitted)
req.parent_idOption<i64>OptionalNone (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

ParameterRust typeRequirementSDK default
req.accountOption<String>Optional; most TradeClient methods inject the default account when NoneNone (omitted)
req.order_idOption<i64>Optional; filter by order IDNone (omitted)
req.symbolOption<String>Required by the server; not prevalidated by the SDKNone (omitted)
req.sec_typeOption<String>Optional; filter by security typeNone (omitted)
req.start_dateOption<i64>Optional; start time as a Unix millisecond timestampNone (omitted)
req.end_dateOption<i64>Optional; end time as a Unix millisecond timestampNone (omitted)
req.limitOption<i32>Optional; maximum number of resultsNone (omitted)
req.expiryOption<String>OptionalNone (omitted)
req.strikeOption<f64>OptionalNone (omitted)
req.put_callOption<String>OptionalNone (omitted)
req.langOption<String>OptionalNone (omitted)
req.page_tokenOption<String>Optional; pagination tokenNone (omitted)

Response

Result<Vec<Transaction>, TigerError>

FieldTypeDescription
idi64Transaction ID
order_idi64Order number
accountStringAccount
symbolStringSymbol
sec_typeStringSecurity type
actionStringBUY/SELL
filled_pricef64Fill price
filled_quantityi64Fill quantity
filled_amountf64Fill amount
commissionf64Commission
transacted_atStringTransaction time
transaction_timei64Transaction 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.


Did this page help you?