Hyperliquid API
Hyperbot API 提供基于 Hyperliquid 验证节点的深度数据服务。除基础的 Ticker 行情、订单与成交接口外,还支持获取 账户 PnL 曲线、交易员画像分析 以及 鲸鱼/聪明钱 等链上博弈数据。
WebSocket 订阅
提供 Hyperliquid WebSocket 接入能力。
- WebSocket 订阅入口:
/api/upgrade/v2/hl/ws - 用户成交订阅:
/api/upgrade/v2/hl/ws/fills - 用户成交订单订阅:
/api/upgrade/v2/hl/ws/filled-orders
鉴权方式
WebSocket 连接使用与 HTTP 接口一致的签名参数,作为 QueryString 传入:
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒)
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
连接示例
wscat -c "wss://openapi.hyperbot.network/api/upgrade/v2/hl/ws?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
WebSocket:官方订阅兼容入口
- 路径:
/api/upgrade/v2/hl/ws
该入口兼容 Hyperliquid 官方 WebSocket API 的订阅格式({"method":"subscribe","subscription":{...}})。
支持的订阅类型(subscription.type)
tradesopenOrdersclearinghouseStatel2BookbbocandleuserFillsuserNonFundingLedgerUpdates
candle 订阅
订阅消息:
{
"method": "subscribe",
"subscription": {
"type": "candle",
"coin": "BTC",
"interval": "1m"
}
}
- 支持 interval:
1s、5s、15s、1m、15m、1h、4h - 最小推送间隔:
0.5s - 新增字段:
a:volume(quote unit)nb/vb/ab:n/v/a的 buy_taker 部分
订阅示例
{
"method": "subscribe",
"subscription": {
"type": "trades",
"coin": "BTC"
}
}
WebSocket:订阅用户成交
订阅用户成交(fills),支持多地址。
订阅消息
{
"type": "subscribe",
"address": [
"0xbadb...",
"0x0104..."
]
}
推送消息示例
{
"type": "data",
"data": {
"address": "0x31ca...",
"time": 1763215209696,
"coin": "ZRO",
"px": "1.4646",
"sz": "12",
"side": "B",
"startPosition": "-18867.6",
"dir": "Close Short",
"closedPnl": "0.08832",
"hash": "0x5610...",
"oid": 2361000,
"crossed": true,
"fee": "0",
"tid": 6486724000,
"feeToken": "USDC",
"twapId": null
}
}
连接
wscat -c "wss://openapi.hyperbot.network/api/upgrade/v2/hl/ws/fills?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
WebSocket:订阅用户成交订单
订阅用户成交订单(filled-orders),支持多地址。
订阅消息
订阅消息与 /api/upgrade/v2/hl/ws/fills 一致。
推送消息示例
{
"type": "data",
"data": {
"ts": 1763300544139,
"address": "0xf048...",
"hash": "",
"builder": "",
"builderF": "0",
"status": "filled",
"coin": "BTC",
"side": "B",
"limitPx": "95263",
"sz": "0",
"oid": 2372804000,
"placeTs": 1763300530579,
"trigger": "N/A",
"isTrigger": false,
"triggerPx": "0",
"children": [],
"positionTpsl": false,
"reduceOnly": false,
"orderType": "Limit",
"origSz": "0.00011",
"tif": "Alo",
"cloid": "0xf1d..."
}
}
连接
wscat -c "wss://openapi.hyperbot.network/api/upgrade/v2/hl/ws/filled-orders?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
WebSocket:订阅用户账户状态
订阅用户账户状态(clearinghouseState),支持多地址。
查询参数
- Name
dex- Type
- string
- Description
可选,指定 dex,默认为主 dex(空串)。一个连接支持一个 dex,多个 dex 使用多个连接(
?dex=xyz)
订阅消息
订阅消息与 /api/upgrade/v2/hl/ws/fills 一致。
{
"type": "subscribe",
"address": [
"0xb104xx",
"0x0104..."
]
}
推送消息示例
{
"channel": "clearinghouseState",
"data": {
"address": "0xb104xx",
"state": {
"marginSummary": {
"accountValue": "121494005.579362005",
"totalNtlPos": "17403841.3265889995",
"totalRawUsd": "118459535.708464995",
"totalMarginUsed": "870192.066275"
},
"crossMarginSummary": {
"accountValue": "121494005.579362005",
"totalNtlPos": "17403841.3265889995",
"totalRawUsd": "118459535.708464995",
"totalMarginUsed": "870192.066275"
},
"crossMaintenanceMarginUsed": "174038.413194",
"withdrawable": "119753621.446747005",
"assetPositions": [
{
"type": "oneWay",
"position": {
"coin": "BTC",
"szi": "28.33636",
"leverage": {
"type": "cross",
"value": 20,
"rawUsd": null
},
"entryPx": "71221.7",
"positionValue": "1995673.1620799999",
"unrealizedPnl": "-22491.789509",
"returnOnEquity": "-0.2228934705",
"liquidationPx": null,
"marginUsed": "99783.658104",
"maxLeverage": 50,
"cumFunding": {
"allTime": "-620193.219711",
"sinceOpen": "13300.036167",
"sinceChange": "0"
}
}
}
],
"time": 1772790208806
}
}
}
连接
wscat -c "wss://openapi.hyperbot.network/api/upgrade/v2/hl/ws/clearinghouse-state?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
获取所有 Ticker 数据
获取 Hyperliquid 所有币种的最新交易价格数据。
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
Ticker 数据数组
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/tickers \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "BTC",
"price": "42000.50"
},
{
"coin": "ETH",
"price": "2500.30"
}
]
}
获取指定币种 Ticker 数据
获取 Hyperliquid 指定币种的最新交易价格数据。
路径参数
- Name
coin- Type
- string
- Description
币种名称,如
ETH、BTC
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
指定币种的 Ticker 数据
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/tickers/coin/ETH \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"coin": "ETH",
"price": "2500.30"
}
}
获取用户成交数据
获取指定地址的用户最新成交记录,按时间排序。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种的成交记录
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 1000,最大 2000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/fills/0x0089xxx?limit=20&coin=ETH" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"time": 1704355200000,
"oid": 2361000
}
]
}
根据订单ID获取成交数据
获取指定订单 ID (oid) 的成交记录,按时间排序。
路径参数
- Name
oid- Type
- string
- Description
订单 ID,如
2361000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录数组
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/fills/oid/2361000 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"time": 1704355200000,
"oid": 2361000
}
]
}
根据TWAP ID获取成交数据
获取指定 TWAP ID (twapId) 的成交记录,按时间排序。
路径参数
- Name
twapid- Type
- string
- Description
TWAP ID,如
1509340
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录数组
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/fills/twapid/1509340 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "XRP",
"side": "B",
"px": "2.0418",
"sz": "33",
"time": 1768254978060,
"twapId": 1509340
}
]
}
获取Builder最新成交
获取指定 Builder 地址的最新成交记录,按时间排序。支持按币种筛选和最小成交额过滤。
路径参数
- Name
builder- Type
- string
- Description
Builder 钱包地址,如
0xb84168cf3be63c6b8dad05ff5d755e97432ff80b
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种的成交记录,如
BTC
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 1000,最大 2000
- Name
minVal- Type
- integer
- Description
可选,最小成交额过滤(USD)
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录数组
- Name
coin- Type
- string
- Description
币种,如
BTC
- Name
side- Type
- string
- Description
成交方向,
B买入,A卖出
- Name
px- Type
- string
- Description
成交价格
- Name
sz- Type
- string
- Description
成交数量
- Name
time- Type
- integer
- Description
成交时间戳(毫秒)
- Name
hash- Type
- string
- Description
交易哈希
- Name
oid- Type
- integer
- Description
订单ID
- Name
builderFee- Type
- string
- Description
Builder 费用
- Name
fee- Type
- string
- Description
手续费
- Name
dir- Type
- string
- Description
方向描述,如
Open Long、Open Short
- Name
crossed- Type
- boolean
- Description
是否 crossed
- Name
closedPnl- Type
- string
- Description
已实现盈亏
- Name
startPosition- Type
- string
- Description
起始仓位
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/fills/builder/0xb84168cf3be63c6b8dad05ff5d755e97432ff80b/latest?coin=BTC&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"builderFee": "0.199739",
"closedPnl": "0",
"coin": "BTC",
"crossed": true,
"dir": "Open Short",
"fee": "0.372313",
"feeToken": "USDC",
"hash": "0x913dbace8947034d92b70436694e6f02012100b4244a221f35066621484add38",
"oid": 337685601283,
"px": "69839",
"side": "A",
"startPosition": "-0.00582",
"sz": "0.00572",
"time": 1772613830312
}
]
}
获取Top成交
查询最近 Top N 成交,按成交价值排序。
查询参数
- Name
interval- Type
- string
- Description
必传,时间周期,取值范围
1s~7d
- Name
coin- Type
- string
- Description
必传,筛选指定币种,如
BTC、ETH
- Name
limit- Type
- integer
- Description
必传,返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
Top 成交记录数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/fills/top-trades?interval=4h&coin=ETH&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1770519070989,
"address": "0x61ceefxx",
"coin": "ETH",
"side": "A",
"oid": 31541321,
"isTaker": true,
"px": "2088.173291377",
"sz": "2448.34",
"val": "5112558.19621",
"endPosition": "1487.685"
}
]
}
获取成交订单数据
获取指定地址的最新成交订单,按时间倒序排列。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种的成交订单
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 1000,最大 1000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交订单数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/filled-orders/0x0089xxx/latest?coin=ETH&limit=1000" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"oid": "23671238460",
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"filledSize": "1.5",
"status": "filled",
"time": 1704355200000
}
]
}
根据订单ID获取成交订单
根据订单 ID (oid) 获取指定的成交订单详情。如不存在或未成交返回 null。
路径参数
- Name
oid- Type
- string
- Description
订单 ID,如
23671238460
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
成交订单详情,如不存在返回 null
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/filled-orders/oid/23671238460 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"oid": "23671238460",
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"filledSize": "1.5",
"status": "filled",
"time": 1704355200000
}
}
获取最新订单数据
获取指定地址的最新订单(含已取消),按时间倒序排列。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种的订单
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 2000,最大 2000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
订单数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/orders/0x0089xxx/latest?coin=ETH&limit=2000" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"oid": "23671238461",
"coin": "ETH",
"side": "sell",
"price": "2600.00",
"size": "2.0",
"filledSize": "0",
"status": "cancelled",
"time": 1704355300000
},
{
"oid": "23671238460",
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"filledSize": "1.5",
"status": "filled",
"time": 1704355200000
}
]
}
根据订单ID获取订单
根据订单 ID (oid) 获取指定订单详情。如不存在或未成交返回 null。
路径参数
- Name
oid- Type
- string
- Description
订单 ID,如
23671238460
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
订单详情,如不存在返回 null
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/orders/oid/23671238460 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"oid": "23671238460",
"coin": "ETH",
"side": "buy",
"price": "2500.30",
"size": "1.5",
"filledSize": "1.5",
"status": "filled",
"time": 1704355200000
}
}
获取Top挂单
查询当前 Top N 挂单,按订单价值(limitPx × sz)排序。
查询参数
- Name
minVal- Type
- string
- Description
可选,最小订单价值筛选
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
Top 挂单数组,
distPct为与最新交易价的距离百分比
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/orders/top-open-orders?minVal=1000000&coin=BTC&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1770302531539,
"address": "0xab5e6xx",
"oid": 3128418,
"coin": "ETH",
"side": "A",
"sz": "5724.8734",
"origSz": "5724.8734",
"limitPx": "2139.4",
"val": "12247794.15196",
"reduceOnly": false,
"tif": "Alo",
"distPct": "2.83105022831"
}
]
}
获取挂单统计
获取当前挂单统计数据,包括多空挂单数量、价值及鲸鱼挂单占比。
查询参数
- Name
whaleThreshold- Type
- string
- Description
可选,鲸鱼标准(订单价值 limitPx × sz)
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
挂单统计数据,
bidValueRatio为买单价值占总量之比
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/orders/active-stats?coin=BTC&whaleThreshold=500000" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"totalCount": 25378,
"bidCount": 14152,
"askCount": 11226,
"bidValue": "345449237.071845",
"askValue": "318547527.07548",
"bidValueRatio": "0.5202574104",
"whaleBidCount": 502,
"whaleAskCount": 371,
"whaleBidValue": "252957353.94303",
"whaleAskValue": "253526361.56739",
"whaleBidValueRatio": "0.3809617269"
}
}
获取账户价值曲线和PNL曲线
获取指定时间窗口的账户价值曲线和 PNL 曲线数据。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
- Name
window- Type
- string
- Description
时间窗口,可选值:
day、week、month、allTime
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
包含账户价值曲线和 PNL 曲线的数据
请求
curl -G https://openapi.hyperbot.network/api/upgrade/v2/hl/portfolio/0x0089xxx/week \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"accountValue": [
{"time": 1704268800000, "value": "10000.00"},
{"time": 1704355200000, "value": "10500.00"}
],
"pnl": [
{"time": 1704268800000, "value": "0.00"},
{"time": 1704355200000, "value": "500.00"}
]
}
}
获取PNL曲线
获取指定周期的 PNL 曲线数据。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
period- Type
- integer
- Description
周期天数,默认 0。可选值:
0(allTime)、1、7、30
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
PNL 曲线数据数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/pnls/0x0089xxx?period=7" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{"time": 1704268800000, "pnl": "0.00"},
{"time": 1704355200000, "pnl": "500.00"},
{"time": 1704441600000, "pnl": "750.00"}
]
}
获取收益最高的交易
获取周期内完成的收益最高的交易(仓位)列表。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
查询参数
- Name
period- Type
- integer
- Description
周期天数,如
1、7、30等
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
收益最高的交易列表
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/best-trades?limit=10&period=30" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "ETH",
"side": "long",
"entryPrice": "2400.00",
"exitPrice": "2600.00",
"pnl": "2000.00",
"pnlPercent": "8.33",
"openTime": 1704268800000,
"closeTime": 1704355200000
}
]
}
获取分币种交易统计
对周期内完成的交易分币种统计。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
查询参数
- Name
period- Type
- integer
- Description
周期天数,如
1、7、30等,0表示 All Time
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
分币种的交易统计数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/performance-by-coin?limit=10&period=7" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "ETH",
"tradeCount": 15,
"winCount": 10,
"lossCount": 5,
"winRate": "66.67",
"totalPnl": "5000.00",
"avgPnl": "333.33"
},
{
"coin": "BTC",
"tradeCount": 8,
"winCount": 5,
"lossCount": 3,
"winRate": "62.50",
"totalPnl": "3000.00",
"avgPnl": "375.00"
}
]
}
获取交易统计
对周期内完成的交易的统计数据。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
查询参数
- Name
period- Type
- integer
- Description
周期天数,如
1、7、30等,默认7
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
交易统计数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/addr-stat?period=7" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"avgPosDuration": "3600",
"closePosCount": 15,
"maxDrawdown": "0.1234",
"orderCount": 23,
"totalPnl": "8000.00",
"winRate": "0.6522"
}
}
批量获取交易统计
批量查询多个地址的交易统计数据,是 /api/upgrade/v2/hl/traders/:address/addr-stat 的批量版本。
请求参数
- Name
addresses- Type
- array[string]
- Description
地址列表,最多 50 个地址
- Name
period- Type
- integer
- Description
周期天数:
1、7、30、0(0 表示 all-time,默认 7)
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array[object]
- Description
交易统计数据列表
返回字段说明
- Name
address- Type
- string
- Description
用户钱包地址
- Name
winRate- Type
- string
- Description
胜率
- Name
orderCount- Type
- integer
- Description
成交订单数
- Name
closePosCount- Type
- integer
- Description
平仓次数
- Name
avgPosDuration- Type
- integer
- Description
平均持仓时间(秒)
- Name
maxDrawdown- Type
- string
- Description
最大回撤
- Name
totalPnl- Type
- string
- Description
总盈亏
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/batch-addr-stat?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"addresses":["0xfeeexx","0x5b5d51203a0f9079f8aeb098a6523a13f298c060"],"period":7}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xfeeexx",
"winRate": "0.5414634146341464",
"orderCount": 9662,
"closePosCount": 205,
"avgPosDuration": 2910,
"maxDrawdown": "0.43635643",
"totalPnl": "1383.985419"
}
]
}
获取已完成交易列表
查询最新完成的交易(仓位)列表。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 100,最大 2000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
已完成交易列表
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/completed-trades?limit=2000" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "ETH",
"side": "long",
"entryPrice": "2400.00",
"exitPrice": "2600.00",
"size": "10.0",
"pnl": "2000.00",
"pnlPercent": "8.33",
"openTime": 1704268800000,
"closeTime": 1704355200000
},
{
"coin": "BTC",
"side": "short",
"entryPrice": "43000.00",
"exitPrice": "42500.00",
"size": "0.5",
"pnl": "250.00",
"pnlPercent": "1.16",
"openTime": 1704182400000,
"closeTime": 1704268800000
}
]
}
按时间查询已完成交易
按时间范围查询已完成的交易(仓位),支持分页。结果按 endTime 顺序排列。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
请求体参数
- Name
pageNum- Type
- integer
- Description
页码,默认 1。最大限制 50
- Name
pageSize- Type
- integer
- Description
每页记录数,默认 20。最大限制 2000
- Name
Coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
- Name
endTimeFrom- Type
- integer
- Description
可选,结束时间起始(毫秒时间戳)
- Name
endTimeTo- Type
- integer
- Description
可选,结束时间截止(毫秒时间戳)
认证参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
分页数据,包含
list(交易列表)、total(总数)、pageNum、pageSize
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfeee942a06d2f8012823ccde7bf7bcbcaa29a09f/completed-trades/by-time?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"pageNum": 2,
"pageSize": 10,
"Coin": "BTC",
"endTimeFrom": 1771891200000,
"endTimeTo": 1772064000000
}'
响应
{
"code": "0",
"msg": "success",
"data": {
"list": [
{
"coin": "BTC",
"side": "long",
"entryPrice": "43000.00",
"exitPrice": "45000.00",
"size": "1.0",
"pnl": "2000.00",
"pnlPercent": "4.65",
"openTime": 1771891200000,
"closeTime": 1771977600000
}
],
"total": 25,
"pageNum": 2,
"pageSize": 10
}
}
获取当前仓位历史
获取指定币种的当前仓位的历史数据。如果无当前仓位,返回 data: null。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
当前仓位历史数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/current-position-history/BTC" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"history": [
{
"time": 1770419747107,
"size": "0.00016",
"leverage": 40,
"effLeverage": null,
"entryPrice": "70898",
"positionValue": "11.34368",
"unrealizedPnl": "0",
"returnOnEquity": "0",
"liqPrice": null,
"marginUsed": "0.283592",
"cumFunding": "0"
}
]
}
}
获取已完成仓位历史
获取指定币种、指定开始/完成时间的已完成仓位的历史数据。如果未找到仓位返回 400 错误。startTime/endTime 至少传一个。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
startTime- Type
- integer
- Description
开始时间戳(毫秒),与 endTime 至少传一个
- Name
endTime- Type
- integer
- Description
结束时间戳(毫秒),与 startTime 至少传一个
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
已完成仓位历史数据,比当前仓位历史接口多
endTime字段
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/completed-position-history/BTC?startTime=1770000000000&endTime=1770620000000" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"endTime": "2026-02-08T12:00:00.000Z",
"history": [
{
"time": 1770419747107,
"size": "0.00016",
"leverage": 40,
"entryPrice": "70898",
"positionValue": "11.34368",
"unrealizedPnl": "0",
"returnOnEquity": "0",
"marginUsed": "0.283592",
"cumFunding": "0"
}
]
}
}
获取当前仓位PnL
获取指定币种的当前仓位的 PnL 历史,按周期聚合。如果无当前仓位,返回 data: null。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期。取值范围:
15m~1d
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 20,最大 1000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
当前仓位 PnL 数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/current-position-pnl/BTC?interval=4h&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"interval": "4h",
"pnls": [
{
"time": 1770465600000,
"size": "0.22452",
"positionValue": "15356.71896",
"unrealizedPnl": "-227.356711"
}
]
}
}
获取已完成仓位PnL
获取指定币种、指定开始/完成时间的已完成仓位的 PnL 历史。如果未找到仓位返回 400 错误。startTime/endTime 至少传一个。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期。取值范围:
15m~1d
- Name
startTime- Type
- integer
- Description
开始时间戳(毫秒),与 endTime 至少传一个
- Name
endTime- Type
- integer
- Description
结束时间戳(毫秒),与 startTime 至少传一个
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 20,最大 1000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
已完成仓位 PnL 数据,比当前仓位 PnL 接口多
endTime字段
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/completed-position-pnl/BTC?interval=4h&startTime=1770000000000&endTime=1770620000000&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"endTime": "2026-02-08T12:00:00.000Z",
"interval": "4h",
"pnls": [
{
"time": 1770465600000,
"size": "0.22452",
"positionValue": "15356.71896",
"unrealizedPnl": "-227.356711"
}
]
}
}
获取当前仓位操盘轨迹
获取指定币种的当前仓位的操盘轨迹,按周期聚合。如果无当前仓位,返回 data: null。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期。取值范围:
15m~1d
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 20,最大 1000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
当前仓位操盘轨迹数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/current-position-executions/BTC?interval=4h&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"interval": "4h",
"executions": [
{
"time": 1770465600000,
"buyCount": 309,
"sellCount": 1,
"buySz": "0.04749",
"sellSz": "0.02256",
"buyAvgPx": "69025.5129500947",
"sellAvgPx": null
}
]
}
}
获取已完成仓位操盘轨迹
获取指定已完成仓位的操盘轨迹,按周期聚合。如果未找到仓位返回 400 错误。startTime/endTime 至少传一个。
提示:startTime 和 endTime 可从以下接口获取,用于定位历史仓位:
- 已完成交易列表 (
/hl/traders/:address/completed-trades) 返回的openTime/closeTime - 按时间查询完成的交易 (
/hl/traders/:address/completed-trades/by-time) 返回的openTime/closeTime
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期。取值范围:
15m~1d
- Name
startTime- Type
- integer
- Description
开始时间戳(毫秒),与 endTime 至少传一个
- Name
endTime- Type
- integer
- Description
结束时间戳(毫秒),与 startTime 至少传一个
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 20,最大 1000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
已完成仓位操盘轨迹数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/0xfe00xxx/completed-position-executions/BTC?interval=4h&startTime=1770000000000&endTime=1770620000000&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"address": "0x9ec000",
"coin": "BTC",
"direction": "long",
"cross": true,
"startTime": "2026-02-06T23:15:46.098Z",
"endTime": "2026-02-08T12:00:00.000Z",
"interval": "4h",
"executions": [
{
"time": 1770465600000,
"buyCount": 309,
"sellCount": 1,
"buySz": "0.04749",
"sellSz": "0.02256",
"buyAvgPx": "69025.5129500947",
"sellAvgPx": null
}
]
}
}
批量查询账户信息
查询多个地址的账户情况。
请求体参数
- Name
addresses- Type
- array
- Description
地址列表,最多 50 个地址,超出时静默截取前 50 个
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
账户信息列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/accounts?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"addresses": [
"0xfe00xxx",
"0xaf72xxx"
]
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xfe00xxx",
"currentPosition": 3,
"effLeverage": "5.123",
"lastOperationAt": 1770302542171,
"leverage": null,
"marginUsage": "50000.00",
"marginUsageRate": "0.333",
"perpValue": "100000.00",
"spotValue": "50000.00",
"totalValue": "150000.00"
}
]
}
批量查询交易统计
查询多个地址的指定周期的交易统计。
请求体参数
- Name
period- Type
- integer
- Description
周期天数,如
1、7、30等,0表示 All Time,默认7
- Name
pnlList- Type
- boolean
- Description
是否需要 pnl 曲线数据
- Name
addresses- Type
- array
- Description
地址列表,最多 50 个地址,超出时静默截取前 50 个
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
交易统计数据列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/statistics?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"period": 7,
"pnlList": false,
"addresses": [
"0xfe00xxx",
"0xaf72xxx"
]
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xfe00xxx",
"avgHoldingSec": 16522,
"currentPosition": 10,
"effLeverage": "9.63",
"lastOperationAt": 1770302542171,
"leverage": null,
"longPnl": "11471.623794",
"longWr": "1",
"marginUsage": "77645.888329",
"marginUsageRate": "0.6038",
"perpValue": "128593.132716",
"pnlList": null,
"positions": 47,
"profitPositions": 47,
"realizedPnl": "13672.918609",
"shortPnl": "11471.623794",
"shortWr": "1",
"spotValue": "39161.07",
"totalValue": "167754.21",
"winRate": "1"
}
]
}
批量获取永续合约账户状态
批量获取多个地址的永续合约账户状态,相当于 POST /info 中 type=clearinghouseState 的多地址版本。
请求参数
- Name
addresses- Type
- array
- Description
必填,地址列表,最多 50 个,超出时静默截取前 50 个
- Name
dex- Type
- string
- Description
可选,DEX名称,默认空字符串表示主DEX
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
账户状态列表
- Name
data[].address- Type
- string
- Description
地址
- Name
data[].state- Type
- object
- Description
账户状态详情
- Name
data[].state.marginSummary- Type
- object
- Description
保证金摘要
- Name
data[].state.marginSummary.accountValue- Type
- string
- Description
账户价值
- Name
data[].state.marginSummary.totalNtlPos- Type
- string
- Description
总仓位价值
- Name
data[].state.marginSummary.totalRawUsd- Type
- string
- Description
总原始USD
- Name
data[].state.marginSummary.totalMarginUsed- Type
- string
- Description
总已用保证金
- Name
data[].state.crossMarginSummary- Type
- object
- Description
全仓保证金摘要
- Name
data[].state.crossMaintenanceMarginUsed- Type
- string
- Description
全仓维持保证金
- Name
data[].state.withdrawable- Type
- string
- Description
可提取金额
- Name
data[].state.assetPositions- Type
- array
- Description
持仓列表
- Name
data[].state.time- Type
- integer
- Description
时间戳(毫秒)
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/clearinghouse-state?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"addresses": [
"0xfe00xxx",
"0xaf72xxx"
],
"dex": ""
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xaf72xxx",
"state": {
"marginSummary": {
"accountValue": "18755.769289",
"totalNtlPos": "20822.33631",
"totalRawUsd": "39578.105599",
"totalMarginUsed": "1041.116815"
},
"crossMarginSummary": {
"accountValue": "18755.769289",
"totalNtlPos": "20822.33631",
"totalRawUsd": "39578.105599",
"totalMarginUsed": "1041.116815"
},
"crossMaintenanceMarginUsed": "260.279203",
"withdrawable": "16673.535658",
"assetPositions": [
{
"type": "oneWay",
"position": {
"coin": "BTC",
"szi": "-0.30291",
"leverage": {
"type": "cross",
"value": 20,
"rawUsd": null
},
"entryPx": "68852.8",
"positionValue": "20822.33631",
"unrealizedPnl": "33.88779",
"returnOnEquity": "0.0324965726",
"liquidationPx": "129046.538613311",
"marginUsed": "1041.116815",
"maxLeverage": 40,
"cumFunding": {
"allTime": "-1291.262616",
"sinceOpen": "0",
"sinceChange": "0"
}
}
}
],
"time": 1772503181102
}
}
]
}
批量获取现货账户状态
批量获取多个地址的现货账户状态,相当于 POST /info 中 type=spotClearinghouseState 的多地址版本。
请求参数
- Name
addresses- Type
- array
- Description
必填,地址列表,最多 50 个,超出时静默截取前 50 个
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
账户状态列表
- Name
data[].address- Type
- string
- Description
地址
- Name
data[].spotState- Type
- object
- Description
现货账户状态
- Name
data[].spotState.balances- Type
- array
- Description
余额列表
- Name
data[].spotState.balances[].coin- Type
- string
- Description
币种
- Name
data[].spotState.balances[].token- Type
- integer
- Description
代币ID
- Name
data[].spotState.balances[].total- Type
- string
- Description
总量
- Name
data[].spotState.balances[].hold- Type
- string
- Description
冻结数量
- Name
data[].spotState.balances[].entryNtl- Type
- string
- Description
入场成本
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/spot-clearinghouse-state?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"addresses": [
"0xfe00xxx",
"0xaf72xxx"
]
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xfe00xxx",
"spotState": {
"balances": [
{
"coin": "USDC",
"token": 0,
"total": "0",
"hold": "0",
"entryNtl": "0"
}
]
}
},
{
"address": "0xaf72xxx",
"spotState": {
"balances": [
{
"coin": "USDC",
"token": 0,
"total": "0.00000996",
"hold": "0",
"entryNtl": "0"
},
{
"coin": "NBT",
"token": 382,
"total": "0.03988497",
"hold": "0",
"entryNtl": "0.00008324"
}
]
}
}
]
}
获取鲸鱼仓位事件
获取最新鲸鱼仓位事件。
查询参数
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
鲸鱼仓位事件列表
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/whales/latest-events?limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"user": "0xb5a6xxx",
"symbol": "BTC",
"marginMode": "cross",
"positionSize": "-61.13254",
"entryPrice": "67778",
"liqPrice": "77169.199021",
"positionValueUsd": "4135432.93338",
"positionAction": 2,
"createTime": "2026-02-12T02:07:29.838Z"
}
]
}
获取鲸鱼仓位多空数
获取当前鲸鱼仓位多空数统计。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
多空数统计数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/whales/directions?coin=ETH" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"longCount": 103,
"shortCount": 90
}
}
获取强平统计
获取最近强平/强减统计数据。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
interval- Type
- string
- Description
可选,时间间隔,取值范围
1s~60d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
强平统计数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/liquidations/stat?coin=BTC&interval=15m" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"startTime": "2026-02-12T01:04:19Z",
"addresses": 38,
"shortLiquidations": 39,
"longLiquidations": 0,
"totalFilled": "288528.98022",
"longFilled": "0",
"shortFilled": "288528.98022",
"totalPnl": "-2772.737128",
"longPnl": "0",
"shortPnl": "-2772.737128"
}
}
获取强平统计(分币种)
获取最近强平/强减统计数据,按币种分组。
查询参数
- Name
interval- Type
- string
- Description
可选,时间间隔,取值范围
1s~60d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
按币种分组的强平统计数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/liquidations/stat-by-coin?interval=15m" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "BTC",
"addresses": 38,
"shortLiquidations": 39,
"longLiquidations": 0,
"totalFilled": "288528.98022",
"longFilled": "0",
"shortFilled": "288528.98022",
"totalPnl": "-2772.737128",
"longPnl": "0",
"shortPnl": "-2772.737128"
},
{
"coin": "ETH",
"addresses": 4,
"shortLiquidations": 4,
"longLiquidations": 0,
"totalFilled": "1510.3108",
"longFilled": "0",
"shortFilled": "1510.3108",
"totalPnl": "-28.741095",
"longPnl": "0",
"shortPnl": "-28.741095"
}
]
}
获取强平历史
获取强平历史数据,按周期分组。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
interval- Type
- string
- Description
可选,时间间隔,取值范围
1m~60d
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 20,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
强平历史数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/liquidations/history?coin=BTC&interval=15m&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"startTime": "2026-02-12T01:30:00Z",
"addresses": 11,
"shortLiquidations": 0,
"longLiquidations": 0,
"totalFilled": "87652.07214",
"longFilled": "0",
"shortFilled": "87652.07214",
"totalPnl": "-981.275646",
"longPnl": "0",
"shortPnl": "-981.275646"
},
{
"startTime": "2026-02-12T01:15:00Z",
"addresses": 28,
"shortLiquidations": 0,
"longLiquidations": 0,
"totalFilled": "200876.90808",
"longFilled": "0",
"shortFilled": "200876.90808",
"totalPnl": "-1791.461482",
"longPnl": "0",
"shortPnl": "-1791.461482"
}
]
}
获取Top强平仓位
查询最近 Top N 强平(强减)仓位,按成交价值排序。
查询参数
- Name
interval- Type
- string
- Description
必传,时间周期,取值范围
1m~60d
- Name
coin- Type
- string
- Description
必传,筛选指定币种,如
BTC、ETH
- Name
limit- Type
- integer
- Description
必传,返回记录数量限制,默认 10,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
Top 强平仓位数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/liquidations/top-positions?interval=1d&coin=BTC&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1770323135619,
"address": "0x9311xx",
"coin": "ETH",
"direction": "long",
"oid": 31317830,
"liqPrice": "1854.6741587792",
"liquidatedVal": "8721516.2073",
"pnl": "-663073.20006",
"startPosition": "58.5808",
"endPosition": "0"
}
]
}
发现聪明钱地址
发现聪明钱地址。仅查询合约账户价值大于 $10 万的地址。支持分页。
请求体参数
- Name
pageNum- Type
- integer
- Description
页码,默认 1,最大 20
- Name
pageSize- Type
- integer
- Description
每页记录数,默认 20,最大 25
- Name
period- Type
- integer
- Description
周期天数,如 7 表示最近7天
- Name
sort- Type
- string
- Description
排序方式,可选值:
win-rate(胜率)、account-balance(账户余额)、ROI(收益率)、pnl(盈亏)、position-count(持仓数量)、profit-count(盈利次数)、last-operation(最后操作时间)、avg-holding-period(平均持仓周期)、current-position(当前持仓)
- Name
pnlList- Type
- boolean
- Description
是否需要 pnl 曲线数据
认证参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
分页数据,包含
list(聪明钱地址列表)、total、pageNum、pageSize
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/smart/find?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"pageNum": 1,
"pageSize": 10,
"period": 7,
"sort": "win-rate",
"pnlList": false
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0x6abcxxx",
"avgHoldingSec": 16522,
"currentPosition": 10,
"effLeverage": "9.63",
"lastOperationAt": 1770302542171,
"leverage": null,
"longPnl": "11471.623794",
"longWr": "1",
"marginUsage": "77645.888329",
"marginUsageRate": "0.6038",
"perpValue": "128593.132716",
"pnlList": null,
"positions": 47,
"profitPositions": 47,
"realizedPnl": "13672.918609",
"shortPnl": "11471.623794",
"shortWr": "1",
"spotValue": "39161.07",
"totalValue": "167754.21",
"winRate": "1"
}
]
}
地址发现
通用地址发现接口,允许用户自主探索,支持丰富的排序、筛选和分页功能。
请求体参数
- Name
pageNum- Type
- integer
- Description
页码,默认 1,最大 20
- Name
pageSize- Type
- integer
- Description
每页条数,默认 20,最大 25
- Name
period- Type
- integer
- Description
周期天数,默认 7,0 表示 all-time
- Name
sort- Type
- object
- Description
排序配置,
sort.field指定排序字段,sort.dir指定方向(asc/desc,默认desc)
- Name
tags- Type
- string[]
- Description
标签筛选,语言和
lang一致
- Name
coins- Type
- string[]
- Description
交易过指定的所有币种(and 关系)
- Name
anyCoins- Type
- string[]
- Description
交易过指定的任一币种(or 关系)
- Name
noCoins- Type
- string[]
- Description
未交易过指定的任一币种
- Name
allCoins- Type
- string[]
- Description
全部交易币种
- Name
selects- Type
- string[]
- Description
查询字段列表,默认包含 address、avgDurationMin、positionCount、winRate、longRatio、totalPnl、longPnl、shortPnl、avgLeverage、snapTotalValue、snapPerpValue、snapTotalMarginUsed、snapPositionCount、oaLastOrderAt
- Name
loadPnls- Type
- boolean
- Description
是否加载 pnl 曲线,默认 false
- Name
loadTags- Type
- boolean
- Description
是否加载标签,默认 false
- Name
countOnly- Type
- boolean
- Description
是否仅返回数量,默认 false
- Name
lang- Type
- string
- Description
语言,默认
en
- Name
filters- Type
- array
- Description
筛选条件数组,每项包含
field(字段名)、op(操作符,默认>,可选<,=,>,>=,<=,!=,<>,exist)、val(数值条件)、val2(文本/日期条件)、period(字段特定周期)
- Name
addrs- Type
- string[]
- Description
查指定地址列表,最多 50 个,超出时静默截取前 50 个
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
包含
list(地址数据数组)和total(符合条件的总数)
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/traders/discover?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"sort": {"field": "winRate"},
"period": 7,
"pageSize": 20,
"filters": [
{"field": "snapPerpValue", "val": "1000"},
{"field": "positionCount", "val": "10"}
]
}'
响应
{
"code": "0",
"msg": "success",
"data": {
"list": [
{
"address": "0x17eb04xxx",
"avgDurationMin": 102.02,
"avgLeverage": "5.454545",
"longPnl": "10146.0222700000",
"longRatio": 0.727,
"oaLastOrderAt": null,
"positionCount": 11,
"shortPnl": "1826.9000000000",
"snapPerpValue": "14397.138489",
"snapPositionCount": 1,
"snapTotalMarginUsed": "13533",
"snapTotalValue": "14397.138489",
"totalPnl": "11972.9222700000",
"winRate": 1.0
}
],
"total": 5153
}
}
获取历史鲸鱼仓位多空比
获取历史鲸鱼仓位多空比。
查询参数
- Name
interval- Type
- string
- Description
可选,时间间隔,默认
1h。可选值:10m、1h、4h、1d
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 50,最大 200
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
历史多空比数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/whales/history-long-ratio?interval=1h&limit=3" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1769677200000,
"longRatio": "0.47789474",
"positionValueDiff": "806485593.8338649849",
"longPositionValueRatio": "0.54912545"
}
]
}
查询鲸鱼仓位
查询当前鲸鱼仓位。鲸鱼定义为仓位价值大于100万美元的地址。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
dir- Type
- string
- Description
可选,筛选方向,可选值:
long(多头)、short(空头)
- Name
npnlSide- Type
- string
- Description
可选,浮盈/浮亏筛选,可选值:
profit(浮盈)、loss(浮亏)
- Name
frSide- Type
- string
- Description
可选,资金费盈亏筛选,可选值:
profit(盈)、loss(亏)
- Name
topBy- Type
- string
- Description
可选,排序方式,可选值:
position-value(仓位价值)、margin-balance(保证金余额)、create-time(创建时间)、profit(盈利)、loss(亏损)。默认create-time(倒序)
- Name
take- Type
- integer
- Description
可选,返回记录数量限制,默认 10,最大 200
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
鲸鱼仓位列表
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/whales/open-positions?take=10&coin=ETH&topBy=create-time" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"user": "0x4a96xxx",
"symbol": "BTC",
"positionSize": "36",
"entryPrice": "67773.2",
"liqPrice": "12458.9291279606",
"leverage": 40,
"marginBalance": "60801.3",
"positionValueUsd": "2432052",
"unrealizedPnL": "-7785.16032",
"fundingFee": "-45.785833",
"marginMode": "cross",
"createTime": 1770860496338,
"updateTime": 1770862020051
},
{
"user": "0xb5a6xxx",
"symbol": "BTC",
"positionSize": "-61.13254",
"entryPrice": "67778",
"liqPrice": "77167.9428938831",
"leverage": 40,
"marginBalance": "103248.275119",
"positionValueUsd": "4129931.0047800001",
"unrealizedPnL": "13515.739205",
"fundingFee": "77.750119",
"marginMode": "cross",
"createTime": 1770860298587,
"updateTime": 1770862020051
}
]
}
获取TWAP订单状态
获取指定地址的最新 TWAP 订单状态。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 100,最大 100
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
TWAP 订单状态列表
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/twap-states/0x0089xxx/latest?limit=5" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": []
}
获取最大回撤
获取指定地址在给定周期内的最大回撤。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
days- Type
- integer
- Description
可选,统计天数。取值:
1、7、30、60、90
- Name
scope- Type
- string
- Description
可选,统计范围,默认
perp(当前仅支持perp)
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
最大回撤数据
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/max-drawdown/0x0089xxx?days=7&scope=perp" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"high": {
"time": "2026-01-06T18:03:29.16Z",
"value": "2864070.8107409999"
},
"low": {
"time": "2026-01-06T23:33:28.853Z",
"value": "2081165.6652170001"
},
"maxDrawdown": "0.2733539766502646",
"netIn": "0"
}
}
批量获取最大回撤
批量获取多个地址在给定周期内的最大回撤。
请求参数
- Name
addresses- Type
- array
- Description
地址列表,最多 50 个地址,超出时静默截取前 50 个
- Name
days- Type
- integer
- Description
可选,统计天数。取值:
1、7、30、60、90、0(0 表示 all-time)
- Name
scope- Type
- string
- Description
可选,统计范围,默认
perp(当前仅支持perp)
认证参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
最大回撤数据列表,每个元素包含
Address、High、Low、MaxDrawdown、NetIn
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/batch-max-drawdown?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"addresses": ["0x0089xxx", "0x1234xxx"],
"days": 7,
"scope": "perp"
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"Address": "0x0089xxx",
"High": {
"time": "2026-01-06T18:03:29.16Z",
"value": "2864070.8107409999"
},
"Low": {
"time": "2026-01-06T23:33:28.853Z",
"value": "2081165.6652170001"
},
"MaxDrawdown": "0.2733539766502646",
"NetIn": "0"
},
{
"Address": "0x1234xxx",
"High": {
"time": "2026-01-05T10:00:00.00Z",
"value": "1000000"
},
"Low": {
"time": "2026-01-06T12:00:00.00Z",
"value": "800000"
},
"MaxDrawdown": "0.2",
"NetIn": "50000"
}
]
}
获取账本净流入
获取用户周期内账户净入金,分合约账户净入金和现货账户净入金。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
days- Type
- integer
- Description
可选,统计天数。取值:
1、7、30、60、90
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
账本净流入数据,
netPerpIn- 合约账户净流入,netSpotIn- 现货账户净流入
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/ledger-updates/net-flow/0x0089xxx?days=7" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"netPerpIn": "0",
"netSpotIn": "-8355.58027"
}
}
批量获取账本净流入
批量获取多个地址在给定周期内的账户净入金,分合约账户净入金和现货账户净入金。
请求参数
- Name
addresses- Type
- array
- Description
地址列表,最多 50 个地址,超出时静默截取前 50 个
- Name
days- Type
- integer
- Description
可选,统计天数。取值:
1、7、30、60、90、0(0 表示 all-time)
认证参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
账本净流入数据列表,每个元素包含
address、netPerpIn、netSpotIn
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/ledger-updates/batch-net-flow?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"addresses": ["0x0089xxx", "0x1234xxx"],
"days": 7
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0x0089xxx",
"netPerpIn": "0",
"netSpotIn": "-8355.58027"
},
{
"address": "0x1234xxx",
"netPerpIn": "50000",
"netSpotIn": "10000"
}
]
}
获取当前未平仓位统计
获取全市场当前未平仓位统计。
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
未平仓位统计,包含
positionCount、longPv、shortPv、totalPv、avgPv
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/open-interest/summary" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"positionCount": 211694,
"longPv": "2481509687.2189629948",
"shortPv": "2333089812.667876",
"totalPv": "4814599499.8868389948",
"avgPv": "22780.220013659"
}
}
获取头部币种未平仓位统计
获取头部币种当前未平仓位统计,按 totalPv 排序。
查询参数
- Name
limit- Type
- integer
- Description
可选,返回币种数量,默认 10,最大 50
- Name
interval- Type
- string
- Description
最近时间窗口,默认
3d。取值范围:15m~180d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
币种未平仓位统计数组
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/open-interest/top-coins?limit=2&interval=4h" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "BTC",
"positionCount": 24771,
"longPv": "646442968.2481799974",
"shortPv": "607339544.2941900022",
"totalPv": "1253782512.5423699996",
"avgPv": "50657.8792946412"
},
{
"coin": "ETH",
"positionCount": 12845,
"longPv": "513131037.1366399943",
"shortPv": "488719066.2714399968",
"totalPv": "1001850103.4080799911",
"avgPv": "78135.2443774824"
}
]
}
获取主动买卖累计差值
查询指定币种主动买卖的累计差值。
路径参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,最近时间窗口。取值范围:
1s~60d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
主动买卖累计差值,包含
szDelta、valDelta
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/accumulated-taker-delta/BTC?interval=4h" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": {
"szDelta": "-3814.9315",
"valDelta": "-7801383.84039"
}
}
历史订单簿统计
获取指定币种的订单簿历史统计摘要。
路径参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,最近时间窗口,默认
1d。取值范围:1h~180d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
订单簿统计摘要
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/orderbooks/history-summaries/ETH?interval=4h" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1704067200,
"coin": "ETH",
"bidVolume": "12345.67",
"askVolume": "12345.67"
}
]
}
历史未平仓位
获取指定币种的未平仓位统计历史。
URL 参数
- Name
coin- Type
- string
- Description
币种名称(如:ETH)
查询参数
- Name
interval- Type
- string
- Description
最近时间窗口,默认
3d,取值范围15m~180d
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
数据数组,每条记录包含:
time- 时间戳coin- 币种名称positionCount- 仓位数量longCount- 多头仓位数量longPv- 多头仓位价值totalPv- 总仓位价值avgPv- 平均仓位价值
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/open-interest/history/ETH?interval=4h" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1772081640000,
"coin": "ETH",
"positionCount": 12366,
"longCount": 6204,
"longPv": "637779000.95540001",
"totalPv": "1229888700.43613002",
"avgPv": "99642.60718108"
}
]
}
获取K线(含主动买卖量)
获取指定币种的 K 线数据,包含主动买卖量。
路径参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
- Name
interval- Type
- string
- Description
K线周期,取值范围:
1s~1w。常用值:1m、3m、5m、15m、30m、1h、4h、8h、1d、1w
查询参数
- Name
startTime- Type
- integer
- Description
可选,开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳)
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 100,最大 2000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
K线数据数组,每条记录包含:
openTime- 开盘时间(毫秒时间戳)tc- 成交笔数size- 交易量(base volume)amount- 交易额(quote volume)tcBuyer- 买方主动成交笔数sizeBuyer- 买方主动成交量amountBuyer- 买方主动成交额open- 开盘价high- 最高价low- 最低价close- 收盘价
请求
curl -G "https://openapi.hyperbot.network/api/upgrade/v2/hl/klines-with-taker-vol/BTC/1h?startTime=1704268800000&limit=10" \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
响应
{
"code": "0",
"msg": "success",
"data": [
{
"openTime": 1764115200000,
"tc": 290029,
"size": "613255.9644",
"amount": "1820089792.99634",
"tcBuyer": 155482,
"sizeBuyer": "292357.6723",
"amountBuyer": "868932151.13917",
"open": "2958.9",
"high": "3043.2",
"low": "2888",
"close": "3025.8"
}
]
}
注意:Hyperliquid 的 Info API 实际使用统一端点 POST /api/upgrade/v2/hl/info,并通过请求体中的 type 字段区分具体能力。
Info API 统一端点
Hyperliquid Info API 统一端点,与官方 API 格式一致。通过请求体中的 type 字段指定要查询的数据类型。
请求体参数
- Name
type- Type
- string
- Description
请求类型,支持以下值:
meta: 获取永续合约元数据spotMeta: 获取现货元数据clearinghouseState: 获取用户永续合约账户状态(需要 user)spotClearinghouseState: 获取用户现货账户状态(需要 user)openOrders: 获取用户挂单(需要 user)frontendOpenOrders: 获取用户挂单-前端格式(需要 user)userFees: 获取用户手续费(需要 user)userFills: 获取用户成交记录(需要 user)userFillsByTime: 获取用户指定时间范围成交记录(需要 user, startTime)candleSnapshot: 获取K线数据(需要 req)perpDexs: 获取永续DEX列表historicalOrders: 获取历史订单(需要 user)orderStatus: 获取订单状态(需要 user, oid)userFunding: 获取用户资金费用历史(需要 user, startTime)userNonFundingLedgerUpdates: 获取用户非资金费账本更新(需要 user, startTime)portfolio: 获取用户投资组合信息(需要 user)webData2: 获取 Web 数据(需要 user)userTwapSliceFills: 获取用户 TWAP 切片成交(需要 user)activeAssetData: 获取活跃资产数据(需要 user, coin)allMids: 获取所有 mid pricel2Book: 获取 L2 订单簿(需要 coin)
- Name
user- Type
- string
- Description
用户钱包地址,部分 type 需要此参数
- Name
startTime- Type
- integer
- Description
开始时间(毫秒),部分 type 需要此参数
- Name
endTime- Type
- integer
- Description
结束时间(毫秒),可选
- Name
coin- Type
- string
- Description
币种名称,部分 type 需要此参数
- Name
oid- Type
- integer|string
- Description
订单ID,orderStatus 类型需要此参数
- Name
dex- Type
- string
- Description
DEX名称,frontendOpenOrders 类型可选
- Name
aggregateByTime- Type
- boolean
- Description
是否按时间聚合,userFills/userFillsByTime 类型可选
- Name
req- Type
- object
- Description
candleSnapshot 专用请求体,包含 coin、interval、startTime、endTime
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object|array
- Description
返回数据,格式根据 type 不同而不同
请求示例
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type": "meta"}'
响应示例 (meta)
{
"code": "0",
"msg": "success",
"data": {
"universe": [
{
"name": "BTC",
"szDecimals": 5,
"maxLeverage": 50
},
{
"name": "ETH",
"szDecimals": 4,
"maxLeverage": 50
}
]
}
}
获取现货元数据
获取 Hyperliquid 现货交易元数据,包括可交易的代币列表、交易对信息等。
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
现货元数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"spotMeta"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"universe": [
{
"tokens": [
{"name": "USDC", "szDecimals": 6, "weiDecimals": 6, "index": 0},
{"name": "PURR", "szDecimals": 0, "weiDecimals": 18, "index": 1}
],
"name": "PURR/USDC",
"index": 0
}
]
}
}
获取用户永续合约账户状态
获取用户永续合约账户状态,包括持仓信息、保证金使用情况、账户价值等。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址,如
0x0000000000000000000000000000000000000000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
用户账户状态数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"clearinghouseState","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"assetPositions": [
{
"position": {
"coin": "ETH",
"entryPx": "2986.3",
"leverage": {"type": "isolated", "value": 20},
"liquidationPx": "2866.26936529",
"marginUsed": "4.967826",
"positionValue": "100.02765",
"unrealizedPnl": "-0.0134",
"szi": "0.0335"
},
"type": "oneWay"
}
],
"marginSummary": {
"accountValue": "13109.482328",
"totalMarginUsed": "4.967826",
"totalNtlPos": "100.02765"
},
"withdrawable": "13104.514502"
}
}
获取用户现货账户状态
获取用户现货账户状态,包括代币余额等信息。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址,如
0x0000000000000000000000000000000000000000
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
用户现货账户状态数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"spotClearinghouseState","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"balances": [
{"coin": "USDC", "hold": "0", "total": "1000.00"},
{"coin": "PURR", "hold": "0", "total": "500"}
]
}
}
获取用户挂单
获取用户当前所有挂单。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
挂单列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"openOrders","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"coin": "BTC",
"limitPx": "29792.0",
"oid": 91490942,
"side": "A",
"sz": "5.0",
"timestamp": 1681247412573
}
]
}
获取用户挂单(前端格式)
获取用户当前所有挂单,返回前端友好的格式,包含更多订单详情。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
dex- Type
- string
- Description
可选,永续 DEX 名称。默认空字符串表示第一个永续 DEX,包含现货挂单
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
挂单列表(前端格式)
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"frontendOpenOrders","user": "0x0000000000000000000000000000000000000000", "dex": ""}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"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"
}
]
}
获取用户手续费
获取用户的手续费率信息。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
用户手续费信息
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userFees","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"dailyUserVlm": "1000000.00",
"feeSchedule": {
"taker": "0.00035",
"maker": "0.0001"
}
}
}
获取用户成交记录(Info API)
获取用户的成交记录列表。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
aggregateByTime- Type
- boolean
- Description
可选,是否按时间聚合
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userFills","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"closedPnl": "0.0",
"coin": "ETH",
"crossed": false,
"dir": "Open Long",
"hash": "0xa166e3fa...",
"oid": 90542681,
"px": "2400.00",
"side": "B",
"sz": "10.0",
"time": 1681222254710,
"fee": "0.84",
"feeToken": "USDC"
}
]
}
获取用户指定时间范围成交记录
获取用户指定时间范围内的成交记录。
使用说明:
- 当前上游可查询范围为 2025 年 11 月初以来 的历史成交数据。
- 单次调用最多返回 2000 条记录;如果需要拉取全部历史数据,请按时间范围多次调用该接口分页获取。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
startTime- Type
- integer
- Description
开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳),默认当前时间
- Name
aggregateByTime- Type
- boolean
- Description
可选,是否按时间聚合
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
成交记录列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userFillsByTime","user": "0x0000000000000000000000000000000000000000", "startTime": 1681222254710}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"closedPnl": "0.0",
"coin": "ETH",
"dir": "Open Long",
"oid": 90542681,
"px": "2400.00",
"side": "B",
"sz": "10.0",
"time": 1681222254710,
"fee": "0.84",
"feeToken": "USDC"
}
]
}
获取K线数据
获取指定币种的K线(蜡烛图)数据。
数据量优势:Hyperliquid 官方 API 每个周期仅提供最近 5,000 条 K 线数据。AiCoin 开放 API 突破了此限制,支持通过分页拉取获取远超 5,000 条的历史 K 线。单次请求最多返回约 2,000 条,通过滑动
startTime/endTime窗口可持续拉取更多历史数据(实测 1 分钟周期可拉取 45,000+ 条,覆盖约 30 天历史,其他周期也随时间增长)。
请求体参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
- Name
interval- Type
- string
- Description
K线周期,可选值:
1m、3m、5m、15m、30m、1h、2h、4h、8h、12h、1d、3d、1w、1M
- Name
startTime- Type
- integer
- Description
开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳)
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
K线数据数组
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"candleSnapshot","req":{"coin": "BTC", "interval": "15m", "startTime": 1681923600000, "endTime": 1681924499999}}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"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"
}
]
}
获取永续DEX列表
获取 Hyperliquid 支持的永续 DEX 列表。
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
永续 DEX 列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"perpDexs"}'
响应
{
"code": "0",
"msg": "success",
"data": ["", "HLP"]
}
获取所有 mid price
获取所有币种 mid price。
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
所有 mid price 映射
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"allMids"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"BTC": "87927.5",
"ETH": "2936.55",
"SOL": "122.975"
}
}
获取 L2 订单簿
获取指定币种的 L2 订单簿。
请求体参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
L2 订单簿数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"l2Book","coin":"BTC"}'
响应
{
"code": "0",
"msg": "success",
"data": {
"coin": "BTC",
"levels": [
[
{"n": 6, "px": "87927", "sz": "0.51696"},
{"n": 5, "px": "87926", "sz": "0.05574"}
],
[
{"n": 39, "px": "87928", "sz": "11.96592"},
{"n": 1, "px": "87929", "sz": "0.00012"}
]
],
"time": 1769684718911
}
}
获取历史订单
获取用户的历史订单,最多返回 2000 条最近的订单。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
历史订单列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"historicalOrders","user": "0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"order": {
"coin": "ETH",
"side": "A",
"limitPx": "2412.7",
"sz": "0.0",
"oid": 1,
"timestamp": 1724361546645,
"triggerCondition": "N/A",
"isTrigger": false,
"orderType": "Market",
"origSz": "0.0076"
},
"status": "filled",
"statusTimestamp": 1724361546645
}
]
}
获取订单状态
查询指定订单的状态。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
oid- Type
- string|integer
- Description
订单 ID,可以是数字或十六进制字符串
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
订单状态信息
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"orderStatus","user": "0x0000000000000000000000000000000000000000", "oid": 91490942}'
响应
{
"code": "0",
"msg": "success",
"data": {
"order": {
"coin": "BTC",
"limitPx": "29792.0",
"oid": 91490942,
"side": "A",
"sz": "5.0",
"timestamp": 1681247412573
},
"status": "open",
"statusTimestamp": 1681247412573
}
}
获取用户资金费用历史
获取用户的资金费用历史记录。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
startTime- Type
- integer
- Description
开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳),默认当前时间
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
资金费用历史列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userFunding","user": "0x0000000000000000000000000000000000000000", "startTime": 1681222254710}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"delta": {
"coin": "ETH",
"fundingRate": "0.0000417",
"szi": "49.1477",
"type": "funding",
"usdc": "-3.625312"
},
"hash": "0xa166e3fa...",
"time": 1681222254710
}
]
}
获取用户非资金费账本更新
获取用户的非资金费账本更新记录,包括充值、转账、提现等。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
startTime- Type
- integer
- Description
开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳),默认当前时间
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
账本更新记录列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userNonFundingLedgerUpdates","user": "0x0000000000000000000000000000000000000000", "startTime": 1681222254710}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"delta": {
"type": "deposit",
"usdc": "1000.00"
},
"hash": "0xb2f7d1e3...",
"time": 1681222254710
},
{
"delta": {
"type": "withdraw",
"usdc": "-500.00"
},
"hash": "0xc3g8e2f4...",
"time": 1681308654710
}
]
}
获取用户投资组合信息
获取用户的投资组合信息。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
投资组合信息
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"portfolio","user":"0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": {}
}
获取 Web 综合数据
获取用户 Web 综合数据。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
Web 综合数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"webData2","user":"0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": {}
}
获取用户 TWAP 切片成交
获取用户 TWAP 切片成交记录。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- array
- Description
TWAP 切片成交记录列表
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"userTwapSliceFills","user":"0x0000000000000000000000000000000000000000"}'
响应
{
"code": "0",
"msg": "success",
"data": []
}
获取活跃资产数据
获取指定用户的指定币种活跃资产数据。
请求体参数
- Name
user- Type
- string
- Description
用户钱包地址
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
请求参数
- Name
AccessKeyId- Type
- string
- Description
用户访问密钥ID
- Name
SignatureNonce- Type
- string
- Description
签名随机数
- Name
Timestamp- Type
- string
- Description
请求时间戳(秒),有效期30秒
- Name
Signature- Type
- string
- Description
使用 HmacSHA1 + Base64 生成的签名,请参考如何获取 API 认证参数
返回数据
- Name
code- Type
- string
- Description
状态码,"0" 表示成功
- Name
msg- Type
- string
- Description
响应消息
- Name
data- Type
- object
- Description
活跃资产数据
请求
curl -X POST "https://openapi.hyperbot.network/api/upgrade/v2/hl/info?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"type":"activeAssetData","user":"0x0000000000000000000000000000000000000000","coin":"BTC"}'
响应
{
"code": "0",
"msg": "success",
"data": {}
}
错误码说明
| 错误码 | 说明 |
|---|---|
| 0 | 成功 |
| 400 | 请求参数错误 |
| 401 | 未授权,API Key 无效或缺失 |
| 403 | 无权限访问该接口 |
| 500 | 服务器内部错误 |