Hyperliquid API
AiCoin 开放 API 提供了 Hyperliquid 交易所的实时数据接口,支持获取 Ticker 行情、用户成交记录、成交订单和订单数据等。
WebSocket 订阅
提供 Hyperliquid WebSocket 接入能力。
- WebSocket 订阅入口:
/v2/hl/ws - 用户成交订阅:
/v2/hl/ws/fills - 用户成交订单订阅:
/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://open.aicoin.com/v2/hl/ws?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
WebSocket:官方订阅兼容入口
- 路径:
/v2/hl/ws
该入口兼容 Hyperliquid 官方 WebSocket API 的订阅格式({"method":"subscribe","subscription":{...}})。
支持的订阅类型(subscription.type)
tradesopenOrdersclearinghouseStateuserFillsuserNonFundingLedgerUpdates
限制说明
allMids暂不支持orderUpdates暂不支持
订阅示例
{
"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://open.aicoin.com/v2/hl/ws/fills?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE"
WebSocket:订阅用户成交订单
订阅用户成交订单(filled-orders),支持多地址。
订阅消息
订阅消息与 /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://open.aicoin.com/v2/hl/ws/filled-orders?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://open.aicoin.com/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://open.aicoin.com/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
可选,返回记录数量限制
请求参数
- 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://open.aicoin.com/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": "23103400500"
}
]
}
根据订单ID获取成交数据
获取指定订单 ID (oid) 的成交记录,按时间排序。
路径参数
- Name
oid- Type
- string
- Description
订单 ID,如
23103400500
请求参数
- 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://open.aicoin.com/v2/hl/fills/oid/23103400500 \
-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": "23103400500"
}
]
}
根据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://open.aicoin.com/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
}
]
}
获取Top成交
查询最近 Top N 成交,按成交价值排序。
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期,如
4h、1d
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
- Name
limit- 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
Top 成交记录数组
请求
curl -G "https://open.aicoin.com/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
请求参数
- 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://open.aicoin.com/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://open.aicoin.com/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
请求参数
- 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://open.aicoin.com/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://open.aicoin.com/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
min_val- Type
- string
- Description
可选,最小订单价值筛选
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
- Name
limit- 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
Top 挂单数组,
distPct为与最新交易价的距离百分比
请求
curl -G "https://open.aicoin.com/v2/hl/orders/top-open-orders?min_val=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
whale_threshold- 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://open.aicoin.com/v2/hl/orders/active-stats?coin=BTC&whale_threshold=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://open.aicoin.com/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://open.aicoin.com/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
周期天数
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 10
请求参数
- 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://open.aicoin.com/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
周期天数
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 10
请求参数
- 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://open.aicoin.com/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
周期天数
请求参数
- 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://open.aicoin.com/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": {
"tradeCount": 23,
"winCount": 15,
"lossCount": 8,
"winRate": "65.22",
"totalPnl": "8000.00",
"avgPnl": "347.83",
"maxProfit": "2000.00",
"maxLoss": "-500.00"
}
}
获取已完成交易列表
查询最新完成的交易(仓位)列表。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种
- Name
limit- Type
- integer
- Description
返回记录数量限制,默认 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://open.aicoin.com/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
}
]
}
获取当前仓位历史
获取指定币种的当前仓位的历史数据。如果无当前仓位返回 400 错误。
路径参数
- 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://open.aicoin.com/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://open.aicoin.com/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 历史,按周期聚合。如果无当前仓位返回 400 错误。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期,如
4h、1d
- Name
limit- 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
当前仓位 PnL 数据
请求
curl -G "https://open.aicoin.com/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
可选,时间周期,如
4h、1d
- Name
startTime- Type
- integer
- Description
开始时间戳(毫秒),与 endTime 至少传一个
- Name
endTime- Type
- integer
- Description
结束时间戳(毫秒),与 startTime 至少传一个
- Name
limit- 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
已完成仓位 PnL 数据,比当前仓位 PnL 接口多
endTime字段
请求
curl -G "https://open.aicoin.com/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"
}
]
}
}
获取当前仓位操盘轨迹
获取指定币种的当前仓位的操盘轨迹,按周期聚合。如果无当前仓位返回 400 错误。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期,如
4h、1d
- Name
limit- 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
当前仓位操盘轨迹数据
请求
curl -G "https://open.aicoin.com/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 至少传一个。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0xfe00xxx
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期,如
4h、1d
- Name
startTime- Type
- integer
- Description
开始时间戳(毫秒),与 endTime 至少传一个
- Name
endTime- Type
- integer
- Description
结束时间戳(毫秒),与 startTime 至少传一个
- Name
limit- 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
已完成仓位操盘轨迹数据
请求
curl -G "https://open.aicoin.com/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 个地址
请求参数
- 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://open.aicoin.com/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",
"accountValue": "50000.00",
"totalPnl": "5000.00",
"totalPnlPercent": "10.00"
},
{
"address": "0xaf72xxx",
"accountValue": "30000.00",
"totalPnl": "3000.00",
"totalPnlPercent": "10.00"
}
]
}
批量查询交易统计
查询多个地址的指定周期的交易统计。
请求体参数
- Name
period- Type
- integer
- Description
周期天数,如 7 表示最近7天
- Name
pnlList- Type
- boolean
- Description
是否需要 pnl 曲线数据
- Name
addresses- Type
- array
- Description
地址列表,最多 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://open.aicoin.com/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",
"tradeCount": 23,
"winCount": 15,
"lossCount": 8,
"winRate": "65.22",
"totalPnl": "8000.00",
"avgPnl": "347.83"
},
{
"address": "0xaf72xxx",
"tradeCount": 10,
"winCount": 7,
"lossCount": 3,
"winRate": "70.00",
"totalPnl": "5000.00",
"avgPnl": "500.00"
}
]
}
获取鲸鱼仓位事件
获取最新鲸鱼仓位事件。
查询参数
- Name
limit- Type
- integer
- Description
可选,返回记录数量限制,默认 10
请求参数
- 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://open.aicoin.com/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": [
{
"address": "0xfe00xxx",
"coin": "ETH",
"event": "open",
"dir": "long",
"size": "1000.0",
"price": "2500.00",
"positionValue": "2500000.00",
"time": 1704355200000
}
]
}
获取鲸鱼仓位多空数
获取当前鲸鱼仓位多空数统计。
查询参数
- 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://open.aicoin.com/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": 45,
"shortCount": 32,
"longValue": "125000000.00",
"shortValue": "85000000.00"
}
}
获取强平统计
获取最近强平/强减统计数据。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
interval- Type
- string
- Description
可选,时间间隔,默认
1d。可选值:1m、5m、15m、30m、1h、4h、1d
请求参数
- 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://open.aicoin.com/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": {
"coin": "BTC",
"interval": "15m",
"longLiquidations": 15,
"shortLiquidations": 8,
"longValue": "2500000.00",
"shortValue": "1200000.00",
"totalValue": "3700000.00"
}
}
获取强平统计(分币种)
获取最近强平/强减统计数据,按币种分组。
查询参数
- Name
interval- Type
- string
- Description
可选,时间间隔,默认
1d。可选值:1m、5m、15m、30m、1h、4h、1d
请求参数
- 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://open.aicoin.com/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",
"longLiquidations": 15,
"shortLiquidations": 8,
"longValue": "2500000.00",
"shortValue": "1200000.00"
},
{
"coin": "ETH",
"longLiquidations": 22,
"shortLiquidations": 18,
"longValue": "1800000.00",
"shortValue": "1500000.00"
}
]
}
获取强平历史
获取强平历史数据,按周期分组。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
interval- Type
- string
- Description
可选,时间间隔,默认
1d。可选值:1m、5m、15m、30m、1h、4h、1d
- Name
limit- 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 -G "https://open.aicoin.com/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": [
{
"time": 1704355200000,
"coin": "BTC",
"longLiquidations": 5,
"shortLiquidations": 3,
"longValue": "850000.00",
"shortValue": "420000.00"
},
{
"time": 1704354300000,
"coin": "BTC",
"longLiquidations": 8,
"shortLiquidations": 2,
"longValue": "1200000.00",
"shortValue": "280000.00"
}
]
}
获取Top强平仓位
查询最近 Top N 强平(强减)仓位,按成交价值排序。
查询参数
- Name
interval- Type
- string
- Description
可选,时间周期,如
4h、1d
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
BTC、ETH
- Name
limit- 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
Top 强平仓位数组
请求
curl -G "https://open.aicoin.com/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"
}
]
}
发现聪明钱地址
发现聪明钱地址,支持多种排序方式筛选。
请求体参数
- 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
- array
- Description
聪明钱地址列表
请求
curl -X POST "https://open.aicoin.com/v2/hl/smart/find?AccessKeyId=YOUR_ACCESS_KEY_ID&SignatureNonce=RANDOM_NONCE&Timestamp=CURRENT_TIMESTAMP&Signature=YOUR_SIGNATURE" \
-H "Content-Type: application/json" \
-d '{
"period": 7,
"sort": "win-rate",
"pnlList": false
}'
响应
{
"code": "0",
"msg": "success",
"data": [
{
"address": "0xfe00xxx",
"winRate": "75.50",
"accountBalance": "150000.00",
"roi": "25.30",
"pnl": "37500.00",
"positionCount": 5,
"profitCount": 38,
"lastOperation": 1704355200000,
"avgHoldingPeriod": "2.5"
},
{
"address": "0xaf72xxx",
"winRate": "72.00",
"accountBalance": "80000.00",
"roi": "18.50",
"pnl": "14800.00",
"positionCount": 3,
"profitCount": 18,
"lastOperation": 1704268800000,
"avgHoldingPeriod": "1.8"
}
]
}
获取历史鲸鱼仓位多空比
获取历史鲸鱼仓位多空比。
查询参数
- Name
interval- Type
- string
- Description
可选,时间间隔,如
1h、4h、1d
- Name
limit- 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 -G "https://open.aicoin.com/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",
"longPositionValueRatio": "0.54912545"
}
]
}
查询鲸鱼仓位
查询当前鲸鱼仓位。鲸鱼定义为仓位价值大于100万美元的地址。
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种,如
ETH、BTC
- Name
dir- Type
- string
- Description
可选,筛选方向,可选值:
long(多头)、short(空头)
- Name
npnl-side- Type
- string
- Description
可选,浮盈/浮亏筛选,可选值:
profit(浮盈)、loss(浮亏)
- Name
fr-side- Type
- string
- Description
可选,资金费盈亏筛选,可选值:
profit(盈)、loss(亏)
- Name
top-by- Type
- string
- Description
可选,排序方式,可选值:
position-value(仓位价值)、margin-balance(保证金余额)、create-time(创建时间)、profit(盈利)、loss(亏损)。默认create-time(倒序)
- Name
take- 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 -G "https://open.aicoin.com/v2/hl/whales/open-positions?take=10&coin=ETH&top-by=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": [
{
"address": "0xfe00xxx",
"coin": "ETH",
"dir": "long",
"positionValue": "2500000.00",
"marginBalance": "500000.00",
"entryPrice": "2400.00",
"markPrice": "2600.00",
"size": "1000.0",
"leverage": "5.0",
"npnl": "200000.00",
"npnlPercent": "8.33",
"fundingRate": "0.01",
"frPnl": "2500.00",
"createTime": 1704268800000
},
{
"address": "0xaf72xxx",
"coin": "ETH",
"dir": "short",
"positionValue": "1500000.00",
"marginBalance": "300000.00",
"entryPrice": "2650.00",
"markPrice": "2600.00",
"size": "576.9",
"leverage": "5.0",
"npnl": "28845.00",
"npnlPercent": "1.92",
"fundingRate": "0.01",
"frPnl": "-1500.00",
"createTime": 1704182400000
}
]
}
获取TWAP订单状态
获取指定地址的最新 TWAP 订单状态。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
coin- Type
- string
- Description
可选,筛选指定币种
- Name
limit- 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
TWAP 订单状态列表
请求
curl -G "https://open.aicoin.com/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
可选,统计天数
- Name
scope- Type
- string
- Description
可选,统计范围,默认
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://open.aicoin.com/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": {
"maxDrawdown": "0.291167526899"
}
}
获取账本净流入
获取指定地址的账本净流入统计。
路径参数
- Name
address- Type
- string
- Description
用户钱包地址,如
0x0089xxx
查询参数
- Name
days- 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
账本净流入数据
请求
curl -G "https://open.aicoin.com/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": "99"
}
}
获取K线(含主动买卖量)
获取指定币种的 K 线数据,包含主动买卖量。
路径参数
- Name
coin- Type
- string
- Description
币种名称,如
BTC、ETH
- Name
interval- Type
- string
- Description
K线周期,如
1h、4h、1d
查询参数
- Name
startTime- Type
- integer
- Description
可选,开始时间(毫秒时间戳)
- Name
endTime- Type
- integer
- Description
可选,结束时间(毫秒时间戳)
- Name
limit- 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 -G "https://open.aicoin.com/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": 1769598000000,
"open": "89399",
"high": "90150",
"low": "89302",
"close": "90071",
"size": "3712.60343",
"sizeBuyer": "2335.89268"
}
]
}
注意:Hyperliquid 的 Info API 实际使用统一端点 POST /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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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"
}
]
}
获取用户指定时间范围成交记录
获取用户指定时间范围内的成交记录。
请求体参数
- 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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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://open.aicoin.com/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 | 服务器内部错误 |