Skip to content

Commit

Permalink
Update Base.php
Browse files Browse the repository at this point in the history
update binance spot
  • Loading branch information
zhouaini528 authored Nov 23, 2024
1 parent c7a0bd3 commit 4dc1b73
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/Map/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,20 @@ protected function checkType(string $symbol=''){
}
case 'binance':{
// 现货与期货区分可以用 positionSide 账户必须开启持仓双向模式
if(!empty($symbol)){
return 'future';
if(empty($this->platform)) {
return 'spot';
}

if(empty($this->platform)) {
return $this->platform;
if(!empty($symbol)){
$temp=explode('_',$symbol);

//通过币安币对分隔符来区分币本位 还是U本位
if(count($temp)>1){
//币本位
return 'delivery';
}
//uU本位
return 'future';
}

/*if(empty($this->platform)) {
Expand Down Expand Up @@ -127,5 +135,3 @@ public function checkOrderType(string $type=''){
}
}
}


0 comments on commit 4dc1b73

Please sign in to comment.