Every API method is called by exchange object, such as
Exchange and trade pair is set when you start a robot. The following market api and trade api is based on this setting.
If you set your exchange is “Binance”, trading pair is “BTC_USDT”, then call
exchange.GetTicker(), you will get the ticker of “BTCUSDT” of Binance.
trading pair is also called
currency in some exchenge’s API docs,
2.2.1 Add Exchange¶
Check on how to add exchange when start a robot: 1.3.3 Add exchanges
AEX BigONE Binance BitFlyer Bitfinex Bithumb Bitpie Bitstamp Bittrex BotVS CoinEx CoinPlus Coincheck Coinone Exchange Futures_BitMEX Futures_CTP Futures_Deribit Futures_Esunny Futures_OKCoin GateIO HitBTC Huobi KEX Korbit Kraken LiveCoin OKCoin_EN OKEX Poloniex Quoine STEX WEX ZB Zaif
2.2.2 Exchange Variable¶
It can be imaged as a real exchange; default setting is the first exchange in your strategy’s parameter. all of data interactive with the exchange which achieve through this object function.
The exchange’s array, it contains multiple exchange objects which are sorted by order of addition . used as
If you use
exchange directly, which equals to
When you add an exchange, it’s always fllowed by a trade pair, such as
exchanges can be the same “actually exchange” but with different trade pair.
2.2.3 Exchange Information¶
exchange.GetName() Return the name of the exchange, string type
exchange.GetLabel() Return the exchange’s custom label, string type