BlockPo / BlockPo-to-Tradelayer

Incubation Repo for the TradeLayer protocol, 0.2.0
http://www.tradelayer.org
Other
8 stars 8 forks source link

Get Volume RPC #123

Closed patrickdugan closed 4 years ago

patrickdugan commented 4 years ago

Gets cumulative LTC or BTC volume for pair (propertyid x, propertyid y) between blocks n and z, Oracle, Native are both Boolean flags. If propertyID1 is null, propertyID2 is ignored and all contracts and trading pairs for flags Oracle or Native are returned. If propertyID1 is an integer and propertyID2 is null, the property must be a contract. If blocks n is an integer and block z is null then z is assumed to be the current block height. If Oracle or Native flags are null them they are assumed true, if false then no Oracle contracts or Native contracts/pairs are included. Native pairs would include BTC/LTC to TOTAL/ALL, BTC<->sBTC, BTC<->dUSD, BTC/TOTAL native contracts, BTC/USD native contracts, and so on.

E.g. to get 24 Hour Volume for Oracles, Native, and block height is 608144 pass:

null, null, 608000, null, true, false

null null 608000, null, false, true

santos177 commented 4 years ago

Working on it, in branch volume.