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

# userFees | Hyperliquid info

> The info endpoint with type: "userFees" retrieves detailed information about a user's fee structure and trading costs on the Hyperliquid exchange.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `info` endpoint with `type: "userFees"` retrieves detailed information about a user's fee structure and trading costs on the Hyperliquid exchange. This endpoint provides comprehensive fee information including base rates, VIP tiers, discounts, and effective rates after all reductions are applied.

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"userFees"` to retrieve user's fee structure.
* `user` (string, required) — Address in 42-character hexadecimal format (e.g., `0x31ca8395cf837de08b24da3f660e77761dfb974b`).

## Response

The response is a comprehensive object containing detailed fee information, schedules, and user-specific rates:

### Daily volume data

* `dailyUserVlm` (array) — Array of daily volume data objects:
  * `date` (string) — Date in YYYY-MM-DD format
  * `userCross` (string) — User's cross-margin trading volume for the day
  * `userAdd` (string) — User's isolated/add margin trading volume for the day
  * `exchange` (string) — Total exchange volume for the day

### Fee schedule structure

* `feeSchedule` (object) — Complete fee schedule information:
  * `cross` (string) — Base cross-margin taker fee rate
  * `add` (string) — Base isolated/add margin maker fee rate
  * `spotCross` (string) — Base spot cross-margin taker fee rate
  * `spotAdd` (string) — Base spot isolated/add margin maker fee rate
  * `tiers` (object) — Tiered fee structures:
    * `vip` (array) — VIP tier configurations with volume cutoffs and reduced rates
    * `mm` (array) — Market maker tier configurations
  * `referralDiscount` (string) — Base referral discount percentage
  * `stakingDiscountTiers` (array) — Staking-based discount tiers

### User-specific rates

* `userCrossRate` (string) — User's effective cross-margin trading rate (after discounts)
* `userAddRate` (string) — User's effective isolated/add margin trading rate (after discounts)
* `userSpotCrossRate` (string) — User's effective spot cross-margin trading rate
* `userSpotAddRate` (string) — User's effective spot isolated/add margin trading rate

### Applied discounts and benefits

* `activeReferralDiscount` (string) — Currently active referral discount percentage
* `activeStakingDiscount` (object) — Currently active staking discount:
  * `bpsOfMaxSupply` (string) — Basis points of max supply being staked
  * `discount` (string) — Discount percentage applied

### Trial and rewards

* `trial` (object/null) — Trial program information (if applicable)
* `feeTrialReward` (string) — Rewards from fee trial programs
* `nextTrialAvailableTimestamp` (integer/null) — When next trial becomes available

### Staking information

* `stakingLink` (object) — Staking relationship information:
  * `type` (string) — Type of staking link (e.g., "tradingUser")
  * `stakingUser` (string) — Address of the linked staking user

### Understanding fee structure

**Cross vs Add (Isolated) margin:**

* **Cross margin**: Uses entire account balance as collateral for positions
* **Add/Isolated margin**: Each position has dedicated collateral
* **Cross rates**: Generally higher due to increased risk sharing
* **Add rates**: Lower rates to encourage isolated position management

**Fee types:**

* **Perpetuals fees**: `userCrossRate` and `userAddRate` for perpetual futures
* **Spot fees**: `userSpotCrossRate` and `userSpotAddRate` for spot trading
* **Market maker rebates**: Negative fees for qualifying market makers

**Discount mechanisms:**

* **Referral discounts**: Reductions based on referral program participation
* **Staking discounts**: Fee reductions based on token staking amounts
* **VIP tiers**: Volume-based fee reductions with specific cutoffs
* **Trial programs**: Temporary fee benefits and rewards

**Rate calculation:**

* Base rates are modified by applicable discounts
* User-specific rates show final effective rates after all benefits
* Staking discounts based on percentage of maximum token supply held

## Example request

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"type": "userFees", "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b"}' \
    https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/info
  ```

  ```python hyperliquid-python-sdk theme={"system"}
  from hyperliquid.info import Info

  info = Info("YOUR_CHAINSTACK_ENDPOINT", skip_ws=True)

  user_fees = info.user_fees("0x31ca8395cf837de08b24da3f660e77761dfb974b")
  print(user_fees)
  ```

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

  const transport = new HttpTransport({ apiUrl: "YOUR_CHAINSTACK_ENDPOINT" });
  const client = new InfoClient({ transport });

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

<Note>
  **Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR\_CHAINSTACK\_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
</Note>

## Example response

```json theme={"system"}
{
  "dailyUserVlm": [
    {
      "date": "2025-05-23",
      "userCross": "0.0",
      "userAdd": "0.0", 
      "exchange": "2852367.0770729999"
    }
  ],
  "feeSchedule": {
    "cross": "0.00045",
    "add": "0.00015",
    "spotCross": "0.0007",
    "spotAdd": "0.0004",
    "tiers": {
      "vip": [
        {
          "ntlCutoff": "5000000.0",
          "cross": "0.0004",
          "add": "0.00012",
          "spotCross": "0.0006",
          "spotAdd": "0.0003"
        }
      ],
      "mm": [
        {
          "makerFractionCutoff": "0.005",
          "add": "-0.00001"
        }
      ]
    },
    "referralDiscount": "0.04",
    "stakingDiscountTiers": [
      {
        "bpsOfMaxSupply": "0.0001",
        "discount": "0.05"
      }
    ]
  },
  "userCrossRate": "0.000315",
  "userAddRate": "0.000105",
  "userSpotCrossRate": "0.00049",
  "userSpotAddRate": "0.00028",
  "activeReferralDiscount": "0.0",
  "trial": null,
  "feeTrialReward": "0.0",
  "nextTrialAvailableTimestamp": null,
  "stakingLink": {
    "type": "tradingUser",
    "stakingUser": "0x54c049d9c7d3c92c2462bf3d28e083f3d6805061"
  },
  "activeStakingDiscount": {
    "bpsOfMaxSupply": "4.7577998927",
    "discount": "0.3"
  }
}
```

## Use cases

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

* **Trading cost calculation**: Accurately estimate trading costs using user-specific rates
* **Fee optimization**: Help users understand how to reduce fees through staking or referrals
* **Profitability analysis**: Calculate net profits after accounting for actual trading fees
* **Volume analysis**: Track daily trading volumes and exchange activity patterns
* **Discount tracking**: Monitor active staking and referral discounts
* **Trading strategy optimization**: Factor accurate fees into algorithmic trading decisions
* **Fee dashboards**: Display current fee structure, discounts, and potential savings
* **Cross vs isolated margin decisions**: Compare fee structures for different margin types
* **Performance reporting**: Include accurate fee costs in trading performance analysis
* **Institutional reporting**: Provide comprehensive fee transparency for clients
* **Strategy backtesting**: Include realistic fee models in historical analysis
* **Staking optimization**: Understand staking requirements for maximum fee discounts

This endpoint provides comprehensive fee information including base rates, user-specific discounts, volume data, and staking benefits, enabling accurate cost calculations and optimization strategies on the Hyperliquid platform.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_userfees.json post /4f8d8f4040bdacd1577bff8058438274/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://hyperliquid-mainnet.core.chainstack.com
security: []
paths:
  /4f8d8f4040bdacd1577bff8058438274/info:
    post:
      tags:
        - hyperliquid operations
      summary: info (userFees)
      operationId: infoUserFees
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  default: userFees
                  enum:
                    - userFees
                  description: >-
                    Request type to retrieve user's fee structure and trading
                    costs
                user:
                  type: string
                  default: '0x31ca8395cf837de08b24da3f660e77761dfb974b'
                  description: Address in 42-character hexadecimal format
              required:
                - type
                - user
      responses:
        '200':
          description: User's fee structure and trading cost information
          content:
            application/json:
              schema:
                type: object
                description: >-
                  User fee information including daily volumes, fee schedule,
                  effective rates, discounts, and staking link
                properties:
                  dailyUserVlm:
                    type: array
                    description: Array of daily volume data
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: YYYY-MM-DD
                        userCross:
                          type: string
                        userAdd:
                          type: string
                        exchange:
                          type: string
                  feeSchedule:
                    type: object
                    properties:
                      cross:
                        type: string
                      add:
                        type: string
                      spotCross:
                        type: string
                      spotAdd:
                        type: string
                      tiers:
                        type: object
                        properties:
                          vip:
                            type: array
                            items:
                              type: object
                              properties:
                                ntlCutoff:
                                  type: string
                                cross:
                                  type: string
                                add:
                                  type: string
                                spotCross:
                                  type: string
                                spotAdd:
                                  type: string
                          mm:
                            type: array
                            items:
                              type: object
                              properties:
                                makerFractionCutoff:
                                  type: string
                                add:
                                  type: string
                      referralDiscount:
                        type: string
                      stakingDiscountTiers:
                        type: array
                        items:
                          type: object
                          properties:
                            bpsOfMaxSupply:
                              type: string
                            discount:
                              type: string
                  userCrossRate:
                    type: string
                  userAddRate:
                    type: string
                  userSpotCrossRate:
                    type: string
                  userSpotAddRate:
                    type: string
                  activeReferralDiscount:
                    type: string
                  trial:
                    type: object
                    nullable: true
                  feeTrialReward:
                    type: string
                  nextTrialAvailableTimestamp:
                    type: integer
                    nullable: true
                  stakingLink:
                    type: object
                    properties:
                      type:
                        type: string
                      stakingUser:
                        type: string
                  activeStakingDiscount:
                    type: object
                    properties:
                      bpsOfMaxSupply:
                        type: string
                      discount:
                        type: string
              example:
                dailyUserVlm:
                  - date: '2025-05-23'
                    userCross: '0.0'
                    userAdd: '0.0'
                    exchange: '2852367.0770729999'
                feeSchedule:
                  cross: '0.00045'
                  add: '0.00015'
                  spotCross: '0.0007'
                  spotAdd: '0.0004'
                  tiers:
                    vip:
                      - ntlCutoff: '5000000.0'
                        cross: '0.0004'
                        add: '0.00012'
                        spotCross: '0.0006'
                        spotAdd: '0.0003'
                    mm:
                      - makerFractionCutoff: '0.005'
                        add: '-0.00001'
                  referralDiscount: '0.04'
                  stakingDiscountTiers:
                    - bpsOfMaxSupply: '0.0001'
                      discount: '0.05'
                userCrossRate: '0.000315'
                userAddRate: '0.000105'
                userSpotCrossRate: '0.00049'
                userSpotAddRate: '0.00028'
                activeReferralDiscount: '0.0'
                trial: null
                feeTrialReward: '0.0'
                nextTrialAvailableTimestamp: null
                stakingLink:
                  type: tradingUser
                  stakingUser: '0x54c049d9c7d3c92c2462bf3d28e083f3d6805061'
                activeStakingDiscount:
                  bpsOfMaxSupply: '4.7577998927'
                  discount: '0.3'

````