jaggedsoft / php-binance-api

PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how new I can send a stop_loss_limit order.

Birleyici opened this issue · comments

`$type = "STOP_LOSS_LIMIT"; // Set the type STOP_LOSS (market) or STOP_LOSS_LIMIT, and TAKE_PROFIT (market) or TAKE_PROFIT_LIMIT
$quantity = $bakiye;
$price = 20; // Try to sell it for 0.5 btc
$stopPrice = 15; // Sell immediately if price goes below 0.4 btc
$order = $api->sell("HNTUSDT", $quantity, $price, $type, ["stopPrice"=>$stopPrice]);

`

error:

Fatal error: Uncaught Exception: signedRequest error: {"code":-1013,"msg":"Filter failure: LOT_SIZE"} in /opt/lampp/htdocs/kripto2/php-binance-api.php:1217 Stack trace: #0 /opt/lampp/htdocs/kripto2/php-binance-api.php(1293): Binance\API->httpRequest('v3/order', 'POST', Array, true) #1 /opt/lampp/htdocs/kripto2/php-binance-api.php(294): Binance\API->order('SELL', 'HNTUSDT', '2.26332100', '20.00000000', 'STOP_LOSS_LIMIT', Array) #2 /opt/lampp/htdocs/kripto2/islem/trade.php(17): Binance\API->sell('HNTUSDT', '2.26332100', 20, 'STOP_LOSS_LIMIT', Array) #3 {main} thrown in /opt/lampp/htdocs/kripto2/php-binance-api.php on line 1217

Hi, please check our Wiki for more info on the LOT_SIZE issue: https://github.com/jaggedsoft/php-binance-api/wiki/FAQ#how-can-i-fix-my-lot_size-error