Markets::getAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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