Issues (51)

example/10_TradableAssetPairs.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
require_once(__DIR__ . '/../vendor/autoload.php');
8
9
try {
10
    $api = new \HanischIt\KrakenApi\KrakenApi(
11
        "Your-API-Key",
12
        "Your-API-Sign"
13
    );
14
15
    $tradableAssetPairResponse = $api->getTradableAssetPairs(\HanischIt\KrakenApi\Enum\InfoEnum::INFO_INFO);
16
    foreach ($tradableAssetPairResponse->getTradableAssets() as $assetPair) {
0 ignored issues
show
The method getTradableAssets() 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...dableAssetPairsResponse. ( Ignorable by Annotation )

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

16
    foreach ($tradableAssetPairResponse->/** @scrutinizer ignore-call */ getTradableAssets() as $assetPair) {
Loading history...
17
        echo $assetPair->getAssetPair() . " " . $assetPair->getAltname() . "\n";
18
    }
19
} catch (Exception $e) {
20
    echo $e->getMessage();
21
}
22