Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add price in stats #853

Closed
mihaisc opened this issue Jul 15, 2022 · 7 comments · Fixed by #862
Closed

Add price in stats #853

mihaisc opened this issue Jul 15, 2022 · 7 comments · Fixed by #862
Assignees
Labels

Comments

@mihaisc
Copy link

mihaisc commented Jul 15, 2022

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)

@mihaisc mihaisc added Type: Enhancement New feature or request Priority: Low labels Jul 15, 2022
@calina-c
Copy link
Contributor

the subgraph update is there, yes.

@jamiehewitt15
Copy link
Member

jamiehewitt15 commented Nov 16, 2022

@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

image

This is causing problems when implementing oceanprotocol/market#1774

@mihaisc
Copy link
Author

mihaisc commented Nov 16, 2022

Please paste the did

@jamiehewitt15
Copy link
Member

did:op:b62d6359fd9c45ff3df50a82f8d3b89baf9ec60d3c8ecbe81a28934c0bba91b3

@mihaisc
Copy link
Author

mihaisc commented Nov 16, 2022

@jamiehewitt15
Copy link
Member

@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

@jamiehewitt15
Copy link
Member

That's this PR? #928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants