InstrumentInfo   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 2
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getEndpointRequestMethod() 0 3 1
A getEndpointUrl() 0 3 1
A getResponseClassnameByCondition() 0 3 1
A getRequestClassname() 0 3 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Derivatives\MarketData\InstrumentInfo;
4
5
use Carpenstar\ByBitAPI\Core\Endpoints\PublicEndpoint;
6
use Carpenstar\ByBitAPI\Core\Enums\EnumHttpMethods;
7
use Carpenstar\ByBitAPI\Derivatives\MarketData\InstrumentInfo\Request\InstrumentInfoRequest;
8
use Carpenstar\ByBitAPI\Derivatives\MarketData\InstrumentInfo\Response\InstrumentInfoResponse;
9
10
/**
11
 * Get launched instruments information.
12
 * https://bybit-exchange.github.io/docs/derivatives/public/instrument-info
13
 */
14
class InstrumentInfo extends PublicEndpoint
15
{
16
    public function getEndpointRequestMethod(): string
17
    {
18
        return EnumHttpMethods::GET;
19
    }
20
21
    protected function getEndpointUrl(): string
22
    {
23
        return "/derivatives/v3/public/instruments-info";
24
    }
25
26
    public function getRequestClassname(): string
27
    {
28
        return InstrumentInfoRequest::class;
29
    }
30
31
    protected function getResponseClassnameByCondition(array &$apiData = null): string
32
    {
33
        return InstrumentInfoResponse::class;
34
    }
35
}
36