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

Was this helpful?

  1. api

〰️ Check Limits

Check whether limits are reached before sending meta transaction

PreviousWhitelist Proxy ContractsNextBiconomy Data API

Last updated 4 years ago

Was this helpful?

Developers can apply limits on the usage of meta transactions from the on a per DApp, per User and per API for each user.

So before sending meta transactions on the client-side, developers can use this API to check whether the limits have already reached or not. If limits are reached developers can either fall back to the default web3 provider, show a message to the user that your free transaction limits have been exhausted, and let the user pay the gas fee or show an error message to the user.

Check Limits

GET https://api.biconomy.io/api/v1/dapp/checkLimits?userAddress=<user_address>&apiId=<api_id>

This API lets you know the current status of DApp limits for a particular user address and api id (smart contract method). In case when limits are exhausted, response will contain information about what was the type of limits applied and when the limits will be reset.

Query Parameters

Name
Type
Description

apiId

string

Api Id corresponding to smart contract methods against which limits needs to be checked for given user. This can be get from the dashboard under "Manage API" section

userAddress

string

Address of the user for whom the limits needs to be checked.

Headers

Name
Type
Description

x-api-key

string

API Key can be found on the Dashboard on view DApp page under Keys section. This is specific to a DApp.

// When limits are not exhausted
{
  "code": 200,
  "message": "Limits are not consumed",
  "responseCode": 200,
  "allowed": true
}

// When DApp limit is exhausted
{
  "code": 150,
  "message": "DApp limit reached",
  "responseCode": 200,
  "limit": {
    "allowed": false,
    "type": 0,
    "limitLeft": -0.001542277,
    "resetTime": 1594684800000
  },
  "allowed": false
}

// When User limit is exhausted
{
  "code": 151,
  "message": "User limit reached",
  "responseCode": 200,
  "limit": {
    "allowed": false,
    "type": 1,
    "limitLeft": 0,
    "resetTime": 1594684800000
  },
  "allowed": false
}


// When API/User limit is exhausted
{
  "code": 152,
  "message": "API limit reached",
  "responseCode": 200,
  "limit": {
    "allowed": false,
    "type": 1,
    "limitLeft": 0,
    "resetTime": 1594684800000
  },
  "allowed": false
}

Example Curl Request

curl --request GET --url 'https://api.biconomy.io/api/v1/dapp/checkLimits?userAddress=<USER_ADDRESS>&apiId=<API_ID_HERE>' --header 'x-api-key: <API_KEY_HERE>'

Dashboard