查询代币持仓列表#
获取链上指定代币的持仓列表,仅返回余额为top10000的地址。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/token/position-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 XLAYER |
| tokenContractAddress | String | 是 | 代币合约地址 |
| holderAddress | String | 否 | 持仓地址 |
| page | String | 否 | 页码 |
| limit | String | 否 | 返回条数,默认返回最近的20条,最多100条 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 当前页码 |
| limit | String | 当前页共多少条数据 |
| totalPage | String | 总共多少页 |
| chainFullName | String | 公链全称,例如:X Layer |
| chainShortName | String | 公链缩写符号,例如:XLAYER |
| circulatingSupply | String | 总流通量 |
| positionList | Array | 持仓列表 |
| > holderAddress | String | 持仓地址 |
| > amount | String | 持仓数量 |
| > valueUsd | String | 持仓价值,以美金为单位 |
| > positionChange24h | String | 24小时持仓量变化 |
| > rank | String | 持仓量排名 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/token/position-list?chainShortName=xlayer&tokenContractAddress=0x1e4a5963abfd975d8c9021ce480b42188849d41d&limit=1' \
--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": [
{
"page": "1",
"limit": "1",
"totalPage": "10000",
"chainFullName": "X Layer",
"chainShortName": "XLAYER",
"circulatingSupply": "158626664755.6",
"positionList": [
{
"holderAddress": "0xb543ef701c5f5f00de7eb98fd8138b0e33327893",
"amount": "0.000006",
"valueUsd": "0.00000600354",
"positionChange24h": "",
"rank": "1"
}
]
}
]
}
