代币 API

获取代币指定持仓范围集中度概况#

获取指定代币的持仓地址排名前 10/50/100 的概览数据。

请求路径#

GET https://web3.okx.com/api/v6/dex/market/token/cluster/top-holders

请求参数#

参数类型必填描述
chainIndexstring链的唯一标识,传入链的 ID(如 501: Solana),仅支持单链查询
tokenContractAddressstring代币合约地址
rangeFilterstring持仓排名前 10/50/100 地址数据,值值:1=10,2=50,3=100

响应参数#

参数类型描述
holdingAmountstring前 10/50/100 个地址持有的所有代币数量总和(不包括黑洞和流动性池地址)
holdingPercentstring前 10/50/100 个地址持有的代币供应量百分比
clusterTrendTypeobject买入/卖出/中性/转移主导,指交易者持仓随时间的整体方向——增加(买入)、下降(卖出)、持平(中性)或主要通过转移积累(转移主导)
averageHoldingPeriodstring前 10/50/100 位持有者的加权平均持有时间
averagePnlUsdstring前 10/50/100 名持有者的加权平均盈亏
averageBuyPriceUsdstring前 10/50/100 名持有者的加权平均成本价
averageBuyPricePercentstring前 10/50/100 名持有者的平均成本价与当前代币价格之间的百分比差异
averageSellPriceUsdstring前 10/50/100 名持有者的加权平均售价
averageSellPricePercentstring前 10/50/100 位持有者的平均售价与当前代币价格之间的百分比差异

请求示例#

Shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/token/cluster/top-holders?chainIndex=1&tokenContractAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&rangeFilter=2' \
--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",
    "data": [
        {
            "holdingAmount": "1250000000.00",
            "holdingPercent": "25.40",
            "clusterTrendType": {
                "trendType": "buy"
            },
            "averageHoldingPeriod": "45",
            "averagePnlUsd": "12340.56",
            "averageBuyPriceUsd": "0.9985",
            "averageBuyPricePercent": "-0.15",
            "averageSellPriceUsd": "1.0023",
            "averageSellPricePercent": "0.23"
        }
    ],
    "msg": ""
}