Skip to content

Commit c00c03e

Browse files
authored
feat: futuresCancelAlgo updated
1 parent 54a9c58 commit c00c03e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

php-binance-api.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ protected function httpRequest(string $url, string $method = "GET", array $param
17951795
$this->setXMbxUsedWeight1m($header['x-mbx-used-weight-1m']);
17961796
}
17971797
if (isset($json['msg']) && !empty($json['msg'])) {
1798-
if ($json['msg'] !== 'success' && $url != 'v1/system/status' && $url != 'v3/systemStatus.html' && $url != 'v3/accountStatus.html' && $url != 'v1/allOpenOrders') {
1798+
if ($json['msg'] !== 'success' && $url != 'v1/system/status' && $url != 'v3/systemStatus.html' && $url != 'v3/accountStatus.html' && $url != 'v1/allOpenOrders' && $url != 'v1/algoOpenOrders') {
17991799
// should always output error, not only on httpdebug
18001800
// not outputing errors, hides it from users and ends up with tickets on github
18011801
throw new \Exception('signedRequest error: '.print_r($output, true));
@@ -5192,10 +5192,10 @@ public function futuresCancel(string $symbol, $orderid, $params = [])
51925192
}
51935193

51945194
/**
5195-
* futuresAlgoCancel cancels a futures order
5195+
* futuresCancelAlgo cancels a futures order
51965196
*
51975197
* $algoid = "123456789";
5198-
* $order = $api->futuresCancel($algoid);
5198+
* $order = $api->futuresCancelAlgo($algoid);
51995199
*
52005200
* @param string $algoid (optional) the algoid to cancel (mandatory if $params['clientalgoid'] is not set)
52015201
* @param array $params (optional) additional options
@@ -5205,13 +5205,13 @@ public function futuresCancel(string $symbol, $orderid, $params = [])
52055205
* @return array with error message or the order details
52065206
* @throws \Exception
52075207
*/
5208-
public function futuresAlgoCancel($algoid, $params = [])
5208+
public function futuresCancelAlgo($algoId, $params = [])
52095209
{
52105210
$request = [];
5211-
if ($algoid) {
5212-
$request['algoId'] = $algoid;
5213-
} else if (!isset($params['clientalgoid'])) {
5214-
throw new \Exception('futuresAlgoCancel(): either algoid or clientalgoid must be set');
5211+
if ($algoId) {
5212+
$request['algoId'] = $algoId;
5213+
} else if (!isset($params['clientAlgoId'])) {
5214+
throw new \Exception('futuresCancelAlgo(): either algoId or clientAlgoId must be set');
52155215
}
52165216
// todo: check camel-case or lower-case!!!!
52175217
return $this->fapiRequest("v1/algoOrder", 'DELETE', array_merge($request, $params), true);

0 commit comments

Comments
 (0)