Backtesting

Get Hl Funding Bars

Hyperliquid funding and open interest aligned to the candle clock — one row per closed bar per coin, so a funding/OI condition can be tested against the same 4h bar a price signal fires on.

time is the bar open and equals the timestamp of the matching /hyperliquid/candles bar (join on it). Per bar: funding_sum (carry actually settled in (time, time + interval] — a settlement at 16:00 pays for the hour before it, so it belongs to the bar that closes at 16:00) with n_settlements; funding_rate_mean (mean live hourly rate over the bar); oi_open / oi_close / oi_change_pct (base-coin units, first and last 5-min sample in the bar) and mark_close.

Point-in-time: every value was observable by the bar's close — act on it at the NEXT bar's open. Bars start where our 5-min snapshots do (2026-03-30; see coverage) — Hyperliquid publishes no historical OI, so nothing earlier can exist; older settled funding alone is /backtesting/funding? grain=hourly. funding_sum is null for the most recent day until its prints are archived. Window ≤ 93 days per call. Pro Plus.

get/api/v1/backtesting/hl-funding-bars

Request

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

Query parameters

coinstring required

One HL coin name (BTC, kPEPE) or a comma list (up to 25; every value rides the index).

intervalstring

Bar width: 1h, 4h or 1d — the same UTC grid as /hyperliquid/candles

startstring required

Start time (ISO 8601 or unix ms); floored to the interval

endstring

End time (ISO 8601 or unix ms, defaults to now); floored to the interval, EXCLUSIVE

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
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
coinstring required
intervalstring required
countinteger required
joinobject required

Changes

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