Account
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=. |
Get P&L breakdown grouped by market (US, HK, CN, SG).
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
start_date | string | Optional | Analysis start date in `YYYY-MM-DD` format |
end_date | string | Optional | Analysis end date in `YYYY-MM-DD` format |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
has_more | boolean | Optional | Whether there are more pages |
profit | string | Optional | Total profit/loss |
stock_items | object[] | Optional | P&L breakdown by stock |
└ code | string | Optional | Stock code |
└ market | string | Optional | Market code |
└ name | string | Optional | Stock name |
└ profit | string | Optional | Profit/loss for this stock |
Response JSON example
{
"code": 0,
"message": "success",
"data": {
"has_more": false,
"profit": "-16325.26",
"stock_items": [
{
"code": "AAPL",
"market": "US",
"name": "Apple",
"profit": "100.00"
}
]
}
}Error code
See the Error Codes page for the full list of error codes.