Config: Check asset type when obtaining pair format

This commit is contained in:
Adrian Gallagher
2019-06-27 13:58:12 +10:00
parent 6de0606d55
commit 7dbfcb311c
10 changed files with 22 additions and 6 deletions

View File

@@ -88,6 +88,7 @@ func (b *Bitfinex) SetDefaults() {
b.API.Endpoints.URLDefault = bitfinexAPIURLBase
b.API.Endpoints.URL = b.API.Endpoints.URLDefault
b.API.Endpoints.WebsocketURL = bitfinexWebsocket
b.WebsocketInit()
b.Websocket.Functionality = exchange.WebsocketTickerSupported |
exchange.WebsocketTradeDataSupported |

View File

@@ -111,6 +111,7 @@ func (b *Bitmex) SetDefaults() {
b.API.Endpoints.URLDefault = bitmexAPIURL
b.API.Endpoints.URL = b.API.Endpoints.URLDefault
b.API.Endpoints.WebsocketURL = bitmexWSURL
b.WebsocketInit()
b.Websocket.Functionality = exchange.WebsocketTradeDataSupported |
exchange.WebsocketOrderbookSupported |

View File

@@ -88,6 +88,7 @@ func (c *CoinbasePro) SetDefaults() {
c.API.Endpoints.URLDefault = coinbaseproAPIURL
c.API.Endpoints.URL = c.API.Endpoints.URLDefault
c.API.Endpoints.WebsocketURL = coinbaseproWebsocketURL
c.WebsocketInit()
c.Websocket.Functionality = exchange.WebsocketTickerSupported |
exchange.WebsocketOrderbookSupported |

View File

@@ -85,6 +85,7 @@ func (c *COINUT) SetDefaults() {
c.API.Endpoints.URLDefault = coinutAPIURL
c.API.Endpoints.URL = c.API.Endpoints.URLDefault
c.API.Endpoints.WebsocketURL = coinutWebsocketURL
c.WebsocketInit()
c.Websocket.Functionality = exchange.WebsocketTickerSupported |
exchange.WebsocketOrderbookSupported |

View File

@@ -87,6 +87,7 @@ func (h *HitBTC) SetDefaults() {
h.API.Endpoints.URLDefault = apiURL
h.API.Endpoints.URL = h.API.Endpoints.URLDefault
h.API.Endpoints.WebsocketURL = hitbtcWebsocketAddress
h.WebsocketInit()
h.Websocket.Functionality = exchange.WebsocketTickerSupported |
exchange.WebsocketOrderbookSupported

View File

@@ -88,6 +88,7 @@ func (h *HUOBI) SetDefaults() {
h.API.Endpoints.URLDefault = huobiAPIURL
h.API.Endpoints.URL = h.API.Endpoints.URLDefault
h.API.Endpoints.WebsocketURL = wsMarketURL
h.WebsocketInit()
h.Websocket.Functionality = exchange.WebsocketKlineSupported |
exchange.WebsocketOrderbookSupported |

View File

@@ -87,6 +87,7 @@ func (p *Poloniex) SetDefaults() {
p.API.Endpoints.URLDefault = poloniexAPIURL
p.API.Endpoints.URL = p.API.Endpoints.URLDefault
p.API.Endpoints.WebsocketURL = poloniexWebsocketAddress
p.WebsocketInit()
p.Websocket.Functionality = exchange.WebsocketTradeDataSupported |
exchange.WebsocketOrderbookSupported |

View File

@@ -90,6 +90,7 @@ func (z *ZB) SetDefaults() {
z.API.Endpoints.URL = z.API.Endpoints.URLDefault
z.API.Endpoints.URLSecondaryDefault = zbMarketURL
z.API.Endpoints.URLSecondary = z.API.Endpoints.URLSecondaryDefault
z.API.Endpoints.WebsocketURL = zbWebsocketAPI
z.WebsocketInit()
z.Websocket.Functionality = exchange.WebsocketTickerSupported |
exchange.WebsocketOrderbookSupported |