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

# userFunding | Hyperliquid info

> The info endpoint with type: "userFunding" retrieves the funding history for a specific user account on the Hyperliquid exchange. On Hyperliquid info.

<Info>
  You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `info` endpoint with `type: "userFunding"` retrieves the funding history for a specific user account on the Hyperliquid exchange. This endpoint provides detailed information about funding payments and receipts across all perpetual positions over time, allowing users to track their funding costs and analyze trading performance.

<Info>
  This endpoint is similar to [userNonFundingLedgerUpdates](/reference/hyperliquid-info-user-non-funding-ledger-updates) — both query the Hyperliquid `info` API with different `type` values and return structurally similar arrays. The key difference is in the output content: this page returns only funding events, while [userNonFundingLedgerUpdates](/reference/hyperliquid-info-user-non-funding-ledger-updates) returns all other balance‑affecting ledger updates (deposits, withdrawals, transfers, liquidations, spot activity), excluding funding.
</Info>

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"userFunding"` to retrieve user funding history.
* `user` (string, required) — Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
* `startTime` (integer, required) — Start time in milliseconds, inclusive.
* `endTime` (integer, optional) — End time in milliseconds, inclusive. Defaults to current time.

## Response

The response is an array of funding events, chronologically ordered from oldest to newest. Each event represents a funding payment or receipt for a specific perpetual position.

### Response structure

Each funding event contains:

**Event metadata:**

* `time` — Unix timestamp in milliseconds when the funding occurred
* `hash` — Transaction hash (typically zero hash for funding events)

**Funding details:**

* `delta.type` — Always "funding" for funding events
* `delta.coin` — Asset symbol (e.g., "BTC", "ETH", "SOL")
* `delta.usdc` — Funding amount in USDC (negative = paid, positive = received)
* `delta.szi` — Position size at the time of funding
* `delta.fundingRate` — Funding rate applied for this period

### Data interpretation

**Funding payments vs receipts:**

* Negative `usdc` values indicate funding paid (user is long in a positive funding environment or short in negative funding)
* Positive `usdc` values indicate funding received (user is short in positive funding environment or long in negative funding)

**Position correlation:**

* `szi` shows the position size when funding was applied
* Positive `szi` indicates long positions, negative indicates short positions
* Larger absolute position sizes result in proportionally larger funding payments/receipts

**Funding rate analysis:**

* `fundingRate` represents the rate charged per unit of time
* Positive rates favor shorts (longs pay shorts)
* Negative rates favor longs (shorts pay longs)
* Rates are typically charged every 8 hours (3 times daily)

## Trading insights

### Funding cost analysis

**Position cost calculation:**

* Total funding cost = sum of all `usdc` values for a specific asset
* Daily funding impact = funding payments/receipts over 24-hour periods
* Funding rate trends indicate market sentiment and position bias

**Strategy optimization:**

* High funding costs may indicate overleverage or poor market timing
* Consistent funding receipts suggest alignment with market structure
* Funding patterns help optimize position entry and exit timing

### Market sentiment indicators

**Funding rate patterns:**

* Consistently positive funding rates indicate bullish bias (demand for long positions)
* Negative funding rates suggest bearish sentiment (demand for short positions)
* Extreme funding rates often coincide with market turning points

**Position management:**

* Monitor funding costs relative to trading profits
* Consider position size adjustments during high funding periods
* Use funding rate changes as market sentiment indicators

## Historical analysis

### Performance tracking

**Funding efficiency:**

* Track funding costs as percentage of trading profits
* Compare funding expenses across different assets
* Identify optimal position sizing for funding cost management

**Market timing:**

* Analyze funding rate cycles for entry/exit optimization
* Monitor funding rate extremes for reversal signals
* Use historical funding patterns for strategy backtesting

## Example request

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "type": "userFunding",
      "user": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
      "startTime": 1681923833000,
      "endTime": 1681924833000
    }' \
    https://api.hyperliquid.xyz/info
  ```

  ```python Python (hyperliquid-python-sdk) theme={"system"}
  from hyperliquid.info import Info
  from hyperliquid.utils import constants

  info = Info(constants.MAINNET_API_URL, skip_ws=True)

  result = info.user_funding_history(
      user="0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
      startTime=1681923833000,
      endTime=1681924833000,
  )
  print(result)
  ```

  ```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
  import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";

  const transport = new HttpTransport();
  const info = new InfoClient({ transport });

  const result = await info.userFunding({
    user: "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
    startTime: 1681923833000,
    endTime: 1681924833000,
  });
  console.log(result);
  ```
</CodeGroup>

## Example response

```json theme={"system"}
[
  {
    "delta": {
      "coin": "ETH",
      "fundingRate": "0.0000417",
      "szi": "49.1477",
      "type": "funding",
      "usdc": "-3.625312"
    },
    "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
    "time": 1681222254710
  }
]
```

## Use cases

The `info` endpoint with `type: "userFunding"` is essential for applications that need to:

* **Trading analytics**: Analyze funding costs and their impact on trading performance
* **Portfolio management**: Track funding expenses across multiple positions and assets
* **Strategy optimization**: Optimize position sizing and timing based on funding patterns
* **Performance attribution**: Separate trading gains from funding costs for accurate measurement
* **Tax reporting**: Calculate funding payments and receipts for tax documentation
* **Risk management**: Monitor funding costs as part of overall trading risk assessment
* **Market analysis**: Study funding rate patterns to understand market sentiment
* **Algorithm development**: Incorporate funding costs into automated trading strategies
* **Position management**: Make informed decisions about position holds based on funding trends
* **Cost analysis**: Compare funding efficiency across different trading strategies
* **Backtesting**: Include historical funding costs in strategy backtesting and simulation
* **Reporting tools**: Generate comprehensive trading reports including funding breakdowns

This endpoint provides comprehensive funding history with time-based filtering, enabling detailed analysis of funding costs and their impact on trading performance in perpetual futures markets.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_user_funding.json post /info
openapi: 3.0.0
info:
  title: Hyperliquid Node API
  version: 1.0.0
  description: This is an API for interacting with Chainstack Hyperliquid node.
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /info:
    post:
      tags:
        - hyperliquid operations
      summary: info (userFunding)
      description: >-
        Retrieve funding history for a specific user account, including funding
        payments and receipts across all perpetual positions over time.
      operationId: infoUserFunding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - user
                - startTime
              properties:
                type:
                  type: string
                  enum:
                    - userFunding
                  default: userFunding
                  description: >-
                    The request type. Must be 'userFunding' to retrieve user
                    funding history.
                user:
                  type: string
                  default: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
                  description: User wallet address (0x...)
                startTime:
                  type: integer
                  default: 1681923833000
                  description: Start time in milliseconds, inclusive
                endTime:
                  type: integer
                  description: >-
                    End time in milliseconds, inclusive. Defaults to current
                    time.
            example:
              type: userFunding
              user: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
              startTime: 1681923833000
              endTime: 1681924833000
      responses:
        '200':
          description: User funding history data
          content:
            application/json:
              schema:
                type: array
                description: Array of funding events for the user
              example:
                - time: 1732233600000
                  hash: >-
                    0x0000000000000000000000000000000000000000000000000000000000000000
                  delta:
                    type: funding
                    coin: BTC
                    usdc: '-2851.187296'
                    szi: '45.0'
                    fundingRate: '0.00005566'
                - time: 1732320000000
                  hash: >-
                    0x0000000000000000000000000000000000000000000000000000000000000000
                  delta:
                    type: funding
                    coin: ETH
                    usdc: '-7267.176499'
                    szi: '1300.0'
                    fundingRate: '0.00006885'

````