tdex-network / tdex-analytics

Analytics and Historical data feed about TDEX Network
MIT License
0 stars 6 forks source link

Support fetching the spot price via new GetMarketPrice exposed by tdex trade protocol #52

Closed tiero closed 1 year ago

tiero commented 1 year ago

Instead of hardcoding the amount sats and using PreviewTrade let's move to GetMarketPrice which returns the spot_price (ie. equivalent of quote_price) and the minimum tradeable amount needed to have a value that makes sense.

Need this to be merged https://github.com/tdex-network/tdex-daemon/pull/669 and deployed on mainnet daemons

altafan commented 1 year ago

Now that the PR has been merged, this service should try to call the GetMarketPrice API to fetch the spot price first and fallback to trade preview only if this endpoint is not avaiable.

tiero commented 1 year ago

Let's tag a v0.9 release for tdex daemon, and upgrade all the testnet providers. Also, let's update the mapping for ASSET_CURRENCY_PAIRS for USDQ and EURQ in the testnet instance on our infrastructure