Skip to content

Commit

Permalink
bitmex bargaining transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed May 21, 2019
1 parent ae0e6c0 commit c6de5df
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ $exchanges->account()->get();
//bitmex
//bargaining transaction
$exchanges->account()->get([
'_symbol'=>'XBTUSD'
//Default return all
//'_symbol'=>'XBTUSD'
]);

//okex spot
Expand Down
3 changes: 2 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ $exchanges->account()->get();
//bitmex
//bargaining transaction
$exchanges->account()->get([
'_symbol'=>'XBTUSD'
//不填写默认返回所有仓位
//'_symbol'=>'XBTUSD'
]);

//okex spot
Expand Down
5 changes: 4 additions & 1 deletion src/Map/RequestAccountMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ function get(array $data){
break;
}
case 'bitmex':{
$map['symbol']=$data['_symbol'] ?? $data['symbol'];
$symbol=$data['_symbol'] ?? ($data['symbol'] ?? '');

if(!empty($symbol)) $map['filter']=json_encode(['symbol'=>$symbol]);

break;
}
case 'okex':{
Expand Down
3 changes: 2 additions & 1 deletion tests/bitmex.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
]);

//bargaining transaction
//Default return all
$result=$exchanges->account()->get([
'_symbol'=>'XBTUSD'
//'_symbol'=>'XBTUSD'
]);
break;
}
Expand Down

0 comments on commit c6de5df

Please sign in to comment.