Markets   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 27
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 3 1
A getTimeseries() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Codenixsv\MessariApi\Api;
6
7
use Exception;
8
9
/**
10
 * Class Markets
11
 * @package Codenixsv\MessariApi\Api
12
 */
13
class Markets extends Api
14
{
15
    /**
16
     * Get the list of all exchanges and pairs that WebSocket-based market real-time market data API supports.
17
     *
18
     * @param array $params
19
     * @return array
20
     * @throws Exception
21
     */
22 2
    public function getAll($params = []): array
23
    {
24 2
        return $this->all('markets', $params);
25
    }
26
27
    /**
28
     * Retrieve historical timeseries data for a market.
29
     *
30
     * @param string $assetKey This "key" can be the asset's ID (unique), slug (unique), or symbol (non-unique)
31
     * @param string $metricId The metricID is a unique identifier which describes the type of data returned by
32
     *  time-series endpoints.
33
     * @param array $params
34
     * @return array
35
     * @throws Exception
36
     */
37 2
    public function getTimeseries(string $assetKey, string $metricId, array $params = []): array
38
    {
39 2
        return $this->timeseries('markets', $assetKey, $metricId, $params);
40
    }
41
}
42