| Total Complexity | 7 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class PublicApi extends Api |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @return array |
||
| 17 | * @throws Exception |
||
| 18 | */ |
||
| 19 | 1 | public function getMarkets(): array |
|
| 20 | { |
||
| 21 | 1 | return $this->get('/public/getmarkets'); |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array |
||
| 26 | * @throws Exception |
||
| 27 | */ |
||
| 28 | 1 | public function getCurrencies(): array |
|
| 29 | { |
||
| 30 | 1 | return $this->get('/public/getcurrencies'); |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $market |
||
| 35 | * @return array |
||
| 36 | * @throws Exception |
||
| 37 | */ |
||
| 38 | 1 | public function getTicker(string $market): array |
|
| 39 | { |
||
| 40 | 1 | $parameters = ['market' => $market]; |
|
| 41 | |||
| 42 | 1 | return $this->get('/public/getticker', $parameters); |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return array |
||
| 47 | * @throws Exception |
||
| 48 | */ |
||
| 49 | 1 | public function getMarketSummaries(): array |
|
| 50 | { |
||
| 51 | 1 | return $this->get('/public/getmarketsummaries'); |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $market |
||
| 56 | * @return array |
||
| 57 | * @throws Exception |
||
| 58 | */ |
||
| 59 | 1 | public function getMarketSummary(string $market): array |
|
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param string $market |
||
| 68 | * @param string $type |
||
| 69 | * @return array |
||
| 70 | * @throws Exception |
||
| 71 | */ |
||
| 72 | 1 | public function getOrderBook(string $market, $type = 'both'): array |
|
| 73 | { |
||
| 74 | 1 | $parameters = ['market' => $market, 'type' => $type]; |
|
| 75 | |||
| 76 | 1 | return $this->get('/public/getorderbook', $parameters); |
|
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @param string $market |
||
| 81 | * @return array |
||
| 82 | * @throws Exception |
||
| 83 | */ |
||
| 84 | 1 | public function getMarketHistory(string $market) |
|
| 89 | } |
||
| 90 | } |
||
| 91 |