From e6f47e6a4bc97a240ba10de551a6197187b4578c Mon Sep 17 00:00:00 2001 From: bahadorbzd <34672817+bahadorbzd@users.noreply.github.com> Date: Wed, 7 Dec 2022 23:14:38 +0330 Subject: [PATCH] fix issue of lot size index --- php-binance-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php-binance-api.php b/php-binance-api.php index 2b2d330..724d682 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -410,7 +410,7 @@ public function numberOfDecimals($val = 0.00000001) public function marketQuoteSell(string $symbol, $quantity, array $flags = []) { $flags['isQuoteOrder'] = true; - $c = $this->numberOfDecimals($this->exchangeInfo()['symbols'][$symbol]['filters'][2]['minQty']); + $c = $this->numberOfDecimals($this->exchangeInfo()['symbols'][$symbol]['filters'][1]['minQty']); $quantity = $this->floorDecimal($quantity, $c); return $this->order("SELL", $symbol, $quantity, 0, "MARKET", $flags); @@ -446,7 +446,7 @@ public function marketQuoteSellTest(string $symbol, $quantity, array $flags = [] */ public function marketSell(string $symbol, $quantity, array $flags = []) { - $c = $this->numberOfDecimals($this->exchangeInfo()['symbols'][$symbol]['filters'][2]['minQty']); + $c = $this->numberOfDecimals($this->exchangeInfo()['symbols'][$symbol]['filters'][1]['minQty']); $quantity = $this->floorDecimal($quantity, $c); return $this->order("SELL", $symbol, $quantity, 0, "MARKET", $flags);