is it a good idea to use for each asset subscribe and listassettransactions

+3 votes

Hello,

coming from an asset and a source address we want to know the targetaddresses of all done transactions (sendassetfrom);

1. is it a good idea to do this the above mentioned way (subscribe to asset + listassedtransactions)?

if yes is it better to do this on a case by case basis or can we bootstrap the subscription for all given asset?

 

thanks and regards thomas

related to an answer for: How to query asset's past transactions?
asked Feb 1, 2017 by thomas

1 Answer

+1 vote

You can either subscribe to the asset, then view all the transactions involving that asset with listassettransactions. Or if I understood the question correctly, you could also use importaddress for that address, then use listaddresstransactions to view all the transactions involving that address. Depending on what else is going on with that asset or address, you can decide which of these will be a more specific way to target the transactions of interest.

answered Feb 1, 2017 by MultiChain
ok, we are thinking about performance; we are currently uncertain if we should do this on a case by case basis or if we can bootstrap this on start of our application;
=> how many subscription can we do until we have problem respective to memory, speed, etc.?
There's no limit on the number of subscriptions – it's all managed properly in an on-disk database. Of course it will be a little slower and take up more disk space if you subscribe to everything, but nothing more than that. You also have the option of using the autosubscribe runtime parameter to automatically subscribe to every new asset and/or stream when it is created.
...