OmniLayer / omnicore

OmniCore staging tree
http://www.omnilayer.org/
MIT License
753 stars 226 forks source link

omni_gettradehistoryforaddress : Add `blocktime` for each match in matches array of JSON response #1264

Open msgilligan opened 1 year ago

msgilligan commented 1 year ago

When trying to build a list of all DEX matching transactions for an Omni Core wallet, the omni_gettradehistoryforaddress method is very useful. However, in order to get a timestamp for each matching transaction an additional call for each match must be made to get the transaction (block) time.

Adding a blocktime property to each object in the matches array would eliminate the need for these extra calls. (The blocktime property in the root object is the blocktime for the sell offer, but we also need the time for each matching transaction.)

It might also make sense to add a blocktime property to each match in the response to omni_gettradehistoryforpair.

msgilligan commented 1 year ago

PR #1270 looks good!