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
Bug
introduced
by
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
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
![]() |
|||||
21 | |||||
22 | |||||
23 | } catch (Exception $e) { |
||||
24 | echo $e->getMessage(); |
||||
25 | } |
||||
26 |