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 adc7573 commit 6efee3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Map/ResponseTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,16 +501,16 @@ function show(array $data){
$map['_status']=$this->binance_status[$data['result']['status']];

switch ($this->checkType()){
case 'future':{
$map['_price_avg']=$data['result']['avgPrice'] ?? 0;
$map['_filed_amount']=bcmul(strval($data['result']['executedQty']),strval($data['result']['avgPrice']),16);
break;
}
case 'spot':{
$map['_price_avg']=$data['result']['executedQty']==0 ? 0 : bcdiv(strval($data['result']['cummulativeQuoteQty']),strval($data['result']['executedQty']),16);
$map['_filed_amount']=$data['result']['cummulativeQuoteQty'];
break;
}
default:{
$map['_price_avg']=$data['result']['avgPrice'] ?? 0;
$map['_filed_amount']=bcmul(strval($data['result']['executedQty']),strval($data['result']['avgPrice']),16);
break;
}
}
break;
}
Expand Down

0 comments on commit 6efee3a

Please sign in to comment.