Count Stream Items of a Given Key

+1 vote
Is there a way to count the stream items of a given key? Or is it safe to just return all the stream items in one go? I was planning to do a pagination-- so I need the count to determine the number of pages.

I found out that in liststreams you can get the number of items, but I would need to filter it by the key.

Thanks.
asked Mar 1, 2017 by John_cl

1 Answer

+1 vote
 
Best answer

Use liststreamkeys and pass the key as a parameter. The response will include the number items (confirmed and total) just for that key.

answered Mar 1, 2017 by MultiChain
selected Mar 1, 2017 by John_cl
...