> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

<CardGroup cols={2}>
  <Card title="Credit Cost"> 1 per call</Card>
  <Card title="Processing"> Realtime</Card>
</CardGroup>

The Hyperliquid info endpoint with `type: "userFunding"` is used to fetch a user's per-coin funding payment history within a time window for funding-only P\&L attribution.

<Tip>
  Estimate your monthly cost for this API using the [Pricing Calculator](/pricing-calculator?endpoint=%2Fapi-reference%2Fhyperliquid-info%2Fuser-funding).
</Tip>

<Info>
  * Wire-equal to `POST api.hyperliquid.xyz/info` with `{"type": "userFunding", "user": "..."}`.
  * For real-time push, subscribe to <a href="https://goldrush.dev/docs/api-reference/streaming-api/subscriptions/wallet-activity-stream" target="_blank" rel="noopener noreferrer">`walletTxs`</a> and read <a href="https://goldrush.dev/docs/api-reference/streaming-api/types/hypercore-funding-event" target="_blank" rel="noopener noreferrer">`HypercoreFundingEvent`</a> entries.
  * Use <a href="https://goldrush.dev/docs/api-reference/hyperliquid/user-non-funding-ledger-updates" target="_blank" rel="noopener noreferrer">`userNonFundingLedgerUpdates`</a> for deposits, withdrawals, transfers, vault flows, liquidations, and other balance-moving events.
</Info>

Returns a single user’s funding payment history within a `[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](https://goldrush.dev/docs/api-reference/hyperliquid/user-non-funding-ledger-updates) for everything else.

## Endpoint

```
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
```

## Request

<ParamField body="type" type="string" required>
  Always `"userFunding"`.
</ParamField>

<ParamField body="user" type="string" required>
  The wallet address (lowercase 0x-prefixed hex).
</ParamField>

<ParamField body="startTime" type="int">
  Unix timestamp in milliseconds. Inclusive lower bound for the window.
</ParamField>

<ParamField body="endTime" type="int">
  Unix timestamp in milliseconds. Inclusive upper bound. Defaults to current server time when omitted.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  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
    }'
  ```

  ```typescript TypeScript theme={null}
  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();
  ```

  ```python Python theme={null}
  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()
  ```
</CodeGroup>

## Response

An array of funding event objects, one per applied funding interval and coin.

```json theme={null}
[
  {
    "time": 1735689600000,
    "hash": "0x6b9c0a4a3d54b0d4d6b1a0c4d8c9e7f2b6e5d3c2a1f0e9d8c7b6a5f4e3d2c1b0a",
    "delta": {
      "type": "funding",
      "coin": "BTC",
      "usdc": "-50.25",
      "szi": "1.5",
      "fundingRate": "0.0001",
      "nSamples": null
    }
  }
]
```

### Field descriptions

<Note>
  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.
</Note>

<ResponseField name="time" type="int">Unix timestamp in milliseconds when the funding payment was applied.</ResponseField>
<ResponseField name="hash" type="string">L1 transaction hash that included the funding application.</ResponseField>

<ResponseField name="delta" type="object">
  Funding-event payload.

  <Expandable title="properties">
    <ResponseField name="type" type="string">Always `"funding"` for entries returned by this endpoint.</ResponseField>
    <ResponseField name="coin" type="string">Asset symbol the funding rate applied to.</ResponseField>
    <ResponseField name="usdc" type="string">USDC delta credited to or debited from the account. Negative values are paid, positive values are received.</ResponseField>
    <ResponseField name="szi" type="string">Signed position size at the time of application (positive = long, negative = short).</ResponseField>
    <ResponseField name="fundingRate" type="string">The funding rate applied (decimal string, e.g. `"0.0001"` for 1 bp).</ResponseField>
    <ResponseField name="nSamples" type="int | null">Optional - number of samples used by the upstream funding calculation. May be `null`.</ResponseField>
  </Expandable>
</ResponseField>

## Related endpoints

<CardGroup cols={2}>
  <Card title="userNonFundingLedgerUpdates" href="/api-reference/hyperliquid-info/user-non-funding-ledger-updates">fetch a user's non-funding USDC ledger history (deposits, withdrawals, transfers, vault flows) within a time…</Card>
  <Card title="fundingHistory" href="/api-reference/hyperliquid-info/funding-history">fetch a coin’s historical funding rates and premiums over a time window for funding analytics and basis…</Card>
  <Card title="userFills" href="/api-reference/hyperliquid-info/user-fills">fetch a user's most recent trade fills without specifying a time window.</Card>
  <Card title="userFillsByTime" href="/api-reference/hyperliquid-info/user-fills-by-time">fetch a user’s trade fills within a time window for P\&L recaps and tax ledger reconstruction.</Card>
</CardGroup>

*Last reviewed: 2026-06-13*
