From 92e317728acd1c6e0ca5b3e7b0131d5c815eb357 Mon Sep 17 00:00:00 2001 From: Sohaib Ilyas Date: Thu, 9 Sep 2021 03:18:58 +0500 Subject: [PATCH] ocoOrder error: stopPrice param is empty/null/malformed fix ocoOrder() with stopprice param was throwing an error that stopPrice param is empty or malformed so after changing it to "stopPrice" now it works. --- php-binance-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-binance-api.php b/php-binance-api.php index f85077c0..a18b3697 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -2987,7 +2987,7 @@ public function ocoOrder(string $side, string $symbol, $quantity, $price, $stopp $error = "Parameter stopprice expected numeric for ' $side . ' ' . $symbol .', got " . gettype($stopprice); trigger_error($error, E_USER_ERROR); } else { - $opt['stopprice'] = $stopprice; + $opt['stopPrice'] = $stopprice; } if (is_null($stoplimitprice) === false && empty($stoplimitprice) === false) {