Hyperliquid Perpetuals API

POST
/info#allMids

Note that if the book is empty, the last trade price will be used as a fallback

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#allMids" \  -H "Content-Type: application/json" \  -d '{    "type": "allMids"  }'
{
  "APE": "4.33245",
  "ARB": "1.21695"
}
POST
/info#openOrders

See a user's open orders

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#openOrders" \  -H "Content-Type: application/json" \  -d '{    "type": "openOrders",    "user": "string"  }'
[
  {
    "coin": "BTC",
    "limitPx": "29792.0",
    "oid": 91490942,
    "side": "A",
    "sz": "0.0",
    "timestamp": 1681247412573
  }
]
POST
/info#frontendOpenOrders

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#frontendOpenOrders" \  -H "Content-Type: application/json" \  -d '{    "type": "frontendOpenOrders",    "user": "string"  }'
[
  {
    "coin": "BTC",
    "isPositionTpsl": false,
    "isTrigger": false,
    "limitPx": "29792.0",
    "oid": 91490942,
    "orderType": "Limit",
    "origSz": "5.0",
    "reduceOnly": false,
    "side": "A",
    "sz": "5.0",
    "timestamp": 1681247412573,
    "triggerCondition": "N/A",
    "triggerPx": "0.0"
  }
]
POST
/info#userFills

Returns at most 2000 most recent fills

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userFills" \  -H "Content-Type: application/json" \  -d '{    "type": "userFills",    "user": "string"  }'
[
  {
    "closedPnl": "0.0",
    "coin": "AVAX",
    "crossed": false,
    "dir": "Open Long",
    "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
    "oid": 90542681,
    "px": "18.435",
    "side": "B",
    "startPosition": "26.86",
    "sz": "93.53",
    "time": 1681222254710,
    "fee": "0.01",
    "feeToken": "USDC",
    "builderFee": "0.01",
    "tid": 118906512037719
  }
]
POST
/info#userFillsByTime

Returns at most 2000 fills per response and only the 10000 most recent fills are available

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userFillsByTime" \  -H "Content-Type: application/json" \  -d '{    "type": "userFillsByTime",    "user": "string",    "startTime": 0  }'
[
  {
    "closedPnl": "0.0",
    "coin": "AVAX",
    "crossed": false,
    "dir": "Open Long",
    "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
    "oid": 90542681,
    "px": "18.435",
    "side": "B",
    "startPosition": "26.86",
    "sz": "93.53",
    "time": 1681222254710,
    "fee": "0.01",
    "feeToken": "USDC",
    "builderFee": "0.01",
    "tid": 118906512037719
  }
]
POST
/info#userRateLimit

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userRateLimit" \  -H "Content-Type: application/json" \  -d '{    "user": "string",    "type": "userRateLimit"  }'
{
  "cumVlm": "2854574.593578",
  "nRequestsUsed": 2890,
  "nRequestsCap": 2864574,
  "nRequestsSurplus": 0
}
POST
/info#orderStatus

The string returned has the following possible values: open, filled, canceled, triggered, rejected, marginCanceled, vaultWithdrawalCanceled, openInterestCapCanceled, selfTradeCanceled, reduceOnlyCanceled, siblingFilledCanceled, delistedCanceled, liquidatedCanceled, scheduledCancel, tickRejected, minTradeNtlRejected, perpMarginRejected, reduceOnlyRejected, badAloPxRejected, iocCancelRejected, badTriggerPxRejected, marketOrderNoLiquidityRejected, positionIncreaseAtOpenInterestCapRejected, positionFlipAtOpenInterestCapRejected, tooAggressiveAtOpenInterestCapRejected, openInterestIncreaseRejected, insufficientSpotBalanceRejected, oracleRejected, perpMaxPositionRejected.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#orderStatus" \  -H "Content-Type: application/json" \  -d '{    "user": "string",    "type": "orderStatus",    "oid": 0  }'

{
  "status": "order",
  "order": {
    "order": {
      "coin": "ETH",
      "side": "A",
      "limitPx": "2412.7",
      "sz": "0.0",
      "oid": 1,
      "timestamp": 1724361546645,
      "triggerCondition": "N/A",
      "isTrigger": false,
      "triggerPx": "0.0",
      "children": [],
      "isPositionTpsl": false,
      "reduceOnly": true,
      "orderType": "Market",
      "origSz": "0.0076",
      "tif": "FrontendMarket",
      "cloid": null
    },
    "status": "filled",
    "statusTimestamp": 1724361546645
  }
}

POST
/info#l2Book

Returns at most 20 levels per side

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#l2Book" \  -H "Content-Type: application/json" \  -d '{    "type": "l2Book",    "coin": "string"  }'
{
  "coin": "BTC",
  "time": 1754450974231,
  "levels": [
    [
      {
        "px": "113377.0",
        "sz": "7.6699",
        "n": 17
      },
      {
        "px": "113376.0",
        "sz": "4.13714",
        "n": 8
      }
    ],
    [
      {
        "px": "113397.0",
        "sz": "0.11543",
        "n": 3
      }
    ]
  ]
}
POST
/info#candleSnapshot

Only the most recent 5000 candles are available. Supported intervals: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#candleSnapshot" \  -H "Content-Type: application/json" \  -d '{    "type": "candleSnapshot",    "req": {      "coin": "string",      "interval": "1m",      "startTime": 0,      "endTime": 0    }  }'
[
  {
    "T": 1681924499999,
    "c": "29258.0",
    "h": "29309.0",
    "i": "15m",
    "l": "29250.0",
    "n": 189,
    "o": "29295.0",
    "s": "BTC",
    "t": 1681923600000,
    "v": "0.98639"
  }
]
POST
/info#maxBuilderFee

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#maxBuilderFee" \  -H "Content-Type: application/json" \  -d '{    "type": "maxBuilderFee",    "user": "string",    "builder": "string"  }'
1
POST
/info#historicalOrders

Returns at most 2000 most recent historical orders

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#historicalOrders" \  -H "Content-Type: application/json" \  -d '{    "type": "historicalOrders",    "user": "string"  }'
[
  {
    "order": {
      "coin": "ETH",
      "side": "A",
      "limitPx": "2412.7",
      "sz": "0.0",
      "oid": 1,
      "timestamp": 1724361546645,
      "triggerCondition": "N/A",
      "isTrigger": false,
      "triggerPx": "0.0",
      "children": [],
      "isPositionTpsl": false,
      "reduceOnly": true,
      "orderType": "Market",
      "origSz": "0.0076",
      "tif": "FrontendMarket",
      "cloid": null
    },
    "status": "filled",
    "statusTimestamp": 1724361546645
  }
]
POST
/info#userTwapSliceFills

Returns at most 2000 most recent TWAP slice fills

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userTwapSliceFills" \  -H "Content-Type: application/json" \  -d '{    "type": "userTwapSliceFills",    "user": "string"  }'
[
  {
    "fill": {
      "closedPnl": "0.0",
      "coin": "AVAX",
      "crossed": true,
      "dir": "Open Long",
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "oid": 90542681,
      "px": "18.435",
      "side": "B",
      "startPosition": "26.86",
      "sz": "93.53",
      "time": 1681222254710,
      "fee": "0.01",
      "feeToken": "USDC",
      "tid": 118906512037719
    },
    "twapId": 3156
  }
]
POST
/info#subAccounts

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#subAccounts" \  -H "Content-Type: application/json" \  -d '{    "type": "subAccounts",    "user": "string"  }'
[
  {
    "name": "Test",
    "subAccountUser": "0x035605fc2f24d65300227189025e90a0d947f16c",
    "master": "0x8c967e73e6b15087c42a10d344cff4c96d877f1d",
    "clearinghouseState": {
      "marginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMarginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMaintenanceMarginUsed": "0.0",
      "withdrawable": "29.78001",
      "assetPositions": [],
      "time": 1733968369395
    },
    "spotState": {
      "balances": [
        {
          "coin": "USDC",
          "token": 0,
          "total": "0.22",
          "hold": "0.0",
          "entryNtl": "0.0"
        }
      ]
    }
  }
]
POST
/info#vaultDetails

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#vaultDetails" \  -H "Content-Type: application/json" \  -d '{    "type": "vaultDetails",    "vaultAddress": "string"  }'
{
  "name": "Test",
  "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
  "leader": "0x677d831aef5328190852e24f13c46cac05f984e7",
  "description": "This community-owned vault provides liquidity to Hyperliquid through multiple market making strategies, performs liquidations, and accrues platform fees.",
  "portfolio": [
    [
      "day",
      {
        "accountValueHistory": [
          [
            1734397526634,
            "329265410.90790099"
          ]
        ],
        "pnlHistory": [
          [
            1734397526634,
            "0.0"
          ]
        ],
        "vlm": "0.0"
      }
    ],
    [
      "week",
      {}
    ]
  ],
  "apr": 0.36387129259090006,
  "followerState": null,
  "leaderFraction": 0.0007904828725729887,
  "leaderCommission": 0,
  "followers": [
    {
      "user": "0x005844b2ffb2e122cf4244be7dbcb4f84924907c",
      "vaultEquity": "714491.71026243",
      "pnl": "3203.43026143",
      "allTimePnl": "79843.74476743",
      "daysFollowing": 388,
      "vaultEntryTime": 1700926145201,
      "lockupUntil": 1734824439201
    }
  ],
  "maxDistributable": 94856870.164485,
  "maxWithdrawable": 742557.680863,
  "isClosed": false,
  "relationship": {
    "type": "parent",
    "data": {
      "childAddresses": [
        "0x010461c14e146ac35fe42271bdc1134ee31c703a",
        "0x2e3d94f0562703b25c83308a05046ddaf9a8dd14",
        "0x31ca8395cf837de08b24da3f660e77761dfb974b"
      ]
    }
  },
  "allowDeposits": true,
  "alwaysCloseOnWithdraw": false
}
POST
/info#userVaultEquities

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userVaultEquities" \  -H "Content-Type: application/json" \  -d '{    "type": "userVaultEquities",    "user": "string"  }'
[
  {
    "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
    "equity": "742500.082809"
  }
]
POST
/info#userRole

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userRole" \  -H "Content-Type: application/json" \  -d '{    "type": "userRole",    "user": "string"  }'

{
  "role": "user"
}

POST
/info#portfolio

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#portfolio" \  -H "Content-Type: application/json" \  -d '{    "type": "portfolio",    "user": "string"  }'
[
  [
    "day",
    {
      "accountValueHistory": [
        [
          1741886630493,
          "0.0"
        ],
        [
          1741895270493,
          "0.0"
        ]
      ],
      "pnlHistory": [
        [
          1741886630493,
          "0.0"
        ],
        [
          1741895270493,
          "0.0"
        ]
      ],
      "vlm": "0.0"
    }
  ],
  [
    "week",
    {}
  ],
  [
    "month",
    {}
  ],
  [
    "allTime",
    {}
  ],
  [
    "perpDay",
    {}
  ],
  [
    "perpWeek",
    {}
  ],
  [
    "perpMonth",
    {}
  ],
  [
    "perpAllTime",
    {}
  ]
]
POST
/info#referral

Query a user's referral information. Note that rewardHistory is for legacy rewards. Claimed rewards are now returned in nonFundingLedgerUpdate.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#referral" \  -H "Content-Type: application/json" \  -d '{    "type": "referral",    "user": "string"  }'
{
  "referredBy": {
    "referrer": "0x5ac99df645f3414876c816caa18b2d234024b487",
    "code": "TESTNET"
  },
  "cumVlm": "149428030.6628420055",
  "unclaimedRewards": "11.047361",
  "claimedRewards": "22.743781",
  "builderRewards": "0.027802",
  "tokenToState": [
    0,
    {
      "cumVlm": "149428030.6628420055",
      "unclaimedRewards": "11.047361",
      "claimedRewards": "22.743781",
      "builderRewards": "0.027802"
    }
  ],
  "referrerState": {
    "stage": "ready",
    "data": {
      "code": "TEST",
      "referralStates": [
        {
          "cumVlm": "960652.017122",
          "cumRewardedFeesSinceReferred": "196.838825",
          "cumFeesRewardedToReferrer": "19.683748",
          "timeJoined": 1679425029416,
          "user": "0x11af2b93dcb3568b7bf2b6bd6182d260a9495728"
        }
      ]
    }
  },
  "rewardHistory": []
}
POST
/info#userFees

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userFees" \  -H "Content-Type: application/json" \  -d '{    "type": "userFees",    "user": "string"  }'
{
  "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.0",
        "discount": "0.0"
      },
      {
        "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"
  }
}
POST
/info#delegations

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#delegations" \  -H "Content-Type: application/json" \  -d '{    "type": "delegations",    "user": "string"  }'
[
  {
    "validator": "0x5ac99df645f3414876c816caa18b2d234024b487",
    "amount": "12060.16529862",
    "lockedUntilTimestamp": 1735466781353
  }
]
POST
/info#delegatorSummary

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#delegatorSummary" \  -H "Content-Type: application/json" \  -d '{    "type": "delegatorSummary",    "user": "string"  }'
{
  "delegated": "12060.16529862",
  "undelegated": "0.0",
  "totalPendingWithdrawal": "0.0",
  "nPendingWithdrawals": 0
}
POST
/info#delegatorHistory

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#delegatorHistory" \  -H "Content-Type: application/json" \  -d '{    "type": "delegatorHistory",    "user": "string"  }'
[
  {
    "time": 1735380381353,
    "hash": "0x55492465cb523f90815a041a226ba90147008d4b221a24ae8dc35a0dbede4ea4",
    "delta": {
      "delegate": {
        "validator": "0x5ac99df645f3414876c816caa18b2d234024b487",
        "amount": "10000.0",
        "isUndelegate": false
      }
    }
  }
]
POST
/info#delegatorRewards

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#delegatorRewards" \  -H "Content-Type: application/json" \  -d '{    "type": "delegatorRewards",    "user": "string"  }'
[
  {
    "time": 1736726400073,
    "source": "delegation",
    "totalAmount": "0.73117184"
  },
  {
    "time": 1736726400073,
    "source": "commission",
    "totalAmount": "130.76445876"
  }
]
POST
/info#userDexAbstraction

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userDexAbstraction" \  -H "Content-Type: application/json" \  -d '{    "type": "userDexAbstraction",    "user": "string"  }'
true
POST
/info#userAbstraction

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#userAbstraction" \  -H "Content-Type: application/json" \  -d '{    "type": "userAbstraction",    "user": "string"  }'
"unifiedAccount"
POST
/info#alignedQuoteTokenInfo

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#alignedQuoteTokenInfo" \  -H "Content-Type: application/json" \  -d '{    "type": "alignedQuoteTokenInfo",    "token": 0  }'
{
  "isAligned": true,
  "firstAlignedTime": 1758949452538,
  "evmMintedSupply": "0.0",
  "dailyAmountOwed": [
    [
      "2025-10-04",
      "0.0"
    ],
    [
      "2025-10-05",
      "0.0"
    ]
  ],
  "predictedRate": "0.01"
}
POST
/info#borrowLendUserState

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#borrowLendUserState" \  -H "Content-Type: application/json" \  -d '{    "type": "borrowLendUserState",    "user": "string"  }'
{
  "tokenToState": [
    [
      0,
      {
        "borrow": {
          "basis": "0.0",
          "value": "0.0"
        },
        "supply": {
          "basis": "44.69295862",
          "value": "44.69692314"
        }
      }
    ],
    [
      1105,
      {
        "borrow": {
          "basis": "0.0",
          "value": "0.0"
        },
        "supply": {
          "basis": "0.0",
          "value": "0.0"
        }
      }
    ]
  ],
  "health": "healthy",
  "healthFactor": null
}
POST
/info#borrowLendReserveState

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#borrowLendReserveState" \  -H "Content-Type: application/json" \  -d '{    "type": "borrowLendReserveState",    "token": 0  }'
{
  "borrowYearlyRate": "0.05",
  "supplyYearlyRate": "0.0008245002",
  "balance": "3245939.4732256099",
  "utilization": "0.018322226",
  "oraclePx": "1.0",
  "ltv": "0.0",
  "totalSupplied": "3306509.7335290499",
  "totalBorrowed": "60582.61869494"
}
POST
/info#allBorrowLendReserveStates

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#allBorrowLendReserveStates" \  -H "Content-Type: application/json" \  -d '{    "type": "allBorrowLendReserveStates"  }'
[
  [
    0,
    {
      "borrowYearlyRate": "0.05",
      "supplyYearlyRate": "0.0008244951",
      "balance": "3245960.0596176102",
      "utilization": "0.0183221137",
      "oraclePx": "1.0",
      "ltv": "0.0",
      "totalSupplied": "3306530.3251102199",
      "totalBorrowed": "60582.62446067"
    }
  ],
  [
    150,
    {
      "borrowYearlyRate": "0.05",
      "supplyYearlyRate": "0.0",
      "balance": "11318.09684696",
      "utilization": "0.0",
      "oraclePx": "23.99",
      "ltv": "0.5",
      "totalSupplied": "11318.09684696",
      "totalBorrowed": "0.0"
    }
  ]
]
POST
/info#approvedBuilders

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#approvedBuilders" \  -H "Content-Type: application/json" \  -d '{    "type": "approvedBuilders",    "user": "string"  }'
[
  "0x476fa87b4d3818f437f38f1263bee508d7672d82"
]