mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
In the common package added JSONDecode error check. Added verbosity in SendHTTPGetRequest. Updated Nonce package function. Fixed issues in ItBit package and expanded test coverage.
This commit is contained in:
@@ -102,7 +102,7 @@ func (l *Liqui) GetAvailablePairs(nonHidden bool) []string {
|
||||
func (l *Liqui) GetInfo() (LiquiInfo, error) {
|
||||
req := fmt.Sprintf("%s/%s/%s/", LIQUI_API_PUBLIC_URL, LIQUI_API_PUBLIC_VERSION, LIQUI_INFO)
|
||||
resp := LiquiInfo{}
|
||||
err := common.SendHTTPGetRequest(req, true, &resp)
|
||||
err := common.SendHTTPGetRequest(req, true, l.Verbose, &resp)
|
||||
|
||||
if err != nil {
|
||||
return resp, err
|
||||
@@ -118,7 +118,7 @@ func (l *Liqui) GetTicker(symbol string) (map[string]LiquiTicker, error) {
|
||||
|
||||
response := Response{}
|
||||
req := fmt.Sprintf("%s/%s/%s/%s", LIQUI_API_PUBLIC_URL, LIQUI_API_PUBLIC_VERSION, LIQUI_TICKER, symbol)
|
||||
err := common.SendHTTPGetRequest(req, true, &response.Data)
|
||||
err := common.SendHTTPGetRequest(req, true, l.Verbose, &response.Data)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -134,7 +134,7 @@ func (l *Liqui) GetDepth(symbol string) (LiquiOrderbook, error) {
|
||||
response := Response{}
|
||||
req := fmt.Sprintf("%s/%s/%s/%s", LIQUI_API_PUBLIC_URL, LIQUI_API_PUBLIC_VERSION, LIQUI_DEPTH, symbol)
|
||||
|
||||
err := common.SendHTTPGetRequest(req, true, &response.Data)
|
||||
err := common.SendHTTPGetRequest(req, true, l.Verbose, &response.Data)
|
||||
if err != nil {
|
||||
return LiquiOrderbook{}, err
|
||||
}
|
||||
@@ -151,7 +151,7 @@ func (l *Liqui) GetTrades(symbol string) ([]LiquiTrades, error) {
|
||||
response := Response{}
|
||||
req := fmt.Sprintf("%s/%s/%s/%s", LIQUI_API_PUBLIC_URL, LIQUI_API_PUBLIC_VERSION, LIQUI_TRADES, symbol)
|
||||
|
||||
err := common.SendHTTPGetRequest(req, true, &response.Data)
|
||||
err := common.SendHTTPGetRequest(req, true, l.Verbose, &response.Data)
|
||||
if err != nil {
|
||||
return []LiquiTrades{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user