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 | $tradesHistory = $api->getTradesHistory(); |
||||
11 | |||||
12 | echo "Coun trades: " . $tradesHistory->getCount(); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
13 | |||||
14 | foreach ($tradesHistory->getTrades() as $trade) { |
||||
0 ignored issues
–
show
The method
getTrades() 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\Trades\TradesResponse or HanischIt\KrakenApi\Call...y\TradesHistoryResponse .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
15 | echo "Order: " . $trade->getOrdertxid() . "\n"; |
||||
16 | } |
||||
17 | |||||
18 | } catch (Exception $e) { |
||||
19 | echo $e->getMessage(); |
||||
20 | } |
||||
21 |