mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 15:10:54 +00:00
General fixes for CancelAllOrders exchange wrapper function (#313)
* General fixes for CancelAllOrders * Fix error shadowing issue * Initialise order status map and rm reduntant initialisations
This commit is contained in:
committed by
Adrian Gallagher
parent
416fbbd5ae
commit
a80acb16de
@@ -342,12 +342,12 @@ func (g *Gemini) CancelExistingOrder(orderID int64) (Order, error) {
|
||||
// the UI. If sessions = true will only cancel the order that is called on this
|
||||
// session asssociated with the APIKEY
|
||||
func (g *Gemini) CancelExistingOrders(cancelBySession bool) (OrderResult, error) {
|
||||
response := OrderResult{}
|
||||
path := geminiOrderCancelAll
|
||||
if cancelBySession {
|
||||
path = geminiOrderCancelSession
|
||||
}
|
||||
|
||||
var response OrderResult
|
||||
err := g.SendAuthenticatedHTTPRequest(http.MethodPost, path, nil, &response)
|
||||
if err != nil {
|
||||
return response, err
|
||||
|
||||
Reference in New Issue
Block a user