查询授权#
分页查询单个地址,授权了哪些项目。以及每个授权项目下,授权的资产和额度。
请求路径#
POST https://www.okx.com/api/v5/wallet/security/approvals
请求参数#
Parameter | Type | Required | Description |
---|---|---|---|
addresses | Array | Yes | 地址列表,最多20个 |
>chainIndex | String | Yes | 链唯一标识 |
>address | String | Yes | 地址信息 |
limit | String | No | 每次查询多少条,默认值为 50,最大100 |
cursor | String | No | 游标位置,默认为第一个 |
响应参数#
Parameter | Type | Description |
---|---|---|
chainIndex | String | 链唯一标识 |
cursor | String | 游标 |
approvalProjects | Array | 授权项目列表 |
>projectName | String | 项目名称 |
>projectIcon | String | 项目icon |
>approveAddress | String | 授权项目地址 |
>tokens | Array | 授权币种列表 |
>>imageUrl | String | 币种logo 地址 |
>>symbol | Array | 币种简称 |
>>status | String | 授权状态: 1 : 成功 2 : 取消中 3 :授权中 |
>>tokenAddress | String | 代币合约地址 |
>>approvalNum | String | 授权整数,具体授权数量 = 授权整数 / 10 ^ 精度 |
请求示例#
shell
curl --location --request POST 'https://www.okx.com/api/v5/wallet/security/approvals' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--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' \
--data-raw '{
addresses:[
{
"chainIndex":"0",
"address":"3HyNd5YsqxyuieicbpKGfV2nBXgMn41dSd",
}
],
"limit": "10",
"cursor": "1"
}'
响应示例#
200
{
"code": "0",
"msg": "",
"data": [
{
"cursor":"100",
"chainIndex": "1",
"approvalProjects": [
{
"projectIcon": "https://static.oklink.com/cdn/explorer/defi/uniswapv2.png",
"projectName": "Uniswap",
"approvalAddress": "0x2c34a2fb1d0b4f55de51e1d0bdefaddce6b7cdd6",
"tokens": [
{
"approvalNum": "2744484",
"imageUrl": "https://static.coinall.ltd/cdn/wallet/logo/tusd.png",
"symbol": "TUSD",
"status": "1",
"tokenAddress": ""
}
]
}
]
}
]
}