Paging results of getaddressbalances

+2 votes

Hello! 

Is there any way to have the getaddressbalances result paged or limited? Some of my addresses have more than 10000 assets which makes it kind of impossible to use sad

 

 

asked Sep 14, 2019 by nemicko

1 Answer

0 votes

There is no paging facility in getaddressbalances. It would also be a bit problematic because, unlike those APIs which do offer paging, there is no guarantee that the list will be stable between one API call and the next – new transactions could be coming in.

Your best bet is to use getmultibalances which allows an explicit set of assets to be provided. So you could use listassets to page through the assets that exist on the blockchain, and for each set of assets, pass them explicitly to getmultibalances.

answered Sep 17, 2019 by MultiChain
...