Skip to content

Commit

Permalink
Merge pull request #6 from h0z3yn/master
Browse files Browse the repository at this point in the history
Add Take Profit and Stop Loss methods to Perpetual Position Class
  • Loading branch information
zhouaini528 authored Oct 17, 2024
2 parents d2f711e + 5dc816b commit 39b1c49
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Api/Perpetual/Position.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,24 @@ public function postAdjustMargin(array $data=[]){
$this->data=$data;
return $this->exec();
}

/**
*POST https://api.coinex.com/perpetual/v1/position/take_profit
* */
public function postTakeProfit(array $data=[]){
$this->type='POST';
$this->path='/position/take_profit';
$this->data=$data;
return $this->exec();
}

/**
*POST https://api.coinex.com/perpetual/v1/position/stop_loss
* */
public function postStopLoss(array $data=[]){
$this->type='POST';
$this->path='/position/stop_loss';
$this->data=$data;
return $this->exec();
}
}

0 comments on commit 39b1c49

Please sign in to comment.