Query the UTXO under the current wallet
POST https://www.okx.com/api/v5/waas/transaction/get-utxo
Parameter | Type | Required | Description |
---|---|---|---|
chainId | Int | Yes | Unique identifier of the chain |
utxoRequests | Array | Yes | UTXO request |
>address | String | Yes | Address |
>coinAmount | String | Yes | Transfer amount |
>serviceCharge | String | No | Service charge (minimum unit of main coin) |
>utxoType | String | Yes | get UTXO info for NFT utxoType = 1 :for transfers utxoType = 2 :for NFTs utxoType = 11 : for mints |
>nftId | string | No | NFT id Required when UTXO is 2 |
Parameter | Type | Description |
---|---|---|
address | string | Address |
canTransferAmount | string | The maximum transferable amount ,unit is "satoshi" |
utxoType | int | get UTXO info for NFT utxoType = 1 :for transfers utxoType = 2 :for NFTs utxoType = 11 : for mints |
utxoList | array | UTXO List |
>txHash | string | Transaction hash |
>vout | int | output sequence |
>coinAmount | int | UTXO coin amount, unit is "satoshi" |
>status | int | status ,1:confirmed utxo 0:pending utxo |
curl --location --request POST 'https://www.okx.com/api/v5/waas/transaction/get-utxo' \
--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 '{
"chainId": 0,
"utxoRequests": [
{
"address": "bc1psnr548clz3f4fz6jmpnw5eqzj2v2musk082wp8fvq5ac3p5ete6qg05u8u",
"coinAmount": 1500,
"serviceCharge": 3600,
"utxoType": 11
}
]
}'
{
"code": 0,
"msg": "success",
"data": [{
"address": "bc1psnr548clz3f4fz6jmpnw5eqzj2v2musk082wp8fvq5ac3p5ete6qg05u8u",
"canTransferAmount": "86560",
"utxoType": 11,
"utxoList": [{
"txHash": "a5dfa15d33577b77e68b39492a7adb5e6666bf1e34f17d6b041050e45d8abc1d",
"vout": 1,
"coinAmount": 86560,
"status": 1
}]
}]
}