Skip to content

Commit

Permalink
CANCELLED status needs to be queried again
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Dec 16, 2021
1 parent 1b4af6b commit 49268de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Api/Trader.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function buy(array $data,bool $show=true){
//如果交易默认完成,则不用再查询
if(isset($trader['_status'])) {
if(in_array($trader['_status'],['FAILURE'])) return ['_error'=>$trader];
if(in_array($trader['_status'],['CANCELLED'])) return $trader;
//if(in_array($trader['_status'],['CANCELLED'])) return $trader;
}

if(!$show) return $trader;
Expand Down Expand Up @@ -114,7 +114,7 @@ function sell(array $data,bool $show=true){
//bitmex 存在可能
if(isset($trader['_status'])) {
if(in_array($trader['_status'],['FAILURE'])) return ['_error'=>$trader];
if(in_array($trader['_status'],['CANCELLED'])) return $trader;
//if(in_array($trader['_status'],['CANCELLED'])) return $trader;
}

if(!$show) return $trader;
Expand Down Expand Up @@ -174,7 +174,7 @@ function cancel(array $data,bool $show=true){
//如果交易默认完成,则不用再查询
if(isset($trader['_status'])) {
if(in_array($trader['_status'],['FAILURE'])) return ['_error'=>$trader];
if(in_array($trader['_status'],['CANCELLED'])) return $trader;
//if(in_array($trader['_status'],['CANCELLED'])) return $trader;
}

if(!$show) return $trader;
Expand Down

0 comments on commit 49268de

Please sign in to comment.