Skip to content

Commit 0a225ba

Browse files
author
Jon Eyrick
authored
Add extra parameters to cancel function
1 parent 8041ddb commit 0a225ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

php-binance-api.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,17 @@ public function marketSellTest(string $symbol, $quantity, array $flags = [])
363363
*
364364
* @param $symbol string the currency symbol
365365
* @param $orderid string the orderid to cancel
366+
* @param $flags array of optional options like ["side"=>"sell"]
366367
* @return array with error message or the order details
367368
* @throws \Exception
368369
*/
369-
public function cancel(string $symbol, $orderid)
370+
public function cancel(string $symbol, $orderid, $flags = [])
370371
{
371-
return $this->httpRequest("v3/order", "DELETE", [
372+
$params = [
372373
"symbol" => $symbol,
373374
"orderId" => $orderid,
374-
], true);
375+
];
376+
return $this->httpRequest("v3/order", "DELETE", array_merge($params, $flags), true);
375377
}
376378

377379
/**

0 commit comments

Comments
 (0)