From ca344bad51f5331ad1d043ff5e45760fb979f321 Mon Sep 17 00:00:00 2001 From: Vadim Zhuk Date: Wed, 17 Apr 2019 02:25:06 +0300 Subject: [PATCH] ZB: Fix SendAuthenticatedHTTPRequest error code handling (#278) * fix balance responce * Fixed OrderHistory unmarshalling on the GateIo * fix int convertation in the GetOrderHistory function * fix issue on order submit : Binance exchange raw response: {"code":-1102,"msg":"Mandatory parameter 'timeInForce' was not sent, was empty/null, or malformed."} * Okgroup: fix issue on empty notional GetSpotOrderResponse * Okgroup: fix issue with empty order status. order start is required for orderHistory request * HUOBU: fix order currency mapping in GetActiveOrders method * OKGroup: fix currency name on GetAccountInfo * ZB: fixed wrong error code on order send method --- exchanges/zb/zb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exchanges/zb/zb.go b/exchanges/zb/zb.go index dbbb9229..8d451c14 100644 --- a/exchanges/zb/zb.go +++ b/exchanges/zb/zb.go @@ -404,7 +404,7 @@ func (z *ZB) SendAuthenticatedHTTPRequest(httpMethod string, params url.Values, err = common.JSONDecode(intermediary, &errCap) if err == nil { - if errCap.Code != 0 { + if errCap.Code > 1000 { return fmt.Errorf("sendAuthenticatedHTTPRequest error code: %d message %s", errCap.Code, errorCode[errCap.Code])