Remove unwanted wrapper name stuttering and standardise common error returns (#213)

This commit is contained in:
Ryan O'Hara-Reid
2018-11-23 12:55:00 +11:00
committed by Adrian Gallagher
parent c41f611d96
commit 92534249bf
154 changed files with 1362 additions and 1367 deletions

View File

@@ -478,9 +478,8 @@ func (b *Binance) NewOrder(o NewOrderRequest) (NewOrderResponse, error) {
return resp, nil
}
// CancelOrder sends a cancel order to Binance
func (b *Binance) CancelOrder(symbol string, orderID int64, origClientOrderID string) (CancelOrderResponse, error) {
// CancelExistingOrder sends a cancel order to Binance
func (b *Binance) CancelExistingOrder(symbol string, orderID int64, origClientOrderID string) (CancelOrderResponse, error) {
var resp CancelOrderResponse
path := fmt.Sprintf("%s%s", b.APIUrl, cancelOrder)
@@ -496,10 +495,7 @@ func (b *Binance) CancelOrder(symbol string, orderID int64, origClientOrderID st
params.Set("origClientOrderId", origClientOrderID)
}
if err := b.SendAuthHTTPRequest("DELETE", path, params, &resp); err != nil {
return resp, err
}
return resp, nil
return resp, b.SendAuthHTTPRequest("DELETE", path, params, &resp)
}
// OpenOrders Current open orders