mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 23:16:52 +00:00
localbitcoins fixes (#177)
* General LocalBitcoin fixes * Added override variables to config for exchange packages to allow different API URL's
This commit is contained in:
@@ -109,7 +109,12 @@ func (g *Gemini) SetDefaults() {
|
||||
g.AssetTypes = []string{ticker.Spot}
|
||||
g.SupportsAutoPairUpdating = true
|
||||
g.SupportsRESTTickerBatching = false
|
||||
g.Requester = request.New(g.Name, request.NewRateLimit(time.Minute, geminiAuthRate), request.NewRateLimit(time.Minute, geminiUnauthRate), common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
g.Requester = request.New(g.Name,
|
||||
request.NewRateLimit(time.Minute, geminiAuthRate),
|
||||
request.NewRateLimit(time.Minute, geminiUnauthRate),
|
||||
common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
g.APIUrlDefault = geminiAPIURL
|
||||
g.APIUrl = g.APIUrlDefault
|
||||
}
|
||||
|
||||
// Setup sets exchange configuration parameters
|
||||
@@ -128,11 +133,7 @@ func (g *Gemini) Setup(exch config.ExchangeConfig) {
|
||||
g.BaseCurrencies = common.SplitStrings(exch.BaseCurrencies, ",")
|
||||
g.AvailablePairs = common.SplitStrings(exch.AvailablePairs, ",")
|
||||
g.EnabledPairs = common.SplitStrings(exch.EnabledPairs, ",")
|
||||
if exch.UseSandbox {
|
||||
g.APIUrl = geminiSandboxAPIURL
|
||||
} else {
|
||||
g.APIUrl = geminiAPIURL
|
||||
}
|
||||
|
||||
err := g.SetCurrencyPairFormat()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -145,6 +146,13 @@ func (g *Gemini) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = g.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if exch.UseSandbox {
|
||||
g.APIUrl = geminiSandboxAPIURL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user