dex-subgraph icon indicating copy to clipboard operation
dex-subgraph copied to clipboard

Calculate price for orders, trades, and average traded price

Open anxolin opened this issue 5 years ago • 0 comments

Make it easier for consumers to check the price by doing the calculation already. For that, we need to take into account the decimals of the tokens.

Includes

  • [ ] Limit price for an order
  • [ ] Average traded price for the order. As the weighted avg price of all the orders ---> sum(soldTokens) / sum(soldTokens)
  • [ ] Trade price

anxolin avatar Mar 17 '20 19:03 anxolin