get chain balances
Get the balance of assets on the chain. This API is used by developers to choose which supported chain to withdraw assets from.
This endpoint retrieves the balance of a specific asset on the chain. If the asset id not provided, the balance of all assets will be returned.
Query parameters
AssetIdstringOptional
Responses
200
OK
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
500
Internal Server Error
501
Not Implemented
get
GET /v1/chain-balances HTTP/1.1
Host: testnetopenapi.hibit.app
Accept: */*
{
"code": 1,
"message": "text",
"data": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
Code example
import { hibitClient } from '@delandlabs/hibit-sdk';
const options = {
network: HibitNetwork.Testnet
};
hibitClient.setOptions(options);
const chains = await hibitClient.getChainBalances();
SDK
Source code https://github.com/Deland-Labs/hibit-sdk
Last updated