板块代币资金
接口描述
获取指定板块下,所有代币的现货或合约在不同时间窗口下的实时资金积累数据。
使用场景:
- 适用于板块轮动监控中,对板块下的代币的资金情况监控
- 适用于发现板块内的龙头代币或异动代币
- 适用于行业主题投资策略的资金分析
数据更新频率:每5分钟更新一次
请求URL
- 方法:
POST - 路径:
/open/v1/trade/categories/CoinTradeList
积分消耗
- 消耗积分:
3
前置条件
获取 tag
| 条件 | 说明 | 获取方式 |
|---|---|---|
| 已有 tag | 直接使用缓存的板块标签,无需重复查询 | 上下文自动提取 |
| 未有 tag | 调用 POST /open/v1/trade/categories/getTradeList 接口获取所有板块及其 tag | 前置接口调用 |
请求参数
参数通过请求体(Body)以 JSON 格式传递。
| 参数名 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tag | string | 是 | 分类标签 |
| tradeType | integer | 是 | 交易类型(1:现货,2:合约) |
枚举值说明
tradeType - 交易类型
| 值 | 含义 |
|---|---|
| 1 | 现货 |
| 2 | 合约 |
响应字段
仅展示 data 数组内每个对象的字段结构:
| 字段 | 类型 | 实际返回类型 | 描述 |
|---|---|---|---|
| updateTime | long | long | 更新时间(毫秒时间戳) |
| tag | string | string | 板块标签 |
| tradeType | integer | integer | 交易类型(1:现货,2:合约) |
| vsTokenId | long | string | 代币ID |
| symbol | string | string | 代币符号 |
| name | string | string | 代币名称 |
| categoriesTradeDataList | array | array | 板块资金数据列表 |
| timeRange | string | string | 时间范围 |
| timeParticleEnum | integer | integer | 统计时间粒度 |
| tradeInflow | number | number | 交易净流入金额 (USD) |
字段业务含义
| 字段 | 业务含义 | 使用建议 |
|---|---|---|
| categoriesTradeDataList | 板块资金数据 | 该代币在不同时间粒度的资金净流入数据,用于分析板块内资金流向 |
| tradeInflow | 交易净流入 | 正值表示资金流入,负值表示资金流出 |
请求示例
json
{
"tag": "AI", // 分类标签
"tradeType": 1 // 交易类型(1:现货,2:合约)
}cURL 示例(Linux/macOS)
bash
curl --location --request POST 'http://${host}/api/open/v1/trade/categories/CoinTradeList' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: xxxxx' \
--header 'X-TIMESTAMP: xxxxx' \
--header 'X-SIGN: xxxxx' \
--header 'Accept: */*' \
--data-raw '{
"tag": "AI",
"tradeType": 1
}'cURL 示例(Windows CMD)
cmd
curl --location --request POST "http://${host}/api/open/v1/trade/categories/CoinTradeList" ^
--header "Content-Type: application/json" ^
--header "X-API-KEY: xxxxx" ^
--header "X-TIMESTAMP: xxxxx" ^
--header "X-SIGN: xxxxx" ^
--header "Accept: */*" ^
--data-raw "{ \"tag\": \"AI\", \"tradeType\": 1}"成功响应示例
json
{
"code": 200,
"message": "success",
"data": [
{
"updateTime": 1773298200000, // 更新时间
"tag": "AI", // 板块标签
"tradeType": 1, // 交易类型(1:现货,2:合约)
"vsTokenId": "1637", // 代币ID
"symbol": "RLC", // 代币符号
"name": "iExec RLC", // 代币名称
"categoriesTradeDataList": [
{
"timeRange": "H6", // 时间范围
"timeParticleEnum": 106, // 统计时间粒度
"tradeInflow": "3753.6444" // 交易净流入金额 (USD)
},
{
"timeRange": "M3",
"timeParticleEnum": 303,
"tradeInflow": "-716516.5178999999"
},
{
"timeRange": "D90",
"timeParticleEnum": 290,
"tradeInflow": "-716516.5179"
}
// ... 更多数据省略
]
},
{
"updateTime": 1773298200000,
"tag": "AI",
"tradeType": 1,
"vsTokenId": "1732",
"symbol": "NMR",
"name": "Numeraire",
"categoriesTradeDataList": [
{
"timeRange": "H6",
"timeParticleEnum": 106,
"tradeInflow": "-1088.4043000000013"
},
{
"timeRange": "M3",
"timeParticleEnum": 303,
"tradeInflow": "2671317.5315"
},
{
"timeRange": "D90",
"timeParticleEnum": 290,
"tradeInflow": "2671317.5314999996"
}
// ... 更多数据省略
]
},
{
"updateTime": 1773298200000,
"tag": "AI",
"tradeType": 1,
"vsTokenId": "1768",
"symbol": "ADX",
"name": "AdEx",
"categoriesTradeDataList": [
{
"timeRange": "H6",
"timeParticleEnum": 106,
"tradeInflow": "-11146.473400000003"
},
{
"timeRange": "M3",
"timeParticleEnum": 303,
"tradeInflow": "303446.2417000001"
},
{
"timeRange": "D90",
"timeParticleEnum": 290,
"tradeInflow": "303446.2417"
}
// ... 更多数据省略
]
}
],
"requestId": "xxx-xxx-xxx"
}