You are viewing a single comment's thread from:

RE: How to follow all steem-engine token movements

in #steem-engine5 years ago

Thank you very much @holger80 :)

I've got one question - what happens if the order is not fulfilled immediately? Because you wrote:

When there is already a matching buy order on the market

What happens if there's no matching order - how to track if the transaction was later completed? Would it be necessary to store all tx ids that we're looking for and check them occasionally to see if they were fulfilled?

Sort:  

It would be necessary to store all trx_ids of not completely fulfilled buy or sell orders and check once in a while.

Posted using Partiko Android

Thank you :)

When the order is not fullfilled immediately, only one transfer to the market is done. In this case,

len(logs["events"]) == 1

and the order is added to the buyBook or sellBook. When then a new ordre is placed which is able to fullfill it, this new order has more than 1 entry in events.

So, not fullfilled order are build up and the token are locked into the marked. When there is a sucessfully buy/sell, tokens are moved out the market. The movements can be tracked by checking all entries in log["events"]