Trade
Authorization
Signed mode: every request is signed with your App Key/Secret. Header set:
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string · header | Required | The account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation. |
X-Api-Key | string · header | Required | Your App Key. |
X-Timestamp | string · header | Required | Request timestamp in seconds (Unix epoch). |
X-Api-Signature | string · header | Required | HMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=. |
This API is used to get today order or get order by order id.
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Optional | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
status | array | Optional | Order status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`. example: `status=FilledStatus&status=NewStatus` |
side | string | Optional | Order side. **Enum Value:**, `Buy`, `Sell` |
market | string | Optional | Market. **Enum Value:**, `US` - United States of America Market, `HK` - Hong Kong Market |
order_id | string | Optional | Order ID, example: `701276261045858304` |
is_attached | boolean | Optional | Whether `order_id` refers to an attached order, returns the attached order information if `true` |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
orders | object[] | Optional | Order Detail |
└ order_id | string | Optional | Order ID |
└ status | string | Optional | Order Status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`. |
└ stock_name | string | Optional | Stock Name |
└ quantity | string | Optional | Submitted Quantity |
└ executed_quantity | string | Optional | Executed Quantity. when the order is not filled, value is 0 |
└ price | string | Optional | Submitted Price. when market condition order is not triggered, value is empty string |
└ executed_price | string | Optional | Executed Price. when the order is not filled, value is 0 |
└ submitted_at | string | Optional | Submitted Time |
└ side | string | Optional | Order Side. **Enum Value:**, `Buy`, `Sell` |
└ symbol | string | Optional | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
└ order_type | string | Optional | Order Type. One of: `LO`, `ELO`, `MO`, `AO`, `ALO`, `ODD`, `LIT`, `MIT`, `TSLPAMT`, `TSLPPCT`, `SLO`. |
└ trigger_price | string | Optional | `LIT` / `MIT` Order Trigger Price. When the order is not `LIT` / `MIT` order, value is empty string |
└ tag | string | Optional | Order tag. **Enum Value**, `Normal` - Normal Order, `Gtc` - Long term Order, `Grey` - Grey Order |
└ time_in_force | string | Optional | Time in force Type. **Enum Value:**, `Day` - Day Order, `GTC` - Good Til Canceled Order, `GTD` - Good Til Date Order |
└ expire_date | string | Optional | Long term order expire date, format: `YYYY-MM-DD`, example: `2022-12-05`. When not a long term order, default value is empty string |
└ updated_at | string | Optional | Last updated time, formatted as a timestamp (second) |
└ trigger_at | string | Optional | Conditional order trigger time. formatted as a timestamp (second) |
└ trigger_status | string | Optional | Conditional Order Trigger Status, When an order is not a conditional order or a conditional order is not triggered, the trigger status is NOT_USED. **Enum Value**, `NOT_USED`, `DEACTIVE`, `ACTIVE`, `RELEASED` |
└ outside_rth | string | Optional | Enable or disable outside regular trading hours, Default is `UnknownOutsideRth` when the order is not a US stock. **Enum Value:**, `RTH_ONLY` - Regular trading hour only, `ANY_TIME` - Any time, `OVERNIGHT` - Overnight" |
└ currency | string | Optional | Currency |
└ limit_depth_level | integer | Optional | Specifies the bid/ask depth level |
└ trigger_count | integer | Optional | Number of triggers |
└ trigger_qty_type | integer | Optional | Trigger quantity type. |
└ attached_orders | array | Optional | List of attached order details |
└ last_done | string | Optional | Last done. when the order is not filled, value is empty string |
└ msg | string | Optional | Rejected message or remark, default value is empty string. |
└ trailing_amount | string | Optional | `TSLPAMT` order trailing amount. When the order is not `TSLPAMT` order, value is empty string |
└ trailing_percent | string | Optional | `TSLPPCT` order trailing percent. When the order is not `TSLPPCT` order, value is empty string |
└ limit_offset | string | Optional | `TSLPPCT` order limit offset amount. When the order is not `TSLPPCT` order, value is empty string |
└ remark | string | Optional | Remark |
└ monitor_price | string | Optional | Monitoring price |
└ monitor_counter_id | string | Optional | Internal ID of the monitored security (conditional orders). |
└ multi_leg | string | Optional | Multi-leg strategy information. Only returned for multi-leg option combination orders; otherwise not returned. |
has_more | boolean | Optional | has more orders record. The maximum number of orders per query is 1000, if the number of results exceeds 1000, then has_more will be true |
Response JSON example
{
"code": 0,
"message": "success",
"data": {
"orders": [
{
"currency": "HKD",
"executed_price": "0.000",
"executed_quantity": "0",
"expire_date": "",
"last_done": "",
"limit_offset": "",
"msg": "",
"order_id": "706388312699592704",
"order_type": "ELO",
"outside_rth": "UnknownOutsideRth",
"price": "11.900",
"quantity": "200",
"side": "Buy",
"status": "RejectedStatus",
"stock_name": "Bank of East Asia Ltd/The",
"submitted_at": "1651644897",
"symbol": "23.HK",
"tag": "Normal",
"time_in_force": "Day",
"trailing_amount": "",
"trailing_percent": "",
"trigger_at": "0",
"trigger_price": "",
"trigger_status": "NOT_USED",
"updated_at": "1651644898",
"remark": "",
"limit_depth_level": 0,
"monitor_price": "",
"trigger_count": 1,
"attached_orders": [
{
"order_id": "706388312699592705",
"attached_type_display": 2,
"trigger_price": "10.500",
"quantity": "200",
"executed_qty": "0",
"status": "NewStatus",
"updated_at": "1651644898",
"withdrawn": false,
"gtd": "",
"time_in_force": "Day",
"counter_id": "",
"trigger_status": 0,
"executed_amount": "0",
"tag": 0,
"submitted_at": "1651644897",
"executed_price": "0.000",
"force_only_rth": "RTH_ONLY",
"reviewed": false,
"activate_order_type": "MIT",
"activate_rth": "RTH_ONLY",
"submit_price": ""
}
],
"multi_leg": {
"strategy": "2",
"strategy_name": "Vertical spread",
"multileg_id": "Spread_QQQ20260731C764/767",
"code": "QQQ 260731 764/767 Vertical spread",
"legs": [
{
"symbol": "QQQ260731C764000.US",
"side": "Buy",
"position": "LONG",
"ratio_quantity": "1",
"strike_price": "764",
"expire_date": "20260731",
"contract_direction": "C"
},
{
"symbol": "QQQ260731C767000.US",
"side": "Sell",
"position": "SHORT",
"ratio_quantity": "1",
"strike_price": "767",
"expire_date": "20260731",
"contract_direction": "C"
}
]
}
}
]
}
}Error code
See the Error Codes page for the full list of error codes.