CoinWorldCap Developer Support Request a key

Derivatives history

GET https://open-api.coinworldcap.com/openapi/v1/derivatives/history

One crypto asset's perpetual funding rate, open interest and basis over time, all three in each point, by day or by hour.

Query parameters

Response

Fields

Field Type Notes
id, interval number, string What you asked for
points[].time string RFC3339 UTC: the start of the hour, or midnight for a day
points[].open_interest_usd string or null Summed over the asset's perpetual contracts on the exchanges we collect
points[].funding_rate, points[].index_basis string or null Averaged over those contracts, weighted by their open interest. A contract whose basis is beyond a sanity cap is left out of the basis average only

Each value is null when no contract had one in the period. Only perpetual contracts count, and the contracts that count are chosen as on our website's charts. A daily point takes each value at the last hour of the day that has it. New points arrive every hour, and the newest ones can still be revised for a while after; today's daily point appears once the day is over. Where this history starts is in Data methodology.

Examples

bash
# Bitcoin's newest hourly funding rate, open interest and basis
curl -H "X-Api-Key: <your-api-key>" \
  "https://open-api.coinworldcap.com/openapi/v1/derivatives/history?id=1&interval=1h"
HTTP status code When
400 40000 id missing or not a positive integer; a parameter the shared history rules refuse
404 40400 No crypto asset with that id — it does not exist, or it is an RWA's id. An asset without perpetuals answers 200 with points: []

There is no metric parameter: every point carries all three values. The other errors are in Errors.