Backtesting

Get Funding

Historical funding — the 5-minute rate snapshots (with OI / mark) or, with grain=hourly, the settled hourly Hyperliquid payments.

Read grain on the response before aggregating: the default rows sample the live hourly rate ~12 times per settlement, so summing them overstates carry ~12x. The honest daily carry from the snapshot series is mean(funding_rate) x 24; the exact figure is sum(funding_rate) over the grain=hourly rows. coverage gives local retention for the symbol; next_cursor / has_more page the window.

get/api/v1/backtesting/funding

Request

  • Base URL: https://cryptodataapi.com
  • URL: https://cryptodataapi.com/api/v1/backtesting/funding
  • Auth: API key in header X-API-Key

Query parameters

symbolstring required

Symbol, e.g. BTC or BTCUSDT

exchangestring

binance or hyperliquid

startstring required

Start time (ISO 8601 or unix ms)

endstring

End time (ISO 8601 or unix ms, defaults to now). EXCLUSIVE — the range is [start, end), so consecutive windows do not repeat a boundary row.

boundsstring

Interval convention for start/end. half-open (default) is [start, end) — end is EXCLUSIVE, so consecutive windows tile without repeating a boundary row. closed is [start, end] — end INCLUSIVE, the pre-2026-08-08 behaviour; use it only to keep an existing integration byte-identical.

limitinteger
grainstring

snapshot_5m (default): the LIVE rate sampled every 5 minutes, plus open interest and mark — a rate series, NOT payments; do not sum it. hourly: one row per settled Hyperliquid funding print (HL fundingHistory, the carry actually paid), with premium; hyperliquid only, filled daily for the previous UTC day.

cursorstring nullable

Opaque page cursor — the next_cursor of the previous response, verbatim. Resumes strictly after the last row served, keyed on the table's full primary key, so a page boundary inside a same-millisecond burst loses nothing (unlike start = last.time + 1). start / end still bound the window.

formatstring

json or csv. CSV has no envelope: paging state travels in the X-Has-More / X-Next-Cursor response headers.

Response

Successful Response

next_cursorstring nullable
has_moreboolean
symbolstring required
exchangestring required
countinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.