OrdersService
Get User Trades
Retrieve per-user fills with account-bound keyset pagination. Omit optional filters to list the authenticated account's fills. orderId selects one physical order; lineageId selects the logical order across replacements. These filters are mutually exclusive. throughGeneration requires lineageId. Execution and order-state projections are eventually consistent.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/spot/trades?endTime=2025-01-01T00%3A00%3A00Z&includeTransfers=false&limit=100&side=BUY&startTime=2025-01-01T00%3A00%3A00Z&subaccountId=45LUmqjT' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"nextPageToken": "eyJvZmZzZXQiOjIwMH0",
"trades": [
{
"executedAt": "2025-01-01T00:00:00Z",
"fee": "18.446744073709551617",
"feeAsset": "QUOTE",
"feeIsRebate": false,
"isMaker": false,
"lineage": {
"generation": 1,
"id": "2"
},
"matchId": "100001",
"orderId": "5USXJZmk",
"price": "61000.25",
"qty": "0.001",
"referralShare": "18.446744073709551617",
"side": "BUY",
"symbol": "BTC-USDT"
}
],
"transfers": [
{
"account": "FUNDING",
"asset": "100",
"isDebit": false,
"matchId": "100001",
"symbolId": 1,
"timestamp": "2025-01-01T00:00:00Z",
"transferCode": "DEPOSIT",
"txId": "0xabc123"
}
]
}Return only durable fills after this per-symbol match ID. Requires symbol.
Include settlement legs linked to matches on this page.
Logical order ID shared by accepted replacements; mutually exclusive with orderId.
Exact physical order ID; mutually exclusive with lineageId.
Inclusive generation ceiling; requires lineageId.
Opaque cursor for the next page. Empty when no more results exist.
eyJvZmZzZXQiOjIwMH0Execution timestamp in nanoseconds since epoch.
2025-01-01T00:00:00ZExact fee magnitude in fixed 18-decimal units of fee_asset.
18.446744073709551617Fee asset charged or credited for this fill.
QUOTEWhether this fill earned a rebate instead of paying a fee.
falseTrue if this fill was maker-side.
falseOne-based replacement generation, distinct from per-order state version.
1Stable logical-order ID: the first generation's public order ID. Replace preserves this ID; an independent new order starts a new lineage.
2Match identifier (monotonic per symbol).
100001Order identifier as fixed64.
5USXJZmkExecution price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
61000.25Executed quantity as a decimal string in base asset units, for example '0.001'.
0.001Exact referral share magnitude in fixed 18-decimal units of fee_asset.
18.446744073709551617Fill side.
BUYTrading symbol numeric identifier.
BTC-USDTAccount bucket affected by this transfer leg.
FUNDINGAsset identifier for the transferred asset.
100True when the transfer debits the account; false when it credits the account.
falseMatch identifier that linked this transfer to an execution, scoped by symbol_id.
100001Market of the execution; together with match_id identifies its match.
1Transfer timestamp in nanoseconds since epoch (UTC).
2025-01-01T00:00:00ZProduct reason for this transfer leg.
DEPOSITTransfer transaction identifier.
0xabc123| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |