Issues (51)

example/05_Ticker.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * @author  Fabian Hanisch
4
 * @since   16.07.2017 02:55
5
 * @version 1.0
6
 */
7
8
require_once(__DIR__ . '/../vendor/autoload.php');
9
10
try {
11
    $api = new \HanischIt\KrakenApi\KrakenApi(
12
        "Your-API-Key",
13
        "Your-API-Sign"
14
    );
15
16
    $tickerResponse = $api->getTicker(["XETHZEUR"]);
17
18
    echo "Todays-Opening-Price: " . $tickerResponse->getTodaysOpeningPrice("XETHZEUR");
0 ignored issues
show
The method getTodaysOpeningPrice() does not exist on HanischIt\KrakenApi\Model\ResponseInterface. It seems like you code against a sub-type of HanischIt\KrakenApi\Model\ResponseInterface such as HanischIt\KrakenApi\Call\GetTicker\TickerResponse. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
    echo "Todays-Opening-Price: " . $tickerResponse->/** @scrutinizer ignore-call */ getTodaysOpeningPrice("XETHZEUR");
Loading history...
19
} catch (Exception $e) {
20
    echo $e->getMessage();
21
}
22