- Envelope cursor — most list endpoints (e.g.
GET /v2/yield/opportunities) return paging state insidemeta: an opaquecursorplus ahas_moreboolean. - Replay cursor — the event replay endpoint (
GET /v2/events/replay) walks forward by event ID and signals the end with an emptynext_cursor.
Envelope cursor (meta.cursor + meta.has_more)
GET /v2/yield/opportunities is the reference example. The response wraps its rows in the standard envelope and carries paging state in meta:
Page size
Set the page size withpage[limit]. For /v2/yield/opportunities the default is 50 and the maximum is 200; a value above the maximum is clamped down rather than rejected. Page-size defaults and caps vary by endpoint — the Endpoints group in the sidebar documents each one. Request the next page by passing page[cursor] set to the previous response’s meta.cursor.
Other list families that use the envelope cursor (for example point-in-time snapshots) expose the same
cursor / has_more pair in meta. The field names are identical; only the per-endpoint limit default and cap differ.Loop until has_more is false
Keep fetching while meta.has_more is true, feeding meta.cursor back as page[cursor] each time:
Each page counts as one request against your rate limit. Use the largest
limit the endpoint allows to minimize round-trips, and watch X-RateLimit-Remaining to throttle before you hit 429.Replay cursor (next_cursor)
GET /v2/events/replay recovers events you missed during a WebSocket disconnect. It is cursor-based on event ID — not timestamp ranges. Walk forward by passing the last event’s ID as since_event_id, and stop when next_cursor comes back empty.
The replay window is tier-gated. A cursor older than your tier’s window returns
410 REPLAY_WINDOW_EXPIRED, and the Free tier — which has no replay window — returns 404 REPLAY_NOT_AVAILABLE. Per-tier replay windows are in Rate limits & tiers.
The response keeps its fields at the top level (it is not wrapped under data/meta):
Loop until next_cursor is empty
Pass next_cursor back as since_event_id until it comes back empty:
Replay is for recovery, not for live streaming. For ongoing updates, subscribe over WebSockets or webhooks and use replay only to backfill the gap after a reconnect.
Filtering
Filters narrow a list before it’s paged. The set below is whatGET /v2/yield/opportunities accepts — other endpoints expose their own filters, documented in the Endpoints group. Filter parameters use the filter[...] bracket form; comma-separate values for the multi-value filters.
Filters apply before pagination, so
meta.total reflects the filtered set, not the whole catalog. Apply the same filters on every page of a paging loop — changing them mid-loop invalidates the cursor.Sorting
GET /v2/yield/opportunities accepts a single sort parameter. Prefix the field with - for descending order. The default sort is -tvlUsd (largest TVL first).
sort (and filters) across the loop.
See also
API reference overview
Base URL, auth, and the response envelope.
Rate limits & tiers
Per-tier request rates, quotas, and replay windows.
Errors
The standard error envelope and status codes.
Webhooks
Push delivery for live events.