Skip to content

Commit 05cd971

Browse files
committed
Fix issue with batchorder endpoint (derivatvies)
- Fix an issue where orders are sent to the API endpoint (derivatives/api/v3/batchorder) but are not executed. It seems, according to kraken support, that the payload needs to be encoded (URL-encoding).
1 parent 3a7ae96 commit 05cd971

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/kraken/futures/trade.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from __future__ import annotations
1111

1212
from typing import TypeVar
13+
from urllib.parse import encode
1314

1415
from kraken.base_api import FuturesClient, defined
1516

@@ -237,7 +238,7 @@ def create_batch_order(
237238
return self.request( # type: ignore[return-value]
238239
method="POST",
239240
uri="/derivatives/api/v3/batchorder",
240-
post_params=params,
241+
post_params=encode(params),
241242
auth=True,
242243
extra_params=extra_params,
243244
)

0 commit comments

Comments
 (0)