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:
Ryan O'Hara-Reid
2017-09-12 08:37:18 +10:00
parent 939ce3ab21
commit e8c7bf9af4
24 changed files with 601 additions and 241 deletions

View File

@@ -68,7 +68,7 @@ func (h *HUOBI) GetFee() float64 {
func (h *HUOBI) GetTicker(symbol string) (HuobiTicker, error) {
resp := HuobiTickerResponse{}
path := fmt.Sprintf("https://api.huobi.com/staticmarket/ticker_%s_json.js", symbol)
err := common.SendHTTPGetRequest(path, true, &resp)
err := common.SendHTTPGetRequest(path, true, h.Verbose, &resp)
if err != nil {
return HuobiTicker{}, err
@@ -79,7 +79,7 @@ func (h *HUOBI) GetTicker(symbol string) (HuobiTicker, error) {
func (h *HUOBI) GetOrderBook(symbol string) (HuobiOrderbook, error) {
path := fmt.Sprintf("https://api.huobi.com/staticmarket/depth_%s_json.js", symbol)
resp := HuobiOrderbook{}
err := common.SendHTTPGetRequest(path, true, &resp)
err := common.SendHTTPGetRequest(path, true, h.Verbose, &resp)
if err != nil {
return resp, err
}