You are viewing a single comment's thread from:

RE: Introducing SteemData - A Database Layer for STEEM

in #steemdata8 years ago

@furion: what type is the amount field in the Operations / VirtualOperations table?
How would one search for transactions above a certain amount or transactions that were in SBD etc. Tried with NumberDecimal/Float and currency: "STEEM" but to no avail..

Sort:  

The amount fields in Operations/VirtualOperations are still strings unfortunately (todo: have native types everywhere for v2).

So what you have to do is query all transactions for a time period, and then filter out the ones you need in your code.

Python Example:

from steem.amount import Amount

filter(Amount(x['amount']).currency == 'STEEM', lambda x: Amount(x['amount']).amount > 100, db_results)

I see, ok, Thanks man!