BitTap Documentation
  • About BitTap
  • Wallet Product
    • Custodial vs. Non-Custodial
    • Off-Chain Proof
    • Get Started
    • Privacy Policy
  • DEX PRODUCT
    • Overview
  • Developer Guides
    • Overview
    • API Reference
      • CreateWallet
      • NewAddr
      • DecodeAddr
      • QueryAddrs
      • ImportAsset
      • QueryAssetStat
      • ListAssetHistory
      • Estimate-tx-fee
      • GetAssetBalance
      • GetBtcBalance
      • 💎SendAsset
        • TransferAsset
        • AnchorVirtualPsbt
        • PublishTransfer
      • 💎SendBtc
        • TransferBtc
        • PublishTransferBtc
    • JS SDK
Powered by GitBook
On this page
  1. Developer Guides
  2. API Reference

GetBtcBalance

Get BTC balance in a wallet.

POST /api/get-btc-balance

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

wallet_id

string

The end user's wallet id

btc_addr

string

The returned BTC address when initially create this wallet

Request

{
  "wallet_id": "10e21d53-82d3-43d6-99bc-03ea6945d902",
  "btc_addr": "bc1qp9zm6x5q6y02036l2q93936c4fs3acjr546yly"
}

Response

{
    "code": 0,
    "data": {
        "addr": "bc1qp9zm6x5q6y02036l2q93936c4fs3acjr546yly",
        "balance": 169931100
    },
    "message": "",
    "traceid": "a73c5849-6a10-4bda-a411-d6c236277939"
}
{
  "error": "Invalid request"
}
PreviousGetAssetBalanceNextSendAsset

Last updated 11 months ago