Skip to main content
GET
Funding payments per market per bucket

When to use

user-funding quantifies the carry leg of an address’s perp strategy. Every perp position pays or receives funding at each funding interval (HL: 1 hour). Holding a long during a positive funding regime means paying; holding a short means receiving (and vice versa). Use this endpoint to:
  • Compute total funding income / expense for a given window
  • Compare funding P&L vs trading P&L for a market maker
  • Backtest a funding-arb strategy
For raw per-event funding rate data (market-wide, not per-address), use /v1/funding.

Conventions

  • funding_payment is signed: positive = received, negative = paid (matches HL’s userFunding.delta.usdc and dYdX v4 fundingPayments.payment).
  • bucket=1h matches HL’s native funding interval — one row per funding event.
  • bucket=1d aggregates 24 hourly intervals into one daily row; interval_count carries the number of intervals rolled up.
  • bucket=raw is currently equivalent to 1h; reserved for future sub-hour intervals if HL ever ships them.

Compute basis

funding_payment is derived from fills (the address’s running position) joined against funding_rates (the market’s hourly rate) at each funding interval. No information is read from a separate HL endpoint — this is computed entirely from the data we already ingest, which means accuracy depends on the address having complete fill coverage in our window.

Example

Authorizations

Authorization
string
header
required

Ironflow API key, format if_xxxx. Free keys at https://ironflow.sh/key. Optional on read endpoints.

Query Parameters

address
string

Wallet address filter (hex string, e.g. 0xabc123).

Example:

"0xabc123def456"

market
string

Market symbol (e.g. BTC-PERP, ETH-PERP). Omit to query all markets.

Example:

"BTC-PERP"

from
integer<int64>

Start time as Unix milliseconds. Defaults to 24 hours ago. Clamped to tier history window. On /v1/trades and /v1/fills, the time range (to - from) is limited per tier (no key 1h, free key 6h, Explorer 24h, Builder 7d, Enterprise unlimited; without market filter 4h for all tiers). Returns QUERY_WINDOW_EXCEEDED (400) if exceeded — paginate with narrower from/to windows.

Example:

1718313600000

to
integer<int64>

End time as Unix milliseconds. Defaults to now.

Example:

1718400000000

bucket
enum<string>
default:1d
Available options:
1h,
1d,
raw

Response

Funding payments aggregated per the chosen bucket.

address
string
from
integer<int64>
to
integer<int64>
bucket
enum<string>
Available options:
1h,
1d,
raw
data
object[]