Account Balance Search
What is an account balance?
In this guide, we will explain how to get the balance of an account on a blockchain network. The balance searched for is the number of native tokens of the blockchain assigned to this account.
For example, you will receive your SOL balance for an account from Solana.
Prerequisites
- Create an account and generate your application's API keys
Create an account on Quant Connect. Then, register your application to generate API keys to authorise your requests on Overledger APIs.
- Generate a Bearer Token You must generate an authentication token in order to use the Overledger APIs.
Call the endpoint
For example, to get the balance of address EhRSYFM1RgJoTaZ8LXHwePB6VGRPyYuXE1KiHNnSkX3p.
In the request body, pass the technology and network in which the address balance is to be checked and add the addressId as a path parameter then send the request.
curl --request POST \
--url https://hook.eu2.make.com/oy8diynn1kbbjn7mw39n93ugforf6qlx \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '
{
"location": {
"technology": "solana",
"network": "solana testnet"
},
"addressId": "EhRSYFM1RgJoTaZ8LXHwePB6VGRPyYuXE1KiHNnSkX3p"
}
'
If the request is successful, you would receive a response with the address balance as shown below:
{
"location": {
"technology": "solana",
"network": "solana testnet"
},
"addressId": "EhRSYFM1RgJoTaZ8LXHwePB6VGRPyYuXE1KiHNnSkX3p",
"timestamp": 1730734420,
"balances": [
{
"unit": "SOL",
"amount": "1969.676225269"
}
]
}
The response above shows that address EhRSYFM1RgJoTaZ8LXHwePB6VGRPyYuXE1KiHNnSkX3p owns 1969.676225269 SOL.
Updated 12 days ago