mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-21 23:16:49 +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:
@@ -108,18 +108,26 @@ func (o *OKCoin) SetDefaults() {
|
||||
|
||||
if okcoinDefaultsSet {
|
||||
o.AssetTypes = append(o.AssetTypes, o.FuturesValues...)
|
||||
o.APIUrl = okcoinAPIURL
|
||||
o.APIUrlDefault = okcoinAPIURL
|
||||
o.APIUrl = o.APIUrlDefault
|
||||
o.Name = "OKCOIN International"
|
||||
o.WebsocketURL = okcoinWebsocketURL
|
||||
o.setCurrencyPairFormats()
|
||||
o.Requester = request.New(o.Name, request.NewRateLimit(time.Second, okcoinAuthRate), request.NewRateLimit(time.Second, okcoinUnauthRate), common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
o.Requester = request.New(o.Name,
|
||||
request.NewRateLimit(time.Second, okcoinAuthRate),
|
||||
request.NewRateLimit(time.Second, okcoinUnauthRate),
|
||||
common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
} else {
|
||||
o.APIUrl = okcoinAPIURLChina
|
||||
o.APIUrlDefault = okcoinAPIURLChina
|
||||
o.APIUrl = o.APIUrlDefault
|
||||
o.Name = "OKCOIN China"
|
||||
o.WebsocketURL = okcoinWebsocketURLChina
|
||||
okcoinDefaultsSet = true
|
||||
o.setCurrencyPairFormats()
|
||||
o.Requester = request.New(o.Name, request.NewRateLimit(time.Second, okcoinAuthRate), request.NewRateLimit(time.Second, okcoinUnauthRate), common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
o.Requester = request.New(o.Name,
|
||||
request.NewRateLimit(time.Second, okcoinAuthRate),
|
||||
request.NewRateLimit(time.Second, okcoinUnauthRate),
|
||||
common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +159,10 @@ func (o *OKCoin) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = o.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user