β›½
Gas Tank Balance Data
With this data API, you can find out the current gas tank balance for a particular dapp that you have registered on the dashboard
get
https://data.biconomy.io/api/v1/dapp
/gas-tank-balance
Fetches gas tank balance for a particular dapp

API Call via NodeJS

1
const fetch = require("node-fetch");
2
const { URL, URLSearchParams } = require('url');
3
const authToken = "<Account's AUTH TOKEN>";
4
const apiKey = "<Dapp's API KEY>";
5
const getDappGasTankBalance = () => {
6
const url = new URL("https://data.biconomy.io/api/v1/dapp/gas-tank-balance");
7
​
8
const requestOptions = {
9
method: 'GET',
10
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey }
11
};
12
13
fetch(url, requestOptions)
14
.then(response => response.json())
15
.then(data => console.log(data))
16
.catch(error => console.error('Error:', error));
17
}
18
​
19
getDappGasTankBalance();
Copied!