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 cdf581c commit f1698ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/Map/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ protected function checkType(string $symbol=''){
if(empty($this->platform)) {
if(stristr($this->host,"fapi")!==false) return 'future';
if(stristr($this->host,"dapi")!==false) return 'swap';
}else{
switch ($this->platform){
case 'spot':return 'spot';
case 'margin':return 'margin';
case 'future':return 'future';
case 'swap':return 'swap';
}
}
return $this->platform;
}
case 'kucoin':{
if(stripos($this->host,'kumex')!==false){
Expand Down
10 changes: 9 additions & 1 deletion src/Map/RequestTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ function buy(array $data){
$map['price']=$data['_price'] ?? ($data['price'] ?? '');
$map['type']='LIMIT';
}else{
$map['quoteOrderQty']=$data['_number'] ?? ($data['quoteOrderQty'] ?? '');
switch ($this->checkType()){
case 'spot':{
$map['quoteOrderQty']=$data['_number'] ?? ($data['quoteOrderQty'] ?? '');
break;
}
default:{
$map['quantity']=$data['_number'] ?? ($data['quantity'] ?? '');
}
}
$map['type']='MARKET';
}

Expand Down

0 comments on commit f1698ae

Please sign in to comment.