Skip to content

Commit

Permalink
Compatible unified parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Dec 2, 2021
1 parent 071ac12 commit f052558
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Map/RequestTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ function buy(array $data){
$map['ordType']=$data['ordType'] ?? 'Market';
}

if(isset($data['_entry'])){
$map['side'] = $data['_entry'] ? 'Buy':'Sell' ;
}

//支持原生参数
$data['side']=$map['side'];
break;
Expand Down Expand Up @@ -345,6 +349,10 @@ function sell(array $data){
$map['ordType']=$data['ordType'] ?? 'Market';
}

if(isset($data['_entry'])){
$map['side'] = $data['_entry'] ? 'Sell':'Buy' ;
}

//支持原生参数
$data['side']=$map['side'];

Expand Down

0 comments on commit f052558

Please sign in to comment.