Cursor pagination
These endpoints return trades a page at a time, newest first:GET /v1/tokens/{chain}/{address}/tradesGET /v1/trades
Parameters
Response
Read every page
Rules
- Treat the cursor as opaque. Do not build, change or store meaning in it. Send back exactly what you received.
- Pages do not shift. The cursor marks a position in the list, not an offset. New trades that arrive while you page do not duplicate or skip results.
- A bad cursor is refused. A cursor the API cannot read returns
400 VALIDATION_ERRORon thecursorfield. It never silently restarts from the first page. - An unknown token returns an empty page, not a
404.
Paging through candles
GET /v1/tokens/{chain}/{address}/ohlcv returns candles oldest first, and has no cursor. Choose the range with these parameters:
With neither
countBack nor from, the response holds the latest 500 candles. A window that holds more than 5,000 candles keeps the newest 5,000.
To read further back, repeat the request with to set to the time of the oldest candle you received:
to is exclusive, the oldest candle of the previous page is not repeated.