Skip to content

Commit

Permalink
huobi order-id empty
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed May 20, 2021
1 parent deb0d2a commit 052ff78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Map/ResponseTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@ function show(array $data){
$map['_filed_amount']=$data['result']['data']['field-cash-amount'];

$map['_price_avg']=$data['result']['data']['field-amount'] == 0 ? 0 : bcdiv(strval($data['result']['data']['field-cash-amount']),strval($data['result']['data']['field-amount']),16);

$map['_status']=$this->huobi_status['spot'][$data['result']['data']['state']];
$map['_client_id']=$data['request']['_client_id'] ?? ($data['request']['clientOrderId'] ?? '');

if(isset($data['result'])) $map['_client_id']=$data['result']['data']['client-order-id'] ?? '';
if(isset($data['request']) && empty($map['_client_id'])) $map['_client_id']=$data['request']['_client_id'] ?? ($data['request']['clientOrderId'] ?? '');

break;
}
case 'future':{
Expand Down

0 comments on commit 052ff78

Please sign in to comment.