More resources
Query transferable BRC-20

Query transferable BRC-20#

Query a list of transferable BRC-20 UTXO

Request parameters#

POST https://www.okx.com/api/v5/waas/transaction/get-utxo-brc20

Request parameters#

ParameterTypeRequiredDescription
chainIdIntYesUnique identifier of the chain
utxoRequestsArrayYesUTXO request
>addressStringYesAddress
>tickStringYescoin name
>pageStringNoWitch page, the first page is 1, default 1
>pageSizeStringNoPage size, default 10

Response parameters#

ParameterTypeDescription
addressstringAddress
txHashstringTransaction hash
voutintoutput sequence
coinAmountintUTXO coin amount, unit is "satoshi"
statusintstatus ,1:confirmed utxo 0:pending utxo
tickStringCoin name
inscriptionIdStringInscription Id
nftLocationVOsArrayNFT info
>nftIdStringUnique identifier of the NFT
>nftLocationStringnft location txhash:index:offset

Request example#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/transaction/get-utxo-brc20' \
--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",
    "tick":"tokb",
    "page": 1,
    "pageSize": 10
  }]
}'

Response example#

200
{
  "code": 0,
  "msg": "success",
  "data": [{
    "address": "bc1psnr548clz3f4fz6jmpnw5eqzj2v2musk082wp8fvq5ac3p5ete6qg05u8u",
    "utxoList": [{
      "txHash": "a1a41ccfe62ba715a085059ee455f164f649b5321ebb361ef6a4d65b24b047a0",
      "vout": 0,
      "coinAmount": 546,
      "status": 1,
      "inscriptionId": "#46039932",
      "tick": "tokb",
      "tokenAmount": "1000000000000000000",
      "nftLocaltionVOs": [{
        "nftId": "a1a41ccfe62ba715a085059ee455f164f649b5321ebb361ef6a4d65b24b047a0i0",
        "nftLocation": "a1a41ccfe62ba715a085059ee455f164f649b5321ebb361ef6a4d65b24b047a0:0:0"
      }]
    }]
  }]
}