本页面为社区翻译版本,仅供参考;内容以英文原版为准。
查看英文原版 ↗

Info 端点

Info 端点用于获取有关交易所和特定用户的信息。不同的请求体会对应不同的响应体结构。

分页

接受时间范围的响应最多只返回 500 个元素或不同的数据块。要查询更大的范围,请将最后返回的时间戳作为下一次分页查询的 startTime。

永续合约与现货

本节中的端点以及 WebSocket 订阅同时适用于永续合约和现货。对于永续合约,coin 是 meta 响应中返回的名称。对于现货,PURR 的 coin 应为 PURR/USDC,其他所有现货代币则应为 @{index}(例如 @1),其中 index 是 spotMeta 响应中 universe 字段里现货交易对的索引。例如,主网上 HYPE 的现货索引为 @107,因为 HYPE 的代币索引为 150,而现货交易对 @107 的代币为 [150, 0]。请注意,某些资产在用户界面上可能被重新映射。例如,app.hyperliquid.xyz 上的 BTC/USDC 对应主网 HyperCore 上的 UBTC/USDC。可以使用代币详情页上的 L1 名称来检测重新映射。

用户地址

要查询与主账户或子账户关联的账户数据,必须传入该账户的实际地址。一个常见的误区是使用代理钱包(agent wallet)的地址,这会导致返回空结果。

获取所有代币的中间价

POST https://api.hyperliquid.xyz/info

请注意,如果订单簿为空,将使用最近成交价作为回退值

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "allMids"
dex String 永续 dex 名称。默认为空字符串,表示第一个永续 dex。仅当使用第一个永续 dex 时才会包含现货中间价。

{% tabs %}

{
    "APE": "4.33245",
    "ARB": "1.21695"
}

{% endtab %}

获取用户的当前挂单

POST https://api.hyperliquid.xyz/info

查看用户的当前挂单

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "openOrders"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
dex String 永续 dex 名称。默认为空字符串,表示第一个永续 dex。仅当使用第一个永续 dex 时才会包含现货当前挂单。

{% tabs %}

[
    {
        "coin": "BTC",
        "limitPx": "29792.0",
        "oid": 91490942,
        "side": "A",
        "sz": "0.0",
        "timestamp": 1681247412573
    }
]

{% endtab %}

获取用户的当前挂单(含额外前端信息)

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "frontendOpenOrders"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
dex String 永续 dex 名称。默认为空字符串,表示第一个永续 dex。仅当使用第一个永续 dex 时才会包含现货当前挂单。

{% tabs %}

[
    {
        "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",
    }
]

{% endtab %}

获取用户的成交记录

POST https://api.hyperliquid.xyz/info

最多返回最近 2000 条成交记录

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userFills"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
aggregateByTime bool 为 true 时,当一笔 Taker 订单被多笔不同的 Maker 订单成交时,部分成交会被合并。被多笔 Taker 订单成交的 Maker 订单仅在处于同一区块时才会被聚合。

{% tabs %}

[
    // Perp fill (first perp dex)
    {
        "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", // the total fee, inclusive of builderFee below
        "feeToken": "USDC",
        "builderFee": "0.01", // this is optional and will not be present if 0
        "tid": 118906512037719
    },
    // Perp Fill (HIP-3)
    {
        "coin": "xyz:XYZ100", // For HIP-3, the asset has the dex name as a prefix
        "px": "25372.0",
        "sz": "0.0353",
        "side": "B",
        "time": 1767651180109,
        "startPosition": "0.7045",
        "dir": "Open Long",
        "closedPnl": "0.0",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb9",
        "oid": 287286372177,
        "crossed": false,
        "fee": "0.026868",
        "tid": 164087028129848,
        "feeToken":" USDC"
    },
    // Spot fill - note the difference in the "coin" format. Refer to 
    // https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/asset-ids
    // for more information on how spot asset IDs work
    {
        "coin": "@107",
        "px": "18.62041381",
        "sz": "43.84",
        "side": "A",
        "time": 1735969713869,
        "startPosition": "10659.65434798",
        "dir": "Sell",
        "closedPnl": "8722.988077",
        "hash": "0x2222138cc516e3fe746c0411dd733f02e60086f43205af2ae37c93f6a792430b",
        "oid": 59071663721,
        "crossed": true,
        "fee": "0.304521",
        "tid": 907359904431134,
        "feeToken": "USDC"
    }
]

{% endtab %}

按时间获取用户的成交记录

POST https://api.hyperliquid.xyz/info

每次响应最多返回 2000 条成交,且仅可获取最近 10000 条成交

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String userFillsByTime
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
startTime* int 起始时间(毫秒),包含在内
endTime int 结束时间(毫秒),包含在内。默认为当前时间。
aggregateByTime bool 为 true 时,当一笔 Taker 订单被多笔不同的 Maker 订单成交时,部分成交会被合并。被多笔 Taker 订单成交的 Maker 订单仅在处于同一区块时才会被聚合。

{% tabs %}

[
    // Perp fill (first perp dex)
    {
        "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", // the total fee, inclusive of builderFee below
        "feeToken": "USDC",
        "builderFee": "0.01", // this is optional and will not be present if 0
        "tid": 118906512037719
    },
    // Perp Fill (HIP-3)
    {
        "coin": "xyz:XYZ100", // For HIP-3, the asset has the dex name as a prefix
        "px": "25372.0",
        "sz": "0.0353",
        "side": "B",
        "time": 1767651180109,
        "startPosition": "0.7045",
        "dir": "Open Long",
        "closedPnl": "0.0",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb9",
        "oid": 287286372177,
        "crossed": false,
        "fee": "0.026868",
        "tid": 164087028129848,
        "feeToken":" USDC"
    },
    // Spot fill - note the difference in the "coin" format. Refer to 
    // https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/asset-ids
    // for more information on how spot asset IDs work
    {
        "coin": "@107",
        "px": "18.62041381",
        "sz": "43.84",
        "side": "A",
        "time": 1735969713869,
        "startPosition": "10659.65434798",
        "dir": "Sell",
        "closedPnl": "8722.988077",
        "hash": "0x2222138cc516e3fe746c0411dd733f02e60086f43205af2ae37c93f6a792430b",
        "oid": 59071663721,
        "crossed": true,
        "fee": "0.304521",
        "tid": 907359904431134,
        "feeToken": "USDC"
    }
]

{% endtab %}

查询用户速率限制

POST https://api.hyperliquid.xyz/info

请求体

名称 类型 说明
user String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000
type String userRateLimit

{% tabs %}

{
  "cumVlm": "2854574.593578",
  "nRequestsUsed": 2890, // max(0, cumulative_used minus reserved)
  "nRequestsCap": 2864574, 
  "nRequestsSurplus": 0, // max(0, reserved minus cumulative_used)
}

{% endtab %}

通过 oid 或 cloid 查询订单状态

POST https://api.hyperliquid.xyz/info

请求体

名称 类型 说明
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
type* String "orderStatus"
oid* uint64 or string 表示订单 ID 的 u64,或表示客户端订单 ID 的 16 字节十六进制字符串

返回的 \ 字符串有以下可能的值:

订单状态 说明
open 下单成功
filled 已成交
canceled 被用户取消
triggered 触发订单已触发
rejected 下单时被拒绝
marginCanceled 因保证金不足以成交而被取消
vaultWithdrawalCanceled 仅限金库。因用户从金库提款而被取消
openInterestCapCanceled 因未平仓量达到上限时订单过于激进而被取消
selfTradeCanceled 因自我交易防护而被取消
reduceOnlyCanceled 仅减仓订单因未减少仓位而被取消
siblingFilledCanceled 仅限 TP/SL。因同级(sibling)订单已成交而被取消
delistedCanceled 因资产下架而被取消
liquidatedCanceled 因清算而被取消
scheduledCancel 仅限 API。因超过预定取消截止时间(dead man's switch)而被取消
tickRejected 因无效的 tick 价格而被拒绝
minTradeNtlRejected 因订单名义价值低于最小值而被拒绝
perpMarginRejected 因保证金不足而被拒绝
reduceOnlyRejected 因仅减仓而被拒绝
badAloPxRejected 因 post-only 订单立即成交而被拒绝
iocCancelRejected 因 IOC 无法成交而被拒绝
badTriggerPxRejected 因无效的 TP/SL 价格而被拒绝
marketOrderNoLiquidityRejected 因市价订单缺乏流动性而被拒绝
positionIncreaseAtOpenInterestCapRejected 因未平仓量上限而被拒绝
positionFlipAtOpenInterestCapRejected 因未平仓量上限而被拒绝
tooAggressiveAtOpenInterestCapRejected 因未平仓量达到上限时价格过于激进而被拒绝
openInterestIncreaseRejected 因未平仓量上限而被拒绝
insufficientSpotBalanceRejected 因现货余额不足而被拒绝
oracleRejected 因价格偏离预言机过远而被拒绝
perpMaxPositionRejected 因在当前杠杆下超过保证金档位限制而被拒绝

{% tabs %}

{
  "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": <status>,
    "statusTimestamp": 1724361546645
  }
}

{% endtab %}

{% tab title="200: OK Missing Order" %}

{
  "status": "unknownOid"
}

{% endtab %}

L2 订单簿快照

POST https://api.hyperliquid.xyz/info

每侧最多返回 20 档

请求头

名称 值
Content-Type* "application/json"

请求体

名称 类型 说明
type* String "l2Book"
coin* String coin
nSigFigs Number 可选字段,用于将档位聚合到 nSigFigs 位有效数字。有效值为 2、3、4、5 和 null,其中 null 表示完整精度
mantissa Number 可选字段,用于聚合档位。仅当 nSigFigs 为 5 时才允许使用此字段。接受 1、2 或 5 的值。

响应

{% tabs %}

{
  "coin": "BTC",
  "time": 1754450974231,
  "levels": [
    [
      {
        "px": "113377.0",
        "sz": "7.6699",
        "n": 17 // number of levels
      },
      {
        "px": "113376.0",
        "sz": "4.13714",
        "n": 8
      },
    ],
    [
      {
        "px": "113397.0",
        "sz": "0.11543",
        "n": 3
      }
    ]
  ]
}

{% endtab %}

K 线快照

POST https://api.hyperliquid.xyz/info

仅可获取最近 5000 根 K 线

支持的间隔:"1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"

请求头

名称 值
Content-Type* "application/json"

请求体

名称 类型 说明
type* String "candleSnapshot"
req* Object

{"coin": \, "interval": "15m", "startTime": \, "endTime": \}
对于 HIP-3,需要加上 dex 名称前缀,例如 "xyz:XYZ100"

响应

{% tabs %}

[
  {
    "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"
  }
]

{% endtab %}

检查 Builder 手续费批准

POST https://api.hyperliquid.xyz/info

请求头

名称 值
Content-Type* "application/json"

请求体

名称 类型 说明
type* String "maxBuilderFee"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
builder* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

响应

{% tabs %}

1 // maximum fee approved in tenths of a basis point i.e. 1 means 0.001%

{% endtab %}

获取用户的历史订单

POST https://api.hyperliquid.xyz/info

最多返回最近 2000 条历史订单

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "historicalOrders"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
  {
    "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" | "open" | "canceled" | "triggered" | "rejected" | "marginCanceled",
    "statusTimestamp": 1724361546645
  }
]

{% endtab %}

获取用户的 TWAP 切片成交

POST https://api.hyperliquid.xyz/info

最多返回最近 2000 条 TWAP 切片成交

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userTwapSliceFills"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
    {
        "fill": {
            "closedPnl": "0.0",
            "coin": "AVAX",
            "crossed": true,
            "dir": "Open Long",
            "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", // TWAP fills have a hash of 0
            "oid": 90542681,
            "px": "18.435",
            "side": "B",
            "startPosition": "26.86",
            "sz": "93.53",
            "time": 1681222254710,
            "fee": "0.01",
            "feeToken": "USDC",
            "tid": 118906512037719
        },
        "twapId": 3156
    }
]

{% endtab %}

获取用户的子账户

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "subAccounts"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
  {
    "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"
        }
      ]
    }
  }
]

{% endtab %}

获取金库详情

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "vaultDetails"
vaultAddress* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。
user String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{
  "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" | "month" | "allTime" | "perpDay" | "perpWeek" | "perpMonth" | "perpAllTime",
      {...}
    ]
  ],
  "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
}  

{% endtab %}

获取用户的金库存入

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userVaultEquities"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
  {
    "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
    "equity": "742500.082809",
  }
]

{% endtab %}

查询用户的角色

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userRole"
user* String 42 位十六进制格式的地址;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{"role":"user"} # "missing", "user", "agent", "vault", or "subAccount"

{% endtab %}

{% tab title="Agent" %}

{"role":"agent", "data": {"user": "0x..."}}

{% endtab %}

{% tab title="Vault" %}

{"role":"vault"}

{% endtab %}

{% tab title="Subaccount" %}

{"role":"subAccount", "data":{"master":"0x..."}}

{% endtab %}

{% tab title="Missing" %}

{"role":"missing"}

{% endtab %}

查询用户的投资组合

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "portfolio"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
  [
    "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", { ... }]
]

{% endtab %}

查询用户的推荐信息

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "referral"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{
    "referredBy": {
        "referrer": "0x5ac99df645f3414876c816caa18b2d234024b487",
        "code": "TESTNET"
    },
    "cumVlm": "149428030.6628420055", // USDC Only
    "unclaimedRewards": "11.047361", // USDC Only
    "claimedRewards": "22.743781", // USDC Only
    "builderRewards": "0.027802", // USDC Only
    "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"
                },
                {
                    "cumVlm": "438278.672653",
                    "cumRewardedFeesSinceReferred": "97.628107",
                    "cumFeesRewardedToReferrer": "9.762562",
                    "timeJoined": 1679423947882,
                    "user": "0x3f69d170055913103a034a418953b8695e4e42fa"
                }
            ]
        }
    },
    "rewardHistory": []
}

{% endtab %}

请注意,rewardHistory 用于旧版奖励。已领取的奖励现在通过 nonFundingLedgerUpdate 返回

查询用户的手续费

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userFees"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{
  "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"
  }
}

{% endtab %}

查询用户的质押委托

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "delegations"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
    {
        "validator":"0x5ac99df645f3414876c816caa18b2d234024b487",
        "amount":"12060.16529862",
        "lockedUntilTimestamp":1735466781353
    },
    ...
]

{% endtab %}

查询用户的质押摘要

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "delegatorSummary"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{
    "delegated": "12060.16529862",
    "undelegated": "0.0",
    "totalPendingWithdrawal": "0.0",
    "nPendingWithdrawals": 0
}

{% endtab %}

查询用户的质押历史

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "delegatorHistory"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
    {
        "time": 1735380381353,
        "hash": "0x55492465cb523f90815a041a226ba90147008d4b221a24ae8dc35a0dbede4ea4",
        "delta": {
            "delegate": {
                "validator": "0x5ac99df645f3414876c816caa18b2d234024b487",
                "amount": "10000.0",
                "isUndelegate": false
            }
        }
    },
    ...
]

{% endtab %}

查询用户的质押奖励

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "delegatorRewards"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

[
    {
        "time": 1736726400073,
        "source": "delegation",
        "totalAmount": "0.73117184"
    },
    {
        "time": 1736726400073,
        "source": "commission",
        "totalAmount": "130.76445876"
    },
    ...
]

{% endtab %}

查询用户的 HIP-3 DEX 抽象状态

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userDexAbstraction"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

true

{% endtab %}

查询用户的抽象状态

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "userAbstraction"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

"unifiedAccount" | "portfolioMargin" | "disabled" | "default" | "dexAbstraction"

{% endtab %}

查询借贷用户状态

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "borrowLendUserState"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

{
    "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
}

{% endtab %}

查询借贷储备状态

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "borrowLendReserveState"
token* Number 代币索引

{% tabs %}

{
    "borrowYearlyRate": "0.05",
    "supplyYearlyRate": "0.0008245002",
    "balance": "3245939.4732256099",
    "utilization": "0.018322226",
    "oraclePx": "1.0",
    "ltv": "0.0",
    "totalSupplied": "3306509.7335290499",
    "totalBorrowed": "60582.61869494"
}

{% endtab %}

查询所有借贷储备状态

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "allBorrowLendReserveStates"

{% tabs %}

[
    [
        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"
        }
    ]
]

{% endtab %}

查询用户已批准的 Builder

POST https://api.hyperliquid.xyz/info

请求头

名称 类型 说明
Content-Type* String "application/json"

请求体

名称 类型 说明
type* String "approvedBuilders"
user* String 十六进制格式;例如 0x0000000000000000000000000000000000000000。

{% tabs %}

["0x476fa87b4d3818f437f38f1263bee508d7672d82"]

{% endtab %}

非官方社区镜像与翻译,内容版权归 Hyperliquid 所有,以英文原版为准。 来源: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint