OrdersService
Get User Trades
Retrieve per-user fills with account-bound keyset pagination. orderId selects one physical order; lineageId selects the logical order across replacements. These filters are mutually exclusive. Execution and order-state projections are eventually consistent.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/spot/trades?afterMatchId=100001&endTime=1735689600000000000&includeTransfers=false&limit=100&orderId=9876543210123&pageToken=eyJvZmZzZXQiOjEwMH0&side=BUY&startTime=1735689600000000000&subaccountId=6789012345678&symbol=BTC-USDT&throughGeneration=1' \ --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": "0.005",
"qty": "100000",
"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.
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 in quote units scaled by 1e9.
0.005Executed quantity scaled by the pair's base_quantity_scale from GetSpotConfig for symbol_id.
100000Exact 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 | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |