Skip to main content

Balances

Abstract​

This list groups together certain endpoints that allow us to know the native crypto balance of an account in a given network, or the token balance of an account in a given smart contract or other balance-related functionalities.

Endpoints​

Balance of Native Crypto​

This endpoint allows you to request the balance of native crypto for a given account. Native crypto is the crypto that we use on each blockchain to pay for the gas from operations.

The call that must be performed is:

GET https://api.vottun.tech/core/v1/evm/chain/{account}/balance

Path Params​

nametyperequireddescriptionexample
accountstringyesIt identifies the account to get the balance0xA9I99DF..7EB3CD

Query Params​

nametyperequireddescriptionexample
networkintyesIt identifies the blockchain for which you want to know the account balance.1
Example​
GET https://api.vottun.tech/core/v1/evm/chain/0xA9I99DF..7EB3CD/balance?network=43113

Response​

It will return a json with the following fields:

nametypedescriptionexample
balanceintThe native crypto account balance at the given chain48.71336216034074
Example​
{
"balance": 48.71336216034074
}

Http status

resulthttp status
Information request is successful200
The request does not include the correct information as per format or content400
The customer is not authorized401

Balance of ERC721 tokens per account​

This endpoint retrieves the balance of the given address in the specified smart contract and network. The call that must be performed is:

GET https://api.vottun.tech/erc/v1/erc721/balanceOf

With a body like this:

{
"contract": "0x6412bdbDf5863464d8e3301Cf6805cb83613B2B1",
"network": 43113,
"address": "0x8C437496D4b311b365Ab06a34CD47863732165A3"
}

Where the attributes are as following:

  • contract: the address of the smart contract
  • network: the chain id of the network
  • address: the address for which you want to check the NFT balance

Balance Of ERC20 per account (not native)​

This endpoint retrieves the balance of tokens that an address holds. The call that must be performed is:

GET https://api.vottun.tech/erc/v1/erc20/balanceOf

With a body like this:

{
"contract": "0x9b7127AfAE2cF200e3665c5b03Ac9d291d9a90Dc",
"network": 43113,
"address": "0xfE463ce3BFda970f33C15547D0425D1332A8994a"
}

Where the attributes are as following:

  • contract: the address of the smart contract
  • network: the chain id of the network
  • address: the address for which you want to check the token balance