Skip to content

Commit

Permalink
OkexV5 Order does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Jan 21, 2022
1 parent b05602e commit fa0a6fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Map/ResponseTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ResponseTraderMap extends Base implements TraderInterface
'4'=>'CANCELING',
],
'v5'=>[
//'-2'=>'FAILURE',
'failure'=>'FAILURE',
'canceled'=>'CANCELLED',
'live'=>'NEW',
'partially_filled'=>'PART_FILLED',
Expand Down Expand Up @@ -457,7 +457,10 @@ function show(array $data){
$map['_order_id']=$data['result']['data'][0]['ordId'] ?? '';
$map['_client_id']=$data['result']['data'][0]['clOrdId'] ?? $data['request']['_client_id'];
$map['_symbol']=$data['result']['data'][0]['instId'] ?? $data['request']['_symbol'];
if(!isset($data['result']['data'][0])) break;
if(!isset($data['result']['data'][0])) {
$map['_status']=$this->okex_status['v5']['failure'];
break;
}

$map['_filed_amount']=bcmul(strval($data['result']['data'][0]['accFillSz']),strval($data['result']['data'][0]['avgPx']),16);
$map['_filled_qty']=$data['result']['data'][0]['accFillSz'];
Expand Down

0 comments on commit fa0a6fd

Please sign in to comment.