Rewinding past txn type appl is not currently supported

Hi guys,

does anybody knows, how to get asset balance of specific account at specific round?

https://algoindexer.algoexplorerapi.io/v2/accounts/EY5HJUY3BGHNUDEWZY52OXTY7JJK5MZDITYGJMWYPV4OV64XMN4CTLUQQY?round=18988231

shows

{"message":"failed while searching for account: error while rewinding account: EY5HJUY3BGHNUDEWZY52OXTY7JJK5MZDITYGJMWYPV4OV64XMN4CTLUQQY[18988601,6]: rewinding past txn type appl is not currently supported"}

This is quite crucial for many use cases to know the balance of asset of specific account at specified round…

I know that https://algoindexer.algoexplorerapi.io/v2/assets/452399768/balances?round=18988231
endpoint may be used for this purpose, but it does not have filter for address and i think it is better to load specific account than MBs of data from indexer…

https://algoindexer.algoexplorerapi.io/v2/assets/452399768/balances?round=18988231&address=EY5HJUY3BGHNUDEWZY52OXTY7JJK5MZDITYGJMWYPV4OV64XMN4CTLUQQY
returns {"message":"Unknown parameter detected: address"}

1 Like

This is a known limitation of the indexer:

One workaround is to get all the transactions of the account using the appropriate endpoint and play all the transactions, but this is indeed not very user friendly.

You can upvote the above issue and explain the use cases where you need it there.

1 Like

thanks @fabrice … i think workaround to use asset balances is little more efficient than traversing each account from current round to the specific round… i have upvoted the issue and put there the vote coin use case

@fabrice … i am trying to extend the Vote Coin solution to be usable also for Algo

is there any way how can i get the Algo balance of the account BITSCVQHPCD7XAIYYEA5B3F3PWC57IRSIUIWPZV6JXFWUVMO7WQCXSP7NE at round 16024568 ?

I don’t know any solution apart from getting all the transactions of the account using the appropriate endpoint and play all the transactions, but this is indeed not very user friendly.

https://algoindexer.algoexplorerapi.io/v2/accounts/EY5HJUY3BGHNUDEWZY52OXTY7JJK5MZDITYGJMWYPV4OV64XMN4CTLUQQY?round=18988231

returns now

{"message":"failed while searching for account: error while rewinding account: rewinding past inner transactions is not supported"}

https://algoindexer.algoexplorerapi.io/v2/assets/452399768/balances?round=18988231

returns now {"message":"Unknown parameter detected: round"}

https://algoindexer.algoexplorerapi.io/v2/assets/452399768/balances?round=18988231&address=EY5HJUY3BGHNUDEWZY52OXTY7JJK5MZDITYGJMWYPV4OV64XMN4CTLUQQY

returns now {"message":"Unknown parameter detected: round"}

But to be fair, i think that there is a progress … i have seen the accounts balance where the error before was the Rewinding past txn type appl is not currently supported but i am not able to reproduce this issue any more… So i think indexer now just needs to resolve the issue rewinding past inner transactions is not supported and everything would be great…