Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetAllOrders or GetAllOpenOrders doesn't works #10

Open
valderind4 opened this issue Apr 14, 2021 · 2 comments
Open

GetAllOrders or GetAllOpenOrders doesn't works #10

valderind4 opened this issue Apr 14, 2021 · 2 comments

Comments

@valderind4
Copy link

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.

@zhouaini528
Copy link
Owner

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());
}

@valderind4
Copy link
Author

valderind4 commented Apr 14, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants