Query confirmed UTXOs for BTC, LTC, Doge, BCH, Cardano, etc., on specified addresses of UTXO chains. Pending UTXOs are not returned.
The results are sorted in descending order by asset size, with a maximum return of 300 entries.
GET https://www.okx.com/api/waas/wallet/utxo/utxos
Parameter | Type | Required | Description |
---|---|---|---|
chainIndex | String | Yes | Unique chain identifier |
address | String | Yes | Address information, required |
spendStatus | String | No | Spend status: 1 : spending 2 : unspent 3 : spending + unspent If not provided, the default value is 3, returning all results. |
Parameter | Type | Description |
---|---|---|
txHash | String | Transaction hash |
voutindex | String | Identifies the position of the UTXO in the output, combined with txHash uniquely maps the specified UTXO |
coinAmount | String | Amount of all returned UTXOs, in satoshis |
spendStatus | String | Spend status: 1 : spending 2 : unspent |
containAssets | String | Bitcoin chain: 1 : contains assets (currently only supports BTC Ordinals inscription assets) 2 : no assets 3 : asset status pending, not yet parsed Other chains: no information, returned as empty |
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/utxo/utxos?chainIndex=0&address=bc1p4sp52y6jfnlgv86t7er3dzgxgd8n5namuvkepw3u6g6rxk5k7feqdsvx3f' \
--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'
//If the chain is not supported, an error is directly prompted
{
"code": "0",
"msg": "success",
"data": [
{
"txHash": "5f2418f726457391a8cc5a6ebba71f8d9c039929ff0540d6e3c35b02ac98215f",
"vout": 1,
"coinAmount": "4652871",
"spendStatus": "1",
"includeExtra": "1",
"extra": {}
}
]
}