userFunding | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', user: '<string>', startTime: 123, endTime: 123})
};
fetch('https://hypercore.goldrushdata.com/info', 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://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'user' => '<string>',
'startTime' => 123,
'endTime' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}"
response = http.request(request)
puts response.read_body{
"time": 123,
"hash": "<string>",
"delta": {
"type": "<string>",
"coin": "<string>",
"usdc": "<string>",
"szi": "<string>",
"fundingRate": "<string>",
"nSamples": {}
}
}Info API
userFunding | Hyperliquid Info API
Hyperliquid userFunding: fetch a user’s per-coin funding payment history within a time window for funding-only P&L attribution.
POST
/
info
userFunding | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', user: '<string>', startTime: 123, endTime: 123})
};
fetch('https://hypercore.goldrushdata.com/info', 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://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'user' => '<string>',
'startTime' => 123,
'endTime' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123\n}"
response = http.request(request)
puts response.read_body{
"time": 123,
"hash": "<string>",
"delta": {
"type": "<string>",
"coin": "<string>",
"usdc": "<string>",
"szi": "<string>",
"fundingRate": "<string>",
"nSamples": {}
}
}Credit Cost
1 per call
Processing
Realtime
type: "userFunding" is used to fetch a user’s per-coin funding payment history within a time window for funding-only P&L attribution.
Estimate your monthly cost for this API using the Pricing Calculator.
- Wire-equal to
POST api.hyperliquid.xyz/infowith{"type": "userFunding", "user": "..."}. - Use
userNonFundingLedgerUpdatesfor deposits, withdrawals, transfers, vault flows, liquidations, and other balance-moving events.
[startTime, endTime) window. Each entry is one funding application: a coin, the rate that was applied, the position size at the time, and the resulting USDC delta (negative = paid, positive = received).
User-keyed. Use this for funding-only P&L attribution; use userNonFundingLedgerUpdates for everything else.
Endpoint
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
Request
string
required
Always
"userFunding".string
required
The wallet address (lowercase 0x-prefixed hex).
int
Unix timestamp in milliseconds. Inclusive lower bound for the window.
int
Unix timestamp in milliseconds. Inclusive upper bound. Defaults to current server time when omitted.
Example
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "userFunding",
"user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
"startTime": 1735689600000,
"endTime": 1735776000000
}'
const response = await fetch("https://hypercore.goldrushdata.com/info", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "userFunding",
user: "0x31ca8395cf837de08b24da3f660e77761dfb974b",
startTime: 1735689600000,
endTime: 1735776000000,
}),
});
const events = await response.json();
import os, requests
response = requests.post(
"https://hypercore.goldrushdata.com/info",
headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
json={
"type": "userFunding",
"user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
"startTime": 1735689600000,
"endTime": 1735776000000,
},
)
events = response.json()
Response
An array of funding event objects, one per applied funding interval and coin.[
{
"time": 1735689600000,
"hash": "0x6b9c0a4a3d54b0d4d6b1a0c4d8c9e7f2b6e5d3c2a1f0e9d8c7b6a5f4e3d2c1b0a",
"delta": {
"type": "funding",
"coin": "BTC",
"usdc": "-50.25",
"szi": "1.5",
"fundingRate": "0.0001",
"nSamples": null
}
}
]
Field descriptions
All numeric
delta fields are returned as decimal strings. Do not parse them as floats - keep them as strings or use a fixed-precision decimal type.int
Unix timestamp in milliseconds when the funding payment was applied.
string
L1 transaction hash that included the funding application.
object
Funding-event payload.
Show properties
Show properties
string
Always
"funding" for entries returned by this endpoint.string
Asset symbol the funding rate applied to.
string
USDC delta credited to or debited from the account. Negative values are paid, positive values are received.
string
Signed position size at the time of application (positive = long, negative = short).
string
The funding rate applied (decimal string, e.g.
"0.0001" for 1 bp).int | null
Optional - number of samples used by the upstream funding calculation. May be
null.Related endpoints
userNonFundingLedgerUpdates
fetch a user’s non-funding USDC ledger history (deposits, withdrawals, transfers, vault flows) within a time window.
userBorrowLendInterest
fetch a user’s borrow/lend interest accrual history.
userFills
fetch a user’s most recent trade fills without specifying a time window.
userFillsByTime
fetch a user’s trade fills within a time window for P&L recaps and tax ledger reconstruction.