Wallet API

Specific UTXO#

Query detailed data of a specific UTXO for chains like BTC, LTC, Doge, BCH, Cardano, etc.

Request Path#

GET https://www.okx.com/api/waas/wallet/utxo/utxo-detail

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique chain identifier
addressStringYesAddress information, required
txhashStringYesTransaction hash
voutindexStringYesIdentifies the position of the UTXO in the output, combined with txhash uniquely maps the specified UTXO

Response Parameters#

ParameterTypeDescription
coinAmountStringAmount of assets on the UTXO, in satoshis
spendStatusStringSpend status:
1: spending
2: unspent
containAssetsStringBitcoin 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

Request Example#

shell
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'
//If the chain is not supported, an error is directly prompted

Response Example#

200
{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "coinAmount": "4652871",
            "spendStatus": "1",
            "includeExtra": "1"
        }
    ]
}