MarketDataService
Get Trades
Retrieve recent public trades for a spot symbol, ordered newest first. Supports optional aggressor side, inclusive time-range, and opaque page-token pagination filters.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/spot/markets/BTC-USDT/trades?endTime=2025-01-01T00%3A00%3A00Z&limit=100&pageToken=eyJvZmZzZXQiOjEwMH0&side=BUY&startTime=2025-01-01T00%3A00%3A00Z' \ --header 'Accept: */*'
Responses
{
"nextPageToken": "eyJvZmZzZXQiOjIwMH0",
"trades": [
{
"executedAt": "2025-01-01T00:00:00Z",
"matchId": "100001",
"price": "0.005",
"qty": "100000",
"side": "BUY",
"symbol": "BTC-USDT"
}
]
}Trading pair symbol, e.g. BTC-USDT
Filter trades executed at or before this time (inclusive, RFC3339)
Maximum trades to return. Default 100, max 1000.
Opaque cursor from the previous response.
Filter by aggressor side. BUY means the taker bought the base asset; SELL means the taker sold the base asset.
Filter trades executed at or after this time (inclusive, RFC3339)
Opaque cursor for the next page. Empty when no more results exist.
eyJvZmZzZXQiOjIwMH0Trade execution timestamp, in nanoseconds since the Unix epoch (UTC).
2025-01-01T00:00:00ZStable trade id within the symbol, suitable for pagination and de-duplication.
100001Trade price in quote-asset units scaled by 1e9.
0.005Traded base-asset quantity scaled by the pair's base_quantity_scale from GetSpotConfig.
100000True when the taker/aggressor bought the base asset; false when the taker/aggressor sold the base asset.
BUYStable numeric pair id from GetSpotConfig.
BTC-USDT| 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. |