Skip to content

Commit

Permalink
binance add delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Dec 21, 2021
1 parent f1698ae commit adc7573
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Exchanges/Binance.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ function show(array $data){
switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
return $this->platform_future->trade()->getOrder($data);
return $this->platform_future->user()->getOrder($data);
}
case 'spot':{
$this->platform_spot=$this->getPlatform('spot');
return $this->platform_spot->user()->getOrder($data);
}
case 'delivery':{
$this->platform_delivery=$this->getPlatform('delivery');
return $this->platform_delivery->trade()->getOrder($data);
return $this->platform_delivery->user()->getOrder($data);
}
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/Map/RequestTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,14 @@ function buy(array $data){
}

switch ($this->checkType()){
case 'future':{
break;
}
case 'spot':{
$map['newOrderRespType']=$data['newOrderRespType'] ?? 'ACK';
break;
}
default:{
$map['positionSide']='LONG';
$map['side'] = $data['_entry'] ? 'BUY' : 'SELL';
}
}

//支持原生参数
Expand Down Expand Up @@ -479,13 +480,14 @@ function sell(array $data){
}

switch ($this->checkType()){
case 'future':{
break;
}
case 'spot':{
$map['newOrderRespType']=$data['newOrderRespType'] ?? 'ACK';
break;
}
default:{
$map['positionSide']='SHORT';
$map['side'] = $data['_entry'] ? 'BUY' : 'SELL';
}
}

//支持原生参数
Expand Down

0 comments on commit adc7573

Please sign in to comment.