dcrdata icon indicating copy to clipboard operation
dcrdata copied to clipboard

multi: add support for DCR-USDT pair on `/markets` view

Open ukane-philemon opened this issue 1 year ago • 1 comments

  • Add Mexc exchange DCR-USDT pair.
  • Add Binance DCR-USDT pair.

Breaking Changes:

1. `ratesproto`: Rate messages are no longer `DCR-BTC` only, a new `currencyPair` field indicates which market rate is sent.
  
`ExchangeSubscription` field changed from `btcIndex` to `index`.
2. `exchanges`: Aggregated chart data has been removed. This is because combining usdt and btc market bids and asks is not
   ideal and serves very little purpose. Each market has its own chart.
3. Renamed three fields on `exchanges.ExchangeBotState`:
     - `btc_index` -> `index`
     - `dcr_btc_exchanges` -> `dcr_exchanges` (this field now returns a nested map of supported markets)
     - `btc_indices` -> `indices` (this field now returns a nested map of supported indices)
4. Affected API Endpoints:
     -  `/exchangerate` (`exchanges.ExchangeRates.Exchanges` json field returns a nested map of support markets)
     -  `/exchanges` (returns modified `exchanges.ExchangeBotState`)
Screenshot 2024-08-15 at 3 05 01 AM

Closes #2001

ukane-philemon avatar Aug 15 '24 02:08 ukane-philemon

This PR sets the foundation for adding other pairs and exchanges. As per UI, we can always improve on that if there are suggestions. If a redesign is want we want, I can get that sorted.

ukane-philemon avatar Sep 23 '24 15:09 ukane-philemon

I can't speak for others, but the aggregate chart is kinda the whole point for me. Can't we just convert all depth to USD?

buck54321 avatar Feb 10 '25 15:02 buck54321

I can't speak for others, but the aggregate chart is kinda the whole point for me. Can't we just convert all depth to USD?

I'm expecting a review from @davecgh.

@davecgh what do you think?

ukane-philemon avatar Feb 22 '25 11:02 ukane-philemon

Thank you for the review @davecgh.

I agree with @buck54321 in that I very much like the aggregated chart and find it much more useful overall.

I'd like to work on this in another PR..let this one remain focused. @buck54321, @davecgh cool?

ukane-philemon avatar Apr 10 '25 15:04 ukane-philemon

I'd like to work on this in another PR..let this one remain focused. @buck54321, @davecgh cool?

That sounds fine to me.

davecgh avatar Apr 11 '25 03:04 davecgh