ExchangeUnion / market-maker-bot

MM Bot for OpenDEX. Make profits via arbitrage between OpenDEX and a connected CEX account like Binance 🤖
GNU Affero General Public License v3.0
105 stars 20 forks source link

Validate base and quote asset based on exchange's supported markets #99

Closed erkarl closed 3 years ago

erkarl commented 3 years ago

At the moment valid trading pairs are hardcoded in the configuration checks.

This issue is about fetching active markets for DEX and CEX and validating the provided trading pair against it.

kilrau commented 3 years ago

To add some more details:

This issue is about fetching active markets for DEX and CEX and validating the provided trading pair against it.

kilrau commented 3 years ago

Also cex-base-asset & cex-quote-asset should be ignored entirely if test-centralized-baseasset-balance & test-centralized-quoteasset-balance are set, meaning arby doesn't even connect to a cex and to fetch markets/pairs.

erkarl commented 3 years ago

Also cex-base-asset & cex-quote-asset should be ignored entirely if test-centralized-baseasset-balance & test-centralized-quoteasset-balance are set, meaning arby doesn't even connect to a cex and to fetch markets/pairs.

How does arby get the price feed for CEX if cex-base-asset and cex-quote-asset values are ignored?

kilrau commented 3 years ago

Arby subscribes to the CEX price stream for base-asset and quote-asset

erkarl commented 3 years ago

Arby subscribes to the CEX price stream for base-asset and quote-asset

Yes, arby subscribes to the price stream for base-asset and quote-asset (or cex-base-asset and cex-quote-asset if defined), but we should still validate that the trading pair exists on that CEX (otherwise we won't get a price feed). This should happen even if test-centralized-baseasset-balance and test-centralized-quoteasset-balance is defined.

kilrau commented 3 years ago

Agreed! My bad, removed that point.

kilrau commented 3 years ago

Closed by https://github.com/ExchangeUnion/market-maker-tools/pull/111