Skip to content

Commit

Permalink
Get all openOrders (Thank you omar8792!!)
Browse files Browse the repository at this point in the history
Add possibility to get All OpenOrders without specify a symbol
  • Loading branch information
Jon Eyrick authored Mar 19, 2018
2 parents dd6062c + d4a6f6e commit 788ec48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public function orderStatus($symbol, $orderid) {
return $this->httpRequest("v3/order", "GET" ,["symbol"=>$symbol, "orderId"=>$orderid], true);
}
public function openOrders($symbol) {
return $this->httpRequest("v3/openOrders","GET", ["symbol"=>$symbol], true);
$params = [];
if($symbol)
$params = ["symbol"=>$symbol];
return $this->httpRequest("v3/openOrders","GET", $params, true);
}
public function orders($symbol, $limit = 500, $fromOrderId = 1) {
return $this->httpRequest("v3/allOrders", "GET", ["symbol"=>$symbol, "limit"=>$limit, "orderId"=>$fromOrderId], true);
Expand Down

0 comments on commit 788ec48

Please sign in to comment.