Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getOrderBook not found #14

Open
gutofurlan opened this issue Feb 3, 2022 · 2 comments
Open

getOrderBook not found #14

gutofurlan opened this issue Feb 3, 2022 · 2 comments

Comments

@gutofurlan
Copy link

Hi how are you ?
I implement the package, but method getOrderBook not found:
My code:
`

$this->client = new \Butschster\Kraken\Client(
new GuzzleClient(),
// new \Butschster\Kraken\NonceGenerator(),
// (new \Butschster\Kraken\Serializer\SerializerFactory())->build(),
env('KRAKEN_KEY'),
env('KRAKEN_SECRET')
);

    $this->client->getOrderBook(['XBTUSD', 'XXBTZUSD'], 100);
    `

I have the error: Call to undefined method Butschster\Kraken\Client::getOrderBook()

What solution ?
thanks

@Tob0t
Copy link
Contributor

Tob0t commented Feb 3, 2022

Seems like getOrderBook api endpoint changed on krakens side (check https://docs.kraken.com/rest/#operation/getOrderBook), you can try as workaround using the static request method, or submit a PR ;)

Kraken::request('Depth', ['pair' => XBTUSD, 'count' => 100]);

@kirc0de
Copy link

kirc0de commented Jan 10, 2023

The same issue. Kraken now accepts only 1 pair in this endpoint so you should pass there only 1 pair:

$this->client->getOrderBook(['XBTUSD'], 100);
$this->client->getOrderBook(['XXBTZUSD'], 100);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants