Funding payments per market per bucket
curl --request GET \
--url https://api.ironflow.sh/v1/analytics/user-funding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ironflow.sh/v1/analytics/user-funding"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ironflow.sh/v1/analytics/user-funding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ironflow.sh/v1/analytics/user-funding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ironflow.sh/v1/analytics/user-funding"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ironflow.sh/v1/analytics/user-funding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ironflow.sh/v1/analytics/user-funding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"from": 123,
"to": 123,
"bucket": "1h",
"data": [
{
"bucket_start": 1779302400000,
"market": "BTC-PERP",
"market_class": "perp",
"funding_payment": 5.23,
"avg_position": 0.1,
"avg_funding_rate": 0.0000125,
"interval_count": 24
}
]
}{
"error": {
"code": "QUERY_WINDOW_EXCEEDED",
"message": "query time range exceeds maximum 24h0m0s per request for your tier — narrow your from/to window and paginate"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "HISTORY_OUT_OF_RANGE",
"message": "this range ends 2025-11-15 00:00 UTC, before your Builder plan's history: it covers the last 365 days, from 2025-11-20. Pro covers every fill since 25 May 2025: https://ironflow.sh/upgrade?utm_source=api&plan=pro&limit=history for $499 per 30 days or buy Pro in one call with this key: POST https://api.ironflow.sh/v1/billing/buy {\"plan\":\"pro\"}. Send from=1763596800000 (allowed_from) or later, or leave from and to out for the latest rows.",
"allowed_from": 1763596800000,
"upgrade": {
"plan": "pro",
"price_usdc": 499,
"days": 30,
"unlocks": "every fill since May 2025 with no history cutoff",
"limit": "history",
"lifts": "365 days of history now, every fill since 25 May 2025 on Pro",
"covers": "every fill since 25 May 2025",
"your_plan_covers": "the last 365 days, from 2025-11-20",
"url": "https://ironflow.sh/upgrade?utm_source=api&plan=pro&limit=history",
"how": "POST https://api.ironflow.sh/v1/billing/upgrade with your email, wallet, plan and network, then send the USDC",
"buy": {
"call": "POST https://api.ironflow.sh/v1/billing/buy",
"body": {
"plan": "pro"
},
"price_usdc": 499
}
}
}
}{
"error": {
"code": "TIER_FORBIDDEN",
"message": "Export requires Builder tier or above"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}{
"error": {
"code": "QUERY_TIMEOUT",
"message": "query took too long — narrow your time range, add a market filter, or reduce the limit"
}
}Wallet Analytics
Hyperliquid funding payments by address
GET /v1/analytics/user-funding returns a Hyperliquid address’s funding payments per market and day or hour, from Hyperliquid’s ledger, native and HIP-3.
GET
/
v1
/
analytics
/
user-funding
Funding payments per market per bucket
curl --request GET \
--url https://api.ironflow.sh/v1/analytics/user-funding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ironflow.sh/v1/analytics/user-funding"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ironflow.sh/v1/analytics/user-funding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ironflow.sh/v1/analytics/user-funding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ironflow.sh/v1/analytics/user-funding"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ironflow.sh/v1/analytics/user-funding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ironflow.sh/v1/analytics/user-funding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"from": 123,
"to": 123,
"bucket": "1h",
"data": [
{
"bucket_start": 1779302400000,
"market": "BTC-PERP",
"market_class": "perp",
"funding_payment": 5.23,
"avg_position": 0.1,
"avg_funding_rate": 0.0000125,
"interval_count": 24
}
]
}{
"error": {
"code": "QUERY_WINDOW_EXCEEDED",
"message": "query time range exceeds maximum 24h0m0s per request for your tier — narrow your from/to window and paginate"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "HISTORY_OUT_OF_RANGE",
"message": "this range ends 2025-11-15 00:00 UTC, before your Builder plan's history: it covers the last 365 days, from 2025-11-20. Pro covers every fill since 25 May 2025: https://ironflow.sh/upgrade?utm_source=api&plan=pro&limit=history for $499 per 30 days or buy Pro in one call with this key: POST https://api.ironflow.sh/v1/billing/buy {\"plan\":\"pro\"}. Send from=1763596800000 (allowed_from) or later, or leave from and to out for the latest rows.",
"allowed_from": 1763596800000,
"upgrade": {
"plan": "pro",
"price_usdc": 499,
"days": 30,
"unlocks": "every fill since May 2025 with no history cutoff",
"limit": "history",
"lifts": "365 days of history now, every fill since 25 May 2025 on Pro",
"covers": "every fill since 25 May 2025",
"your_plan_covers": "the last 365 days, from 2025-11-20",
"url": "https://ironflow.sh/upgrade?utm_source=api&plan=pro&limit=history",
"how": "POST https://api.ironflow.sh/v1/billing/upgrade with your email, wallet, plan and network, then send the USDC",
"buy": {
"call": "POST https://api.ironflow.sh/v1/billing/buy",
"body": {
"plan": "pro"
},
"price_usdc": 499
}
}
}
}{
"error": {
"code": "TIER_FORBIDDEN",
"message": "Export requires Builder tier or above"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}{
"error": {
"code": "QUERY_TIMEOUT",
"message": "query took too long — narrow your time range, add a market filter, or reduce the limit"
}
}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
/v1/funding.
Conventions
funding_paymentis signed: positive = received, negative = paid (matches HL’suserFunding.delta.usdcand dYdX v4fundingPayments.payment).bucket=1hmatches HL’s native funding interval — one row per funding event.bucket=1daggregates 24 hourly intervals into one daily row;interval_countcarries the number of intervals rolled up.bucket=rawreturns each payment with its exact settlement time.- At most 10,000 rows, newest first. For long windows on a wallet with
many markets, use
bucket=1dor narrowfromandto.
Source
Every row is a payment from Hyperliquid’s own funding ledger, the same rows itsuserFunding API returns: we record each hourly funding
settlement from our own nodes, one entry per wallet and market. Amounts,
position sizes and rates are exact, not estimated, and cover native and
HIP-3 perps.
Many wallets at once
For cohorts, leaderboards or totals across wallets, queryhl.funding_payments with SQL through POST /v1/query. It
holds one row per wallet, market and hour:
SELECT market, round(sum(payment), 2) AS net_funding_usdc
FROM hl.funding_payments
WHERE address = '0x...' AND ts >= now() - INTERVAL 30 DAY
GROUP BY market ORDER BY net_funding_usdc
Example
curl -H "Authorization: Bearer $IRONFLOW_API_KEY" \
"https://api.ironflow.sh/v1/analytics/user-funding?address=0x0c684f...&from=$(date -u -v-7d +%s)000&to=$(date -u +%s)000&bucket=1d"
Authorizations
Ironflow API key, format if_xxxx. Free keys at https://ironflow.sh/key. Optional on read endpoints.
Query Parameters
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