Biconomy Gasless SDK (EOA)
DashboardMediumWebsite
  • 🚀Getting Started
  • Introduction
    • 🤘Why Biconomy?
    • 🙂How we simplify transactions
  • Products
    • 💸Gasless Transactions
      • Choose An Approach to Enable Gasless
        • Standard EIP 2771 Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Custom Implementation Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Smart Contract Wallet Approach
          • Gnosis
        • Network Agnostic Transactions
          • EIP-2771 Approach
          • Custom Approach
      • Conditional Whitelisting
      • Gasless SDK (EOA) 3
      • Networks Supported
    • ↔️Hyphen - Instant Cross-Chain Transfers
      • SDK
        • DepositManager
        • TransferManager
        • TokenManager
      • APIs
      • Helper Methods
      • Migrating from Hyphen V1
      • Contract Addresses
      • Hyphen Widget
  • Guides
    • 💻Dashboard
      • DApp Statistics
    • ⛽Gas Tank Deposits
      • Via Dashboard
      • Via Smart Contract
  • api
    • 🔧Native Meta Transaction
      • Get Retried Hashes
    • 🌎Dashboard APIs
    • ⚪Whitelist API
      • Whitelist Destination Address
      • Whitelist Proxy Contracts
    • 〰️ Check Limits
    • 💿Biconomy Data API
      • 👨‍🚀Unique User Data
      • 🧑‍🔧Per User Limits Data
      • ⛽Gas Tank Balance Data
  • SDK
    • 📙Gasless SDK (EOA)
      • Configuration
  • Tutorials
    • 🔰Native Meta Transactions
      • How To Build Your First DApp
        • Write Your First Smart Contract
        • Initialize Web3 on Client Side
        • Executing First Blockchain Transaction
      • Enable Native Meta Transactions
        • Smart Contract
          • Describe Your Structs
          • Declare Your Variables
          • Modify Respective Function
        • Client Side
          • Design Your JSON structure
          • Design Your Domain Separator
          • Design Data Types
          • Define Data To Sign
          • Generate Signatures
      • Integrate Biconomy
        • Register On Dashboard
        • Integrate Gasless SDK (EOA)
      • Summary
  • BICO Staking
    • 🪁Safety Module
  • Get in touch
    • 👥Contact Us
  • Misc
    • 🧩Projects on Biconomy
    • 🌐Supported Networks
    • 📫Contract Addresses
    • ✔︎ Smart Contracts Audit
    • ❓FAQs
Powered by GitBook
On this page
  • Fetches gas tank balance for a particular dapp
  • API Call via NodeJS

Was this helpful?

  1. api
  2. Biconomy Data API

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

Fetches gas tank balance for a particular dapp

GET https://data.biconomy.io/api/v1/dapp/gas-tank-balance

Headers

Name
Type
Description

apiKey*

String

Api Key unique to every dapp

authToken*

String

Token unique to every user account

{
    "code": 200,
    "message": "Dapp gas tank balance fetched for dappid: 6214cb11e5163ec3a892f729",
    "responseCode": 200,
    "dappGasTankData": {
        "effectiveBalanceInWei": 3496503496503496700,
        "effectiveBalanceInStandardForm": 3.4965034965034967,
        "isBelowThreshold": false,
        "isInGracePeriod": false
    }
}
{ 
    code: 401, 
    message: 'Not Authorized', 
    responseCode: 401 
}

API Call via NodeJS

const fetch = require("node-fetch");
const { URL, URLSearchParams } = require('url');
const authToken = "<Account's AUTH TOKEN>";
const apiKey = "<Dapp's API KEY>";
const getDappGasTankBalance = () => {
    const url = new URL("https://data.biconomy.io/api/v1/dapp/gas-tank-balance");

    const requestOptions = {
        method: 'GET',
        headers: {  "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey }
    };
    
    fetch(url, requestOptions)
    .then(response => response.json())
    .then(data => console.log(data))     
    .catch(error => console.error('Error:', error));
}

getDappGasTankBalance();
PreviousPer User Limits DataNextGasless SDK (EOA)

Last updated 3 years ago

Was this helpful?

💿
⛽