Skip to content

Commit

Permalink
add api
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Mar 28, 2019
1 parent feb7735 commit 8d6a51c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
20 changes: 16 additions & 4 deletions src/Api/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,30 @@ public function deleteAll(array $data){
}

public function putBulk(array $data){

$this->type='PUT';
$this->path='';
$this->data=$data;
return $this->exec();
}

public function postBulk(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}

public function postCancelAllAfter(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}

public function postClosePosition(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}
}
15 changes: 12 additions & 3 deletions src/Api/Position.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ public function get(array $data){
}

public function postIsolate(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}

/**
Expand All @@ -37,10 +40,16 @@ public function postLeverage(array $data)
}

public function postRiskLimit(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}

public function postTransferMargin(array $data){

$this->type='POST';
$this->path='';
$this->data=$data;
return $this->exec();
}
}

0 comments on commit 8d6a51c

Please sign in to comment.