Pact Swap

Get CWEB wallet balance without UTXO details


Retrieves the CWEB token balance for an ECDSA wallet identified by its public key, without detailed UTXO information. This endpoint queries the blockchain to get the current balance, total UTXO count, and balance in hex format, but does not return the individual UTXO details. This is more efficient when you only need the total balance and don't require UTXO-level information for transaction construction.

GET
/ecdsa_cm/getWalletBalanceCWEB

Query Parameters

publicKeystring

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.

backendUrl?string

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.

Formaturi
shard?string

The 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.

Value in"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/getWalletBalanceCWEB?publicKey=020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet&shard=BITCOIN"
{
  "balanceCWEB": "1000000000000000000000",
  "balanceHexCWEB": "de0b6b3a7640000",
  "numberOfUTXOs": 5,
  "decimals": 18
}

Was this documentation helpful? Any suggestions?

Last updated on