Skip to content

Commit

Permalink
Update get methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
eskrano committed Feb 8, 2020
1 parent d596054 commit 684e891
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@

//$pos = $bitmex->orderBook()->get(['symbol' => 'XBTUSD', 'depth' => 1]);

$pos = $bitmex->user()->getWallet(['currency' => 'XBt']);
$pos = $bitmex->order()->get([
'symbol' => 'XBTUSD',
'count' => 100,
'reverse' => true,
'filter' => json_encode([
'ordType' => 'StopLimit',
'ordStatus' => 'Filled',
]),
]);
var_dump($pos);
5 changes: 3 additions & 2 deletions src/Api/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ public function get(array $data=[]){
$data['reverse']=$data['reverse'] ?? 'true';
$data['symbol']=$data['symbol'] ?? 'XBTUSD';
$data['count']=$data['count'] ?? '100';
$data['filter'] = isset($data['filter']) ? $data['filter'] : null;

$this->path='/api/v1/order?reverse='.$data['reverse'].'&symbol='.$data['symbol'].'&count='.$data['count'];
$this->path='/api/v1/order?'.http_build_query($data);


var_dump($this->path);


//$this->data=$data;
Expand Down

0 comments on commit 684e891

Please sign in to comment.