Issues (51)

example/03_AddOrder.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
use HanischIt\KrakenApi\Enum\OrderOrderTypeEnum;
9
use HanischIt\KrakenApi\Enum\OrderTypeEnum;
10
11
require_once(__DIR__ . '/../vendor/autoload.php');
12
13
try {
14
    $api = new \HanischIt\KrakenApi\KrakenApi(
15
        "Your-API-Key",
16
        "Your-API-Sign"
17
    );
18
19
    $addOrderResponse = $api->addOrder(
20
        'XETHZEUR',
21
        OrderTypeEnum::ORDER_TYPE_BUY,
22
        OrderOrderTypeEnum::ORDER_ORDERTYPE_LIMIT,
23
        200,
24
        10,
25
        true
26
    );
27
28
    echo "TxId: " . $addOrderResponse->getTxid();
0 ignored issues
show
The method getTxid() 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\AddOrder\AddOrderResponse. ( Ignorable by Annotation )

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

28
    echo "TxId: " . $addOrderResponse->/** @scrutinizer ignore-call */ getTxid();
Loading history...
29
} catch (Exception $e) {
30
    echo $e->getMessage();
31
}
32