Get CWEB wallet balance with UTXO details
Retrieves the CWEB token balance for an ECDSA wallet identified by its public key, including detailed information about all unspent transaction outputs (UTXOs). This endpoint queries the blockchain to get the current balance and all UTXOs associated with the wallet. The UTXOs are sorted by balance in descending order (highest first), which is useful for transaction construction. This endpoint is ideal when you need detailed UTXO information for building transactions that require specific UTXO selection.
Query Parameters
The CWEB wallet public key (ECDSA public key) for which to retrieve the balance. This should be a hex string without the 0x prefix. The public key is used to identify the wallet address on the Coinweb network.
Backend URL. Default is https://api-cloud.coinweb.io/wallet. This URL is used to query the contract's claim storage to retrieve all orders.
uriThe network/shard name where the wallet is deployed. If not provided, defaults to BNB. Available options include: BITCOIN, ELROND, ETHEREUM, KUJI, LITECOIN, POLYGON, ARBITRUM, DEVNET_L1A, DEVNET_L1B, BITCOIN_TESTNET, and other NetworkName enum values.
"BITCOIN" | "BITCOIN_CASH" | "BITCOIN_CASH_TESTNET" | "BITCOIN_TESTNET" | "BNB" | "BNB_TESTNET" | "DOGECOIN" | "DOGECOIN_TESTNET" | "ELROND" | "ELROND_TESTNET" | "ETHEREUM" | "ETHEREUM_TESTNET" | "KUJI" | "KUJI_TESTNET" | "LITECOIN" | "LITECOIN_TESTNET" | "POLYGON" | "POLYGON_TESTNET" | "ARBITRUM" | "ARBITRUM_TESTNET" | "DEVNET_L1A" | "DEVNET_L1B"Response Body
curl -X GET "https://cwap-api.coinhq.store/ecdsa_cm/getWalletBalanceCWEBwithUTXOs?publicKey=020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet&shard=BITCOIN"{
"balanceCWEB": "1000000000000000000000",
"balanceHexCWEB": "de0b6b3a7640000",
"numberOfUTXOs": 5,
"decimals": 18,
"utxos": [
{
"balanceCWEB": "100000000000000000000",
"txId": "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
}
]
}Was this documentation helpful? Any suggestions?
Last updated on