mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-21 15:10:12 +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:
@@ -62,7 +62,12 @@ func (c *COINUT) SetDefaults() {
|
||||
c.AssetTypes = []string{ticker.Spot}
|
||||
c.SupportsAutoPairUpdating = true
|
||||
c.SupportsRESTTickerBatching = false
|
||||
c.Requester = request.New(c.Name, request.NewRateLimit(time.Second, coinutAuthRate), request.NewRateLimit(time.Second, coinutUnauthRate), common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
c.Requester = request.New(c.Name,
|
||||
request.NewRateLimit(time.Second, coinutAuthRate),
|
||||
request.NewRateLimit(time.Second, coinutUnauthRate),
|
||||
common.NewHTTPClientWithTimeout(exchange.DefaultHTTPTimeout))
|
||||
c.APIUrlDefault = coinutAPIURL
|
||||
c.APIUrl = c.APIUrlDefault
|
||||
}
|
||||
|
||||
// Setup sets the current exchange configuration
|
||||
@@ -93,6 +98,10 @@ func (c *COINUT) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = c.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,5 +316,5 @@ func (c *COINUT) SendHTTPRequest(apiRequest string, params map[string]interface{
|
||||
}
|
||||
headers["Content-Type"] = "application/json"
|
||||
|
||||
return c.SendPayload("POST", coinutAPIURL, headers, bytes.NewBuffer(payload), result, authenticated, c.Verbose)
|
||||
return c.SendPayload("POST", c.APIUrl, headers, bytes.NewBuffer(payload), result, authenticated, c.Verbose)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user