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

# userNonFundingLedgerUpdates | Hyperliquid info

> The info endpoint with type: "userNonFundingLedgerUpdates" retrieves comprehensive ledger updates for a specific user account on the Hyperliquid exchange.

<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: "userNonFundingLedgerUpdates"` retrieves comprehensive ledger updates for a specific user account on the Hyperliquid exchange, excluding funding payments. This endpoint provides detailed information about all account activities including deposits, withdrawals, transfers, liquidations, spot trading, and other balance-affecting operations.

<Info>
  This endpoint is similar to [userFunding](/reference/hyperliquid-info-user-funding) — both query the Hyperliquid `info` API with different `type` values and return arrays of time‑ordered events. The difference is in scope: [userFunding](/reference/hyperliquid-info-user-funding) returns only funding events, whereas this page returns non‑funding ledger updates (deposits, withdrawals, transfers, liquidations, spot activity).
</Info>

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"userNonFundingLedgerUpdates"` to retrieve user ledger updates.
* `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 ledger update events, chronologically ordered from oldest to newest. Each event represents a balance-affecting operation on the user's account, excluding funding payments and receipts.

### Response structure

Each ledger update event contains:

**Event metadata:**

* `time` — Unix timestamp in milliseconds when the event occurred
* `hash` — Transaction hash for blockchain transactions

**Update details (`delta` object):**

* `type` — Type of ledger update (see transaction types below)
* Additional fields specific to each transaction type

### Transaction types

**Deposit operations:**

* `deposit` — USDC deposits into the account
  * `usdc` — Amount deposited in USDC

**Withdrawal operations:**

* `withdraw` — USDC withdrawals from the account
  * `usdc` — Amount withdrawn in USDC
  * `nonce` — Unique nonce for the withdrawal
  * `fee` — Withdrawal fee in USDC

**Account transfers:**

* `accountClassTransfer` — Transfers between spot and perpetual accounts
  * `usdc` — Amount transferred in USDC
  * `toPerp` — Boolean indicating transfer direction (true = to perp, false = to spot)

**Spot trading operations:**

* `spotTransfer` — Spot token transfers between accounts
  * `token` — Token symbol being transferred
  * `amount` — Token amount transferred
  * `usdcValue` — USD value of the transfer
  * `user` — Source user address
  * `destination` — Destination address
  * `fee` — Transfer fee
  * `nativeTokenFee` — Native token fee
  * `nonce` — Transfer nonce (if applicable)

* `spotGenesis` — Initial token allocations or airdrops
  * `token` — Token symbol
  * `amount` — Token amount received

**Sub-account operations:**

* `subAccountTransfer` — Transfers between main account and sub-accounts
  * `usdc` — Amount transferred
  * `user` — Source account address
  * `destination` — Destination account address

**Internal transfers:**

* `internalTransfer` — Internal transfers within the exchange
  * `usdc` — Amount transferred
  * `user` — Source user
  * `destination` — Destination user
  * `fee` — Transfer fee

**Liquidation events:**

* `liquidation` — Forced position closures due to insufficient margin
  * `liquidatedNtlPos` — Total notional value liquidated
  * `accountValue` — Account value at liquidation
  * `leverageType` — Leverage type (Cross/Isolated)
  * `liquidatedPositions` — Array of liquidated positions with coin and size

**Staking operations:**

* `cStakingTransfer` — Consensus staking deposits and withdrawals
  * `token` — Staked token symbol
  * `amount` — Amount staked/unstaked
  * `isDeposit` — Boolean indicating if it's a deposit or withdrawal

### Data interpretation

**Balance tracking:**

* Each event shows the exact change to account balances
* USDC amounts can be positive (credits) or negative (debits)
* Events are sequential and can be used to reconstruct account history

**Transfer analysis:**

* `accountClassTransfer` events move funds between spot and perpetual trading
* `spotTransfer` events involve token movements between different addresses
* `subAccountTransfer` events manage funds across account hierarchies

**Risk events:**

* `liquidation` events indicate margin calls and forced position closures
* Track liquidation frequency and sizes for risk assessment
* Account value at liquidation shows remaining equity

## Account management insights

### Fund flow analysis

**Deposit and withdrawal patterns:**

* Track net fund flows to understand capital deployment
* Monitor withdrawal patterns for liquidity planning
* Analyze deposit timing relative to market movements

**Cross-margin management:**

* Monitor transfers between spot and perpetual accounts
* Optimize capital allocation across trading strategies
* Track margin efficiency and utilization

### Trading activity reconstruction

**Complete transaction history:**

* Combine with funding data for comprehensive P\&L analysis
* Track all balance-affecting operations in chronological order
* Identify trading patterns and account usage

**Portfolio management:**

* Monitor spot token accumulation and distribution
* Track staking activities and rewards
* Analyze sub-account fund management

### Risk monitoring

**Liquidation analysis:**

* Identify liquidation triggers and patterns
* Monitor account health leading to liquidations
* Analyze liquidation impact on overall portfolio

**Operational risk:**

* Track withdrawal frequencies and amounts
* Monitor account class transfers for strategy changes
* Identify unusual transfer patterns or activities

## Example request

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "type": "userNonFundingLedgerUpdates",
      "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)

  updates = info.user_non_funding_ledger_updates(
      user="0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
      startTime=1681923833000,
      endTime=1681924833000,
  )

  print(updates)
  ```

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

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

  const updates = await info.userNonFundingLedgerUpdates({
    user: "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
    startTime: 1681923833000,
    endTime: 1681924833000,
  });

  console.log(updates);
  ```
</CodeGroup>

## Example response

```json theme={"system"}
[
  {
    "delta": {
      "type": "deposit",
      "usdc": "1000.0"
    },
    "hash": "0x1234567890abcdef1234567890abcdef12345678",
    "time": 1681923833000
  },
  {
    "delta": {
      "type": "withdraw",
      "usdc": "-500.0",
      "nonce": 12345,
      "fee": "1.0"
    },
    "hash": "0xabcdef1234567890abcdef1234567890abcdef12",
    "time": 1681924000000
  }
]
```

## Use cases

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

* **Account reconciliation**: Track all balance changes and verify account states
* **Portfolio analytics**: Analyze complete fund flows and asset movements
* **Trading analysis**: Reconstruct trading activity and performance metrics
* **Risk management**: Monitor liquidations and account health indicators
* **Compliance reporting**: Generate comprehensive transaction reports for regulatory requirements
* **Tax calculation**: Track all taxable events including transfers and liquidations
* **Audit trails**: Maintain complete records of all account activities
* **Liquidity analysis**: Monitor deposit and withdrawal patterns
* **Capital allocation**: Analyze fund movements between different trading strategies
* **Performance attribution**: Separate trading gains from deposits and withdrawals
* **Sub-account management**: Track fund flows across account hierarchies
* **Financial reporting**: Generate detailed financial statements and reports
* **Automated reconciliation**: Build systems to automatically verify account balances
* **Anomaly detection**: Identify unusual transaction patterns or activities

This endpoint provides comprehensive account activity data with time-based filtering, enabling detailed analysis of all non-funding balance changes and portfolio tracking in the Hyperliquid ecosystem.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_user_non_funding_ledger_updates.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 (userNonFundingLedgerUpdates)
      description: >-
        Retrieve non-funding ledger updates for a specific user account,
        including deposits, withdrawals, transfers, liquidations, and other
        account activities excluding funding payments.
      operationId: infoUserNonFundingLedgerUpdates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - user
                - startTime
              properties:
                type:
                  type: string
                  enum:
                    - userNonFundingLedgerUpdates
                  default: userNonFundingLedgerUpdates
                  description: >-
                    The request type. Must be 'userNonFundingLedgerUpdates' to
                    retrieve user ledger updates.
                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: userNonFundingLedgerUpdates
              user: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
              startTime: 1681923833000
              endTime: 1681924833000
      responses:
        '200':
          description: User non-funding ledger updates data
          content:
            application/json:
              schema:
                type: array
                description: Array of ledger update events for the user
              example:
                - time: 1731999196516
                  hash: >-
                    0x09ddd9f712b5df0945af34b055bbb3329c88ca001aff41bbfd4341d80bc760ce
                  delta:
                    type: deposit
                    usdc: '2703997.4500000002'
                - time: 1732834706761
                  hash: >-
                    0x1ddfe341d6a65a05392a0417f410fd014100a311417ccf11da13fcddea1429c9
                  delta:
                    type: accountClassTransfer
                    usdc: '12.0'
                    toPerp: false
                - time: 1732834825313
                  hash: >-
                    0x2ceac78e94d15a1af8660417f418400175003b84f5f2d86615b352360e4d48ac
                  delta:
                    type: spotTransfer
                    token: USDC
                    amount: '10.5'
                    usdcValue: '10.5'
                    user: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
                    destination: '0xaaa0c2769cb990f4f37db951a9e48de2385c2733'
                    fee: '1.0'
                    nativeTokenFee: '0.0'
                    nonce: null

````