Issues (51)

example/13_TradeBalance.php (8 issues)

Labels
Severity
1
<?php
2
require_once(__DIR__ . '/../vendor/autoload.php');
3
4
try {
5
    $api = new \HanischIt\KrakenApi\KrakenApi(
6
        "Your-API-Key",
7
        "Your-API-Sign"
8
    );
9
10
    $tradeBalance = $api->getTradeBalance('currency', 'ZEUR');
11
12
13
    echo "Trade Balance: " . $tradeBalance->getTradeBalance() . "\n";
0 ignored issues
show
The method getTradeBalance() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

13
    echo "Trade Balance: " . $tradeBalance->/** @scrutinizer ignore-call */ getTradeBalance() . "\n";
Loading history...
14
    echo "Cost basis: " . $tradeBalance->getCostBasis() . "\n";
0 ignored issues
show
The method getCostBasis() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

14
    echo "Cost basis: " . $tradeBalance->/** @scrutinizer ignore-call */ getCostBasis() . "\n";
Loading history...
15
    echo "Current floating valuation: " . $tradeBalance->getCurrentFloatingValuation() . "\n";
0 ignored issues
show
The method getCurrentFloatingValuation() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

15
    echo "Current floating valuation: " . $tradeBalance->/** @scrutinizer ignore-call */ getCurrentFloatingValuation() . "\n";
Loading history...
16
    echo "Equity: " . $tradeBalance->getEquity() . "\n";
0 ignored issues
show
The method getEquity() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

16
    echo "Equity: " . $tradeBalance->/** @scrutinizer ignore-call */ getEquity() . "\n";
Loading history...
17
    echo "Equivalent balance: " . $tradeBalance->getEquivavlentBalance() . "\n";
0 ignored issues
show
The method getEquivavlentBalance() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

17
    echo "Equivalent balance: " . $tradeBalance->/** @scrutinizer ignore-call */ getEquivavlentBalance() . "\n";
Loading history...
18
    echo "Free margin: " . $tradeBalance->getFreeMargin() . "\n";
0 ignored issues
show
The method getFreeMargin() 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...ce\TradeBalanceResponse. ( 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 "Free margin: " . $tradeBalance->/** @scrutinizer ignore-call */ getFreeMargin() . "\n";
Loading history...
19
    echo "Margin amount: " . $tradeBalance->getMarginAmount() . "\n";
0 ignored issues
show
The method getMarginAmount() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

19
    echo "Margin amount: " . $tradeBalance->/** @scrutinizer ignore-call */ getMarginAmount() . "\n";
Loading history...
20
    echo "Unrealized net profit loss: " . $tradeBalance->getUnrealizedNetProfitLoss() . "\n";
0 ignored issues
show
The method getUnrealizedNetProfitLoss() 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...ce\TradeBalanceResponse. ( Ignorable by Annotation )

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

20
    echo "Unrealized net profit loss: " . $tradeBalance->/** @scrutinizer ignore-call */ getUnrealizedNetProfitLoss() . "\n";
Loading history...
21
22
23
} catch (Exception $e) {
24
    echo $e->getMessage();
25
}
26