Open valderind4 opened 3 years ago
Hi,I didn't find the document GetAllOpenOrders API. Spot didn't find. Future DELETE /fapi/v1/allOpenOrders
You try this
Spot
use Lin\Binance\Binance;
$binance=new Binance($key,$secret);
try {
$result=$binance->user()->getAllOrders([
'symbol'=>'BCHABCUSDT',
'limit'=>'20',
//'orderId'=>'',
//'startTime'=>'',
//'endTime'=>'',
]);
print_r($result);
}catch (\Exception $e){
print_r(json_decode($e->getMessage(),true));
}
Future
use Lin\Binance\BinanceFuture;
$binance=new BinanceFuture($key,$secret);
try {
$result=$binance->user()->getAllOrders([
'symbol'=>'BTCUSDT',
]);
print_r($result);
}catch (\Exception $e){
print_r($e->getMessage());
}
Sorry,
I was taking about this code:
//Query Open OCO (USER_DATA)
try {
$result=$binance->user()->getOpenOrderList();
print_r($result);
}catch (\Exception $e){
print_r(json_decode($e->getMessage(),true));
}
But now, I think It is only for OCO orders, correct?
Aditionally, Is there any way to get all my balance, in USD, for example, without have to get all the currencies quantity (using $binance->user()->getAccount()) and after have to get the current price for all the cryptocurrencies that I have, and finally calculate the total amount of them?
Hello,
I am trying to use this api and when I try to call GetAllOrders or GetAllOpenOrders It always returns an Empty value even having some orders open.