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

GetAssetBalance

Get all Taproot Assets balance in a wallet.

POST /api/get-asset-balance

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

wallet_id

string

The end user's wallet id

Request

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

Response

{
    "code": 0,
    "data": {
        "assets_balance": [
            {
                "asset_id": "ou3pE/AgBDOCyX1fGuwqoH/xvc+TOF9iCMYGUN6ds1o=",
                "asset_tag": "bits",
                "amount": 271,
                "type": 0
            }
        ]
    },
    "message": "",
    "traceid": "48e2e725-adcb-4333-a587-5aa9e4b0c403"
}
{
  "error": "Invalid request"
}

In the above outputs, "type" has two values: 0 for Normal, 1 for Collectible

PreviousEstimate-tx-feeNextGetBtcBalance

Last updated 8 months ago