galacticcouncil / sdk

Galactic SDK
Apache License 2.0
12 stars 14 forks source link

Move functions related to indexers and charting to sdk #88

Open jak-pan opened 3 weeks ago

jak-pan commented 3 weeks ago

Add additional optional endpoint for indexer

Fetching and chart price calculation on the frontend - get historical data from the indexer and compute price based on specific pool logic for single point in time

Add function to display interpolated data for specific time points to display charts properly

We will need to temporarily add the router event to the historical data to keep current charts for unpaired tokens

Add better route price handling aggregator

nohaapav commented 3 weeks ago

We already support optional route param for getSell, getBuy so if we know the most liquid route we can use it to calculate the trade.

We also support most liquid route calc, but used only for spot price atm.

jak-pan commented 3 weeks ago

We already support optional route param for getSell, getBuy so if we know the most liquid route we can use it.

We also support most liquid route calc but only for spot price calc ATM.

We need this for historical blocks so we need to move similar logic to indexer to store this at the point in time. Polling the node for this would be too expensive