Pact Swap

Batch get CWEB wallet balances with UTXO details


Retrieves CWEB token balances for multiple ECDSA wallets identified by their public keys, including detailed information about all unspent transaction outputs (UTXOs) for each wallet. This endpoint queries the blockchain for multiple wallets in a single request, which is more efficient than making individual requests. The response is a record mapping each public key to its balance information with UTXO details. UTXOs for each wallet are sorted by balance in descending order (highest first). This endpoint is ideal when you need to check balances and UTXO details for multiple wallets simultaneously.

GET
/ecdsa_cm/batchGetWalletBalanceCWEBwithUTXOs

Query Parameters

publicKeysarray<string>

Array of CWEB wallet public keys for which to retrieve balances. This allows querying multiple wallets in a single request, which is more efficient than making individual requests. The public keys should be provided as hex strings without 0x prefix.

backendUrl?string

Backend URL. Default is https://api-cloud.coinweb.io/wallet. This URL is used to query the wallet balances from the blockchain.

Formaturi
shard?string

The network/shard name where the wallets are 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/batchGetWalletBalanceCWEBwithUTXOs?publicKeys=020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet&shard=BITCOIN"
{
  "property1": {
    "balanceCWEB": "1000000000000000000000",
    "balanceHexCWEB": "de0b6b3a7640000",
    "numberOfUTXOs": 5,
    "decimals": 18,
    "utxos": [
      {
        "balanceCWEB": "100000000000000000000",
        "txId": "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
      }
    ]
  },
  "property2": {
    "balanceCWEB": "1000000000000000000000",
    "balanceHexCWEB": "de0b6b3a7640000",
    "numberOfUTXOs": 5,
    "decimals": 18,
    "utxos": [
      {
        "balanceCWEB": "100000000000000000000",
        "txId": "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
      }
    ]
  }
}

Was this documentation helpful? Any suggestions?

Last updated on