Add dynamic loading/unloading and reloading of exchanges

This commit is contained in:
Adrian Gallagher
2018-01-16 12:05:30 +11:00
parent 34eeed287a
commit 4d4c85f458
10 changed files with 467 additions and 183 deletions

View File

@@ -64,6 +64,7 @@ type IBotExchange interface {
SetDefaults()
GetName() string
IsEnabled() bool
SetEnabled(bool)
GetTickerPrice(currency pair.CurrencyPair, assetType string) (ticker.Price, error)
UpdateTicker(currency pair.CurrencyPair, assetType string) (ticker.Price, error)
GetOrderbookEx(currency pair.CurrencyPair, assetType string) (orderbook.Base, error)

View File

@@ -96,7 +96,7 @@ func (o *OKCoin) SetDefaults() {
o.FuturesValues = []string{"this_week", "next_week", "quarter"}
o.AssetTypes = []string{ticker.Spot}
if !okcoinDefaultsSet {
if okcoinDefaultsSet {
o.AssetTypes = append(o.AssetTypes, o.FuturesValues...)
o.APIUrl = OKCOIN_API_URL
o.Name = "OKCOIN International"