Get started

Pagination

The list endpoints (assets, markets, funding gaps) return every row by default, or pages when you set limit.

Parameters

FieldMeaning
limitrows per page, 1 to 1,000; without it every row comes back
offsetrows to skip, from 0

Response fields

FieldMeaning
countrows in this page
totalrows across all pages
offset, limitthis page's start and size
nextthe full URL of the next page, null on the last

Follow next rather than computing offsets. Pages are cut from one snapshot in the endpoint's sort order; the data refreshes every few seconds, so a long walk may span two snapshots. Read the whole list in one request (no limit) when you need a single consistent view.

Example

Python
import requests

url = "https://optimistfi.com/api/perps/assets?sort=volume&limit=200"
rows = []
while url:
    page = requests.get(url, timeout=30).json()
    rows += page["data"]
    url = page["next"]

Dataset windows

The historical dataset pages by time instead: each request covers a window set by from and to, at most 92 days of hourly history or 366 days of funding. Walk longer spans window by window.

ScoutJUST THIS STORY

LET’S MAKE THIS USEFUL · 1 OF 5

How would you like me to explain this?

Tell me what you want from this read. Start with a quick note, then adjust the details. Your other stories stay as they are.

We’ll remember your view of this story. The published article stays unchanged.

THIS STORY’S READING VIEWStandard · The whole picture

Clear explanations with context. Both sides of the evidence.