Skip to content

Commit

Permalink
add spot history candles
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Jan 5, 2021
1 parent 05dfa12 commit 1361af2
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions src/Api/Spot/Instruments.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ public function get(array $data=[]){
$this->type='GET';
$this->path='/api/spot/v3/instruments';
$this->data=$data;

return $this->exec();
}

/**
* GET/api/spot/v3/instruments/<instrument_id>/book
* */
public function getBook(array $data=[]){
$this->type='GET';
$this->path='/api/spot/v3/instruments/'.$data['instrument_id'].'/book';
unset($data['instrument_id']);

$this->data=$data;

return $this->exec();
}

/**
* GET /api/spot/v3/instruments/ticker
* */
Expand All @@ -42,7 +42,7 @@ public function getTickerAll(array $data=[]){
$this->data=$data;
return $this->exec();
}

/**
* GET /api/spot/v3/instruments/<instrument-id>/ticker
* */
Expand All @@ -52,7 +52,7 @@ public function getTicker(array $data=[]){
$this->data=$data;
return $this->exec();
}

/**
*GET /api/spot/v3/instruments/<instrument_id>/trades
* */
Expand All @@ -62,7 +62,7 @@ public function getTrades(array $data=[]){
$this->data=$data;
return $this->exec();
}

/**
*GET /api/spot/v3/instruments/<instrument_id>/candles
* */
Expand All @@ -72,4 +72,14 @@ public function getCandles(array $data=[]){
$this->data=$data;
return $this->exec();
}
}

/**
*GET/api/spot/v3/instruments/<instrument_id>/history/candles
* */
public function getHistoryCandles(array $data=[]){
$this->type='GET';
$this->path='/api/spot/v3/instruments/'.$data['instrument_id'].'/history/candles';
$this->data=$data;
return $this->exec();
}
}

0 comments on commit 1361af2

Please sign in to comment.