From 8a8ff8661d597b3e47cdd0d5b7354c19f1572192 Mon Sep 17 00:00:00 2001 From: Akshay Raje Date: Thu, 5 Jul 2018 13:45:51 +0530 Subject: [PATCH] Added getSymbol, getSymbols and upgraded to api v2 --- src/Hitbtc/PublicClient.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Hitbtc/PublicClient.php b/src/Hitbtc/PublicClient.php index 3d5a7bb..dfe63ad 100644 --- a/src/Hitbtc/PublicClient.php +++ b/src/Hitbtc/PublicClient.php @@ -34,17 +34,27 @@ public function getHttpClient() public function getTicker($ticker) { - return json_decode($this->getHttpClient()->get('/api/1/public/'.$ticker.'/ticker')->getBody(), true); + return json_decode($this->getHttpClient()->get('/api/2/public/ticker/'.$ticker)->getBody(), true); } public function getTickers() { - return json_decode($this->getHttpClient()->get('/api/1/public/ticker')->getBody(), true); + return json_decode($this->getHttpClient()->get('/api/2/public/ticker')->getBody(), true); } + public function getSymbol($ticker) + { + return json_decode($this->getHttpClient()->get('/api/2/public/symbol/'.$ticker)->getBody(), true); + } + + public function getSymbols() + { + return json_decode($this->getHttpClient()->get('/api/2/public/symbol')->getBody(), true); + } + public function getOderBook($ticker) { - return json_decode($this->getHttpClient()->get('/api/1/public/'.$ticker.'/orderbook')->getBody(), true); + return json_decode($this->getHttpClient()->get('/api/2/public/orderbook/'.$ticker)->getBody(), true); } }