获取情绪热度排行榜#
获取指定统计周期内按情绪活跃度(提及量)排名的热门代币列表。
请求路径#
GET
https://web3.okx.com/api/v6/dex/market/social/sentiment/ranking请求参数#
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| timeFrame | string | 否 | 统计周期:1=1h(近 1 小时)、2=4h(近 4 小时)、3=24h(近 24 小时)。默认 1。 |
| sortBy | string | 否 | 排序方式,目前仅支持 1=hot(按总提及量降序)。默认 1。 |
| limit | string | 否 | 返回条目数,范围 [1, 50],默认 10。 |
返回参数#
| 字段 | 类型 | 描述 |
|---|---|---|
| period | string | 与请求参数 timeFrame 一致的统计周期字符串 |
| ts | string | 服务端时间戳(毫秒) |
| details | array | 按提及次数降序排列的代币列表,最多返回 limit 条 |
| > tokenSymbol | string | 代币符号 |
| > mentionCount | string | 统计周期内该代币的总提及次数,含 X/Twitter 与新闻来源 |
| > xMentionCount | string | X/Twitter 平台的提及次数 |
| > newsMentionCount | string | 新闻来源的提及次数 |
| > sentiment | object | 该代币的情绪分布数据 |
| >> bullishCnt | string | 看多情绪的提及次数 |
| >> bearishCnt | string | 看空情绪的提及次数 |
| >> neutralCnt | string | 中性情绪的提及次数 |
| >> bullishRatio | string | 看多占比,范围 0.0–1.0 |
| >> bearishRatio | string | 看空占比,范围 0.0–1.0 |
| >> label | string | 综合情绪标签:bullish(看多)/ bearish(看空)/ neutral(中性)/ mixed(混合) |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/social/sentiment/ranking?timeFrame=1&sortBy=1&limit=10' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
返回示例#
json
{
"code": "0",
"msg": "",
"data": {
"period": "1h",
"ts": "1697630501000",
"details": [
{
"tokenSymbol": "BTC",
"mentionCount": "12540",
"xMentionCount": "10200",
"newsMentionCount": "2340",
"sentiment": {
"bullishCnt": "7890",
"bearishCnt": "1230",
"neutralCnt": "3420",
"bullishRatio": "0.629",
"bearishRatio": "0.098",
"label": "bullish"
}
},
{
"tokenSymbol": "ETH",
"mentionCount": "8320",
"xMentionCount": "6890",
"newsMentionCount": "1430",
"sentiment": {
"bullishCnt": "4980",
"bearishCnt": "890",
"neutralCnt": "2450",
"bullishRatio": "0.598",
"bearishRatio": "0.107",
"label": "bullish"
}
},
{
"tokenSymbol": "SOL",
"mentionCount": "5670",
"xMentionCount": "4920",
"newsMentionCount": "750",
"sentiment": {
"bullishCnt": "3120",
"bearishCnt": "680",
"neutralCnt": "1870",
"bullishRatio": "0.550",
"bearishRatio": "0.120",
"label": "bullish"
}
}
]
}
}