I am searching a way to get in the SDK the minimum Balance an account need to hold (means with the ASA and the Application it hold)
I have found that :
Asset Information — PyTeal documentation but it not seems possible to access this function in the SDK.
So maybe I can recreate this kind of function?
I know I need 0.1 per ASA hold + 0.1 by default, but the issue come from application.
I try (refer to that : Smart contract details - Algorand Developer Portal) to use the formula
(25,000+3,500)*schema.NumUint + (25,000+25,000)*schema.NumByteSlic
where schema.NumUint and schema.NumByteSlic are directly taken from
but this is also less than the real value.
What I am missing here ?
btw if such kind of function already been develop, I take it also
This was a common request so it was added to the REST api, you can see the
min-balance listed here:
Algorand Developer Docs, SDKs, REST APIs, CLI tools, ecosystem projects, metrics dashboard and sample code, how-tos, and news from the Algorand developer community
Thanks for your answer
However, I am not sure to understands.
I have just try using algoexplorer v2 API and a random account :
and I am not able to see this min-balance parameter.
Am I on the wrong API for that ?
Try again, the change was pushed to mainnet last week
Alternatively, the min-balance can be obtained from the API that powers up AlgoExplorer:
$ curl -s 'https://indexer.algoexplorerapi.io/v2/accounts/ZW3ISEHZUHPO7OZGMKLKIIMKVICOUDRCERI454I3DB2BH52HGLSO67W754' | jq '.["account"]["min-balance"]'
This API doesn’t have documentation yet, but is mostly compatible with the Algorand Indexer.
Algorand Indexer does not return the minimum balance. Also the node endpoint you are hitting is deprecated in our services because the node does not scale like indexers for Saas.
what is the difference between
indexer.algoexplorerapi.io and algoindexer.algoexplorerapi.io?
Do we have a reliable API to get the minimum balance?
Yes, you can use
http://indexer.algoexplorerapi.io for that purpose.