Asset Balances
Request asset balance info of the account.
Method
GET https://api.ninjapay.me/tapi/v1/assetBalance
Parameters
// no parameters required
Response
{
"status": <bool>,
"data": {
"lbtc": <string>,//balance in BTC, not SAT
"btc": <string>,//balance in BTC, not SAT
"eth": <string>,//balance in Ethereum
"sol": <string>,//balance in Solana
"ltc": <string>,//balance in Litcoin
"matic": <string>,//balance in Matic
},
"message": <string>
}
Example
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY' // Invoice key
},
body: '{}'
};
fetch('https://api.ninjapay.me/tapi/v1/assetBalance', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Ex Response
{
"status": true,
"data": {
"btc": "0.00000002" //balance in BTC, not SAT
"eth": "1.20000000"
},
"message": "last updated at 2:42pm, 12Jan 24"
}
Last updated