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 query execution (fill) records, including both buy and sell records. It supports querying today's and historical executions at the same time.
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Optional | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
order_id | string | Optional | Order ID, example: `701276261045858304` |
start_at | string | Optional | Start time, formatted as a timestamp (second), example: `1650410999`. If the start time is null, the default is the 90 days before of the end time or 90 days before of the current time |
end_at | string | Optional | End time, formatted as a timestamp (second), example: `1650410999`. If the end time is null, the default is the current time or 90 days after of the start time |
page | integer | Optional | Page number, starting from `1`. The maximum number of records per query is 1000. If the number of results exceeds 1000, `has_more` will be `true`, use `page` together with `has_more` to paginate. |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
trades | object[] | Optional | Execution Detail |
└ trade_id | string | Optional | Execution ID |
└ order_id | string | Optional | Order ID |
└ symbol | string | Optional | Stock symbol, use `ticker.region` format,example: `AAPL.US` |
└ price | string | Optional | Executed price |
└ quantity | string | Optional | Executed quantity |
└ trade_done_at | string | Optional | Trade done time, formatted as a timestamp (second) |
└ side | string | Optional | Trade side. **Enum Value:**, `Buy`, `Sell` |
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": {
"has_more": false,
"trades": [
{
"order_id": "693664675163312128",
"price": "388",
"quantity": "100",
"symbol": "700.HK",
"trade_done_at": "1648611351",
"trade_id": "693664675163312128-1648611351433741210",
"side": "Buy"
}
]
}
}Error code
See the Error Codes page for the full list of error codes.