c9s / bbgo

The modern cryptocurrency trading bot framework written in Go.
https://bbgo.finance
GNU Affero General Public License v3.0
1.18k stars 283 forks source link

Base Urls adjusting for Exchanges - Binance #429

Open MikeCoderr opened 2 years ago

MikeCoderr commented 2 years ago

Binance offers certain clients different ways of accessing their eco system by means of changing certain parts of the URL: so, for the futures API it changes from https://fapi**1**.binance.com/ to https://fapi**6**.binance.com/. And for the WSS service it changes from wss://fstream-a.binance.com/ to wss://fstream-b.binance.com/.

Can you please implement an option when calling the exchange to in a strategy that this can be set? That way, I can also use it as an input for a strategy

c9s commented 2 years ago

We can add a detection that uses the environment variable to switch the endpoint.