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

# delegatorHistory | Hyperliquid info

> The info endpoint with type: "delegatorHistory" retrieves comprehensive staking history for a specific user 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: "delegatorHistory"` retrieves comprehensive staking history for a specific user on the Hyperliquid exchange. This endpoint provides detailed historical data about delegation and undelegation events, including timestamps, transaction hashes, and complete event details, enabling thorough analysis of staking behavior and validator relationships.

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"delegatorHistory"` to retrieve staking history.
* `user` (string, required) — Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.

## Response

The response is an array of staking history events, ordered chronologically. Each event represents a delegation or undelegation action performed by the user.

### Response structure

Each staking event contains:

**Event metadata:**

* `time` — Timestamp of the staking event in milliseconds since Unix epoch
* `hash` — Transaction hash of the staking event for blockchain verification

**Event details:**

* `delta` — Object containing the details of the staking change
* `delegate` — Specific delegation event information

### Delegation event structure

The `delegate` object within `delta` contains:

**Validator information:**

* `validator` — Address of the validator being delegated to or undelegated from
* Identifies the specific validator node in the network

**Staking amount:**

* `amount` — Amount being delegated or undelegated as a string for precision
* Represents the quantity of tokens involved in the staking action

**Event type:**

* `isUndelegate` — Boolean indicating the type of staking event
* `false` indicates a delegation event (staking tokens)
* `true` indicates an undelegation event (unstaking tokens)

### Data interpretation

**Delegation events (`isUndelegate: false`):**

* User is staking tokens with a validator
* Increases the user's staked position with that validator
* Contributes to the validator's total delegated stake
* Begins earning staking rewards

**Undelegation events (`isUndelegate: true`):**

* User is unstaking tokens from a validator
* Decreases the user's staked position with that validator
* May be subject to unbonding periods
* Stops earning rewards on the undelegated amount

**Historical tracking:**

* Events are ordered chronologically
* Transaction hashes provide blockchain verification
* Complete audit trail of all staking activities

## Staking analysis insights

### Staking behavior patterns

**Delegation strategies:**

* Analyze which validators the user prefers to delegate to
* Track delegation amounts and timing patterns
* Identify diversification strategies across multiple validators

**Staking duration analysis:**

* Calculate time between delegation and undelegation events
* Analyze staking commitment periods
* Identify patterns in staking behavior over time

**Amount analysis:**

* Track the size of delegation and undelegation events
* Analyze whether user prefers large or small staking amounts
* Monitor changes in staking strategy over time

### Validator relationships

**Validator preferences:**

* Identify which validators the user delegates to most frequently
* Analyze loyalty to specific validators
* Track changes in validator preferences over time

**Risk distribution:**

* Assess how the user distributes stake across validators
* Analyze concentration risk in validator selection
* Monitor diversification strategies

### Staking timeline analysis

**Activity frequency:**

* Analyze how often the user performs staking operations
* Identify periods of high or low staking activity
* Correlate staking activity with market conditions

**Timing patterns:**

* Identify patterns in delegation and undelegation timing
* Analyze whether user times staking actions strategically
* Monitor response to network events or validator changes

### Portfolio management

**Staking allocation:**

* Track total staked amounts over time
* Analyze allocation changes between validators
* Monitor overall staking strategy evolution

**Liquidity management:**

* Analyze patterns of delegation vs undelegation
* Track how user manages staked vs liquid token balance
* Identify liquidity needs and staking optimization

## Example request

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

  history = info.delegator_history("0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036")
  print(history)
  ```

  ```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
  import * as hl from "@nktkas/hyperliquid";

  const transport = new hl.HttpTransport();
  const client = new hl.InfoClient({ transport });

  const history = await client.delegatorHistory({
    user: "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
  });
  console.log(history);
  ```
</CodeGroup>

## Use cases

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

* **Track staking history**: Monitor all delegation and undelegation events over time
* **Analyze staking patterns**: Understand user behavior and validator preferences
* **Calculate rewards**: Determine staking rewards based on historical delegation timing
* **Audit staking activity**: Provide complete audit trails with transaction hashes
* **Portfolio analytics**: Analyze staking strategy and performance over time
* **Validator research**: Study relationships between delegators and validators
* **Tax reporting**: Generate historical staking data for tax calculation purposes
* **Risk management**: Assess staking concentration and diversification patterns
* **Liquidity planning**: Plan future delegations based on historical patterns
* **Compliance tracking**: Maintain detailed records of staking activities

This endpoint provides comprehensive staking history, enabling detailed analysis and management of delegation activities on the Hyperliquid network.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_delegator_history.json post /info
openapi: 3.0.0
info:
  title: Hyperliquid Node API - Delegator History
  version: 1.0.0
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /info:
    post:
      summary: Query a user's staking history
      description: >-
        Retrieve comprehensive staking history for a specific user, including
        delegation and undelegation events with timestamps, transaction hashes,
        and detailed delta information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - user
              properties:
                type:
                  type: string
                  enum:
                    - delegatorHistory
                  default: delegatorHistory
                  description: >-
                    The request type. Must be 'delegatorHistory' to retrieve
                    staking history.
                user:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{40}$
                  default: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
                  description: >-
                    Address in 42-character hexadecimal format; e.g.
                    0x0000000000000000000000000000000000000000.
            example:
              type: delegatorHistory
              user: '0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036'
      responses:
        '200':
          description: Successful response with staking history data
          content:
            application/json:
              schema:
                type: array
                description: Array of staking history events
                items:
                  type: object
                  properties:
                    time:
                      type: integer
                      format: int64
                      description: Timestamp of the staking event in milliseconds
                    hash:
                      type: string
                      description: Transaction hash of the staking event
                    delta:
                      type: object
                      description: Details of the staking change
                      properties:
                        delegate:
                          type: object
                          description: Delegation event details
                          properties:
                            validator:
                              type: string
                              description: >-
                                Address of the validator being delegated to or
                                undelegated from
                            amount:
                              type: string
                              description: Amount being delegated or undelegated
                            isUndelegate:
                              type: boolean
                              description: >-
                                Whether this is an undelegation event (true) or
                                delegation event (false)
                  required:
                    - time
                    - hash
                    - delta
              example:
                - time: 1735380381353
                  hash: >-
                    0x55492465cb523f90815a041a226ba90147008d4b221a24ae8dc35a0dbede4ea4
                  delta:
                    delegate:
                      validator: '0x5ac99df645f3414876c816caa18b2d234024b487'
                      amount: '10000.0'
                      isUndelegate: false
                - time: 1735380281353
                  hash: >-
                    0x44492465cb523f90815a041a226ba90147008d4b221a24ae8dc35a0dbede4ea3
                  delta:
                    delegate:
                      validator: '0x5ac99df645f3414876c816caa18b2d234024b487'
                      amount: '5000.0'
                      isUndelegate: true

````