Is there a function in the algosdk or an API to the algodclient or indexer or any other way to get the minimum balance required for an account address?
I require this information to add validations before creating a transaction.
Is there a function in the algosdk or an API to the algodclient or indexer or any other way to get the minimum balance required for an account address?
I require this information to add validations before creating a transaction.
Hi Xavier,
The min balance is now available via the API when getting balance information for an account.
Ben
It’s mentioned in the documentation but when I hit the endpoint, the field is not returned in the response
Which node / API service are you using?
This works using the algonode.io node for example:
$ curl -s https://testnet-api.algonode.cloud/v2/accounts/6GIE5OUIJIMV5JTBEXLGLYE6TJTJBYKYF6MCHOOODM7VWAVSKHL7PK3FBE | jq
{
"address": "6GIE5OUIJIMV5JTBEXLGLYE6TJTJBYKYF6MCHOOODM7VWAVSKHL7PK3FBE",
"amount": 300200,
"amount-without-pending-rewards": 300200,
"apps-local-state": [],
"apps-total-schema": {
"num-byte-slice": 0,
"num-uint": 0
},
"assets": [],
"created-apps": [],
"created-assets": [],
"min-balance": 100000,
"pending-rewards": 0,
"reward-base": 27521,
"rewards": 0,
"round": 20506211,
"status": "Offline"
}
(jq
is just here to pretty print the response)
I was using https://node.testnet.algoexplorerapi.io
I’ll use the one you sent now.
Thank you