查询 BTC 、LTC、 Doge 、BCH、Cardano 等链,指定 UTXO 下的详细数据。
GET https://www.okx.com/api/waas/wallet/utxo/utxo-detail
Parameter | Type | Required | Description |
---|---|---|---|
chainIndex | String | Yes | 链唯一标识 |
address | String | Yes | 地址信息,必填 |
txhash | String | Yes | 交易哈希 |
voutindex | String | Yes | 标识 UTXO 位于输出的第几位,和 txhash 一起,可以唯一映射指定的 UTXO |
Parameter | Type | Description |
---|---|---|
coinAmount | String | UTXO 上的资产数量,单位是聪 |
spendStatus | String | 花费状态: 1 : spending(花费中) 2 : unspend(未花费) |
containAssets | String | Bitcoin 链: 1 : 包含资产(目前仅支持 BTC Ordinals 铭文资产)2 : 不包含资产 3 : 资产状态待定,未解析完成 其他链: 没有该信息,返回为空 |
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/utxo/utxos?chainIndex=0&address=bc1p4sp52y6jfnlgv86t7er3dzgxgd8n5namuvkepw3u6g6rxk5k7feqdsvx3f&txHash=5f2418f726457391a8cc5a6ebba71f8d9c039929ff0540d6e3c35b02ac98215f' \
--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'
//如果不支持的链,直接提示错误
{
"code": "0",
"msg": "success",
"data": [
{
"coinAmount": "4652871",
"spendStatus":"1",
"includeExtra":"1"
}
]
}