3

Do we have any api mechanism to find the balance for an address/contract for a given blockheight or till a given date.

4

You can use the HTTP-RPC interface on your local node.

http://localhost:8732/chains/main/blocks/{BLOCK}/context/contracts/{ADDRESS}/balance

On a default node, this is only good for the previous 5 cycles. If you want balances older than that, you need to use an archive node.

Other options are to use the API provided by most block explorers like tzstats.com and tzkt.io which have account history back to block 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.