how to get liststreamitems to list ALL stream items

+1 vote
It appears that liststreamitems only lists 10 items if a count parameter is not passed in. Is the only way to retrieve all items on the stream to pass in a count which will be larger than the number of items you expect? What if the number of items is unknown. How do you retrieve all items?
asked Jul 20, 2017 by anonymous

1 Answer

+1 vote
 
Best answer

You can do something like this, which will show up to the last 999999 items:

liststreamitems stream1 false 999999

answered Jul 20, 2017 by MultiChain
This solution does work but not when all the items are above 999999.Is there any possible solution to retrieve all the stream items in 2021?
Just make the number higher, but it will really be a extremely slow API request which might run out of memory, and it is not recommended.
However this doesn't solve my problem, because the value of the number of items is unknown. Is there a command to know the number of items already in a stream?

Thanks:)
Yes, you can use liststreams for that.
...