Add price in stats
mihaisc opened this issue · 7 comments
Using this query we can also easily fetch the price and orders. Adding the price is now feasible because we don't have any pools.
"stats": {
"orders": 7,
"price": 3.45
},
We do the same query and update both price and orderCount on : OrderStarted
, ExchangeCreated
and ExchangeRateChanged
. Also maybe add a small delay in this function , not sure what the best approach would be. Basically after you get an event to wait a bit for the subgraph to update (maybe this is already there, didn't check)
the subgraph update is there, yes.
@calina-c I've found that occasionally there are assets where there is no price sent in the stats object. Is there any reason for this? It looks like it could be a bug
This is causing problems when implementing oceanprotocol/market#1774
Please paste the did
did:op:b62d6359fd9c45ff3df50a82f8d3b89baf9ec60d3c8ecbe81a28934c0bba91b3
@jamiehewitt15 this is probably fixed in the refactor so we just have to wait for that https://v4-2.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:b62d6359fd9c45ff3df50a82f8d3b89baf9ec60d3c8ecbe81a28934c0bba91b3
@jamiehewitt15 this is probably fixed in the refactor so we just have to wait for that https://v4-2.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:b62d6359fd9c45ff3df50a82f8d3b89baf9ec60d3c8ecbe81a28934c0bba91b3
Ok cool, fair enough
That's this PR? #928