Skip to content

Commit bfd65d5

Browse files
Resolve "Futures endpoint maxordersize is no longer available" (#382)
1 parent c95988a commit bfd65d5

File tree

3 files changed

+53
-62
lines changed

3 files changed

+53
-62
lines changed

CHANGELOG.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,64 @@
22

33
## [Unreleased](https://github.com/btschwertfeger/python-kraken-sdk/tree/HEAD)
44

5-
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.1.5...HEAD)
5+
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.2.2...HEAD)
6+
7+
Uncategorized merged pull requests:
8+
9+
- Bump the all group with 2 updates [\#380](https://github.com/btschwertfeger/python-kraken-sdk/pull/380) ([dependabot[bot]](https://github.com/apps/dependabot))
10+
- Update project settings [\#379](https://github.com/btschwertfeger/python-kraken-sdk/pull/379) ([btschwertfeger](https://github.com/btschwertfeger))
11+
- Bump the all group with 5 updates [\#378](https://github.com/btschwertfeger/python-kraken-sdk/pull/378) ([dependabot[bot]](https://github.com/apps/dependabot))
12+
- Bump the all group with 7 updates [\#377](https://github.com/btschwertfeger/python-kraken-sdk/pull/377) ([dependabot[bot]](https://github.com/apps/dependabot))
13+
14+
## [v3.2.2](https://github.com/btschwertfeger/python-kraken-sdk/tree/v3.2.2) (2025-04-11)
15+
16+
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.2.1...v3.2.2)
17+
18+
**Fixed bugs:**
19+
20+
- `kraken.spot.trade.create_order`: `stp_type` should be `stptype` [\#373](https://github.com/btschwertfeger/python-kraken-sdk/pull/373) ([HFFP](https://github.com/HFFP))
21+
22+
## [v3.2.1](https://github.com/btschwertfeger/python-kraken-sdk/tree/v3.2.1) (2025-04-01)
23+
24+
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.2.0...v3.2.1)
25+
26+
Uncategorized merged pull requests:
27+
28+
- Bump the all group with 3 updates [\#370](https://github.com/btschwertfeger/python-kraken-sdk/pull/370) ([dependabot[bot]](https://github.com/apps/dependabot))
29+
- Resolve "Parts of the pyproject.toml are deprecated" [\#372](https://github.com/btschwertfeger/python-kraken-sdk/pull/372) ([btschwertfeger](https://github.com/btschwertfeger))
30+
31+
## [v3.2.0](https://github.com/btschwertfeger/python-kraken-sdk/tree/v3.2.0) (2025-03-14)
32+
33+
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.1.6...v3.2.0)
34+
35+
**Implemented enhancements:**
36+
37+
- Resolve "Add the `/0/private/AmendOrder` and `/0/private/OrderAmends` endpoints" [\#362](https://github.com/btschwertfeger/python-kraken-sdk/pull/362) ([btschwertfeger](https://github.com/btschwertfeger))
38+
39+
**Fixed bugs:**
40+
41+
- Pin dependencies to fix doc building [\#365](https://github.com/btschwertfeger/python-kraken-sdk/pull/365) ([btschwertfeger](https://github.com/btschwertfeger))
42+
43+
Uncategorized merged pull requests:
44+
45+
- Bump the all group with 5 updates [\#364](https://github.com/btschwertfeger/python-kraken-sdk/pull/364) ([dependabot[bot]](https://github.com/apps/dependabot))
46+
- Resolve "Kraken no longer offers the NFT marketplace" [\#367](https://github.com/btschwertfeger/python-kraken-sdk/pull/367) ([btschwertfeger](https://github.com/btschwertfeger))
47+
- Resolve "Websocket error propagation lacks usability" [\#363](https://github.com/btschwertfeger/python-kraken-sdk/pull/363) ([btschwertfeger](https://github.com/btschwertfeger))
48+
49+
## [v3.1.6](https://github.com/btschwertfeger/python-kraken-sdk/tree/v3.1.6) (2025-02-16)
50+
51+
[Full Changelog](https://github.com/btschwertfeger/python-kraken-sdk/compare/v3.1.5...v3.1.6)
52+
53+
**Fixed bugs:**
54+
55+
- Resolve "`async_close` and `stop` marked as deprecated, but no alternative is provided" [\#359](https://github.com/btschwertfeger/python-kraken-sdk/pull/359) ([btschwertfeger](https://github.com/btschwertfeger))
656

757
Uncategorized merged pull requests:
858

9-
- Update copyright header [\#354](https://github.com/btschwertfeger/python-kraken-sdk/pull/354) ([btschwertfeger](https://github.com/btschwertfeger))
1059
- Bump github/codeql-action from 3.28.5 to 3.28.9 [\#353](https://github.com/btschwertfeger/python-kraken-sdk/pull/353) ([dependabot[bot]](https://github.com/apps/dependabot))
1160
- Bump actions/setup-python from 5.3.0 to 5.4.0 [\#351](https://github.com/btschwertfeger/python-kraken-sdk/pull/351) ([dependabot[bot]](https://github.com/apps/dependabot))
61+
- Resolve "The URLs in the documentation linking to the Kraken API documentation are out-dated" [\#360](https://github.com/btschwertfeger/python-kraken-sdk/pull/360) ([btschwertfeger](https://github.com/btschwertfeger))
62+
- Update copyright header [\#354](https://github.com/btschwertfeger/python-kraken-sdk/pull/354) ([btschwertfeger](https://github.com/btschwertfeger))
1263
- Update egress rules in CI [\#349](https://github.com/btschwertfeger/python-kraken-sdk/pull/349) ([btschwertfeger](https://github.com/btschwertfeger))
1364

1465
## [v3.1.5](https://github.com/btschwertfeger/python-kraken-sdk/tree/v3.1.5) (2025-01-29)

src/kraken/futures/trade.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -767,43 +767,5 @@ def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913,PLR0917,
767767
extra_params=extra_params,
768768
)
769769

770-
def get_max_order_size(
771-
self: Trade,
772-
orderType: str,
773-
symbol: str,
774-
limitPrice: float | None = None,
775-
*,
776-
extra_params: dict | None = None,
777-
) -> dict:
778-
"""
779-
Retrieve the maximum order price for a specific symbol. Can be adjusted
780-
by ``limitPrice``. This endpoint only supports multi-collateral futures.
781-
782-
Requires at least the ``General API - Read Access`` permission in the
783-
API key settings.
784-
785-
- https://docs.kraken.com/api/docs/futures-api/trading/get-max-order-size
786-
787-
:param orderType: ``lmt`` or ``mkt``
788-
:type orderType: str
789-
:param symbol: The symbol to filter for
790-
:type symbol: str
791-
:param limitPrice: Limit price if ``orderType == lmt`` , defaults to
792-
None
793-
:type limitPrice: Optional[float], optional
794-
"""
795-
params: dict = {"orderType": orderType, "symbol": symbol}
796-
797-
if defined(limitPrice) and orderType == "lmt":
798-
params["limitPrice"] = limitPrice
799-
800-
return self.request( # type: ignore[return-value]
801-
method="GET",
802-
uri="/derivatives/api/v3/initialmargin/maxordersize",
803-
query_params=params,
804-
auth=True,
805-
extra_params=extra_params,
806-
)
807-
808770

809771
__all__ = ["Trade"]

tests/futures/test_futures_trade.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -280,25 +280,3 @@ def test_cancel_all_orders(futures_demo_trade: Trade) -> None:
280280
"""
281281
assert is_success(futures_demo_trade.cancel_all_orders(symbol="pi_xbtusd"))
282282
assert is_success(futures_demo_trade.cancel_all_orders())
283-
284-
285-
@pytest.mark.futures
286-
@pytest.mark.futures_auth
287-
@pytest.mark.futures_trade
288-
def test_get_max_order_size(futures_auth_trade: Trade) -> None:
289-
"""
290-
Checks the ``cancel_all_orders`` endpoint.
291-
"""
292-
assert is_success(
293-
futures_auth_trade.get_max_order_size(
294-
orderType="lmt",
295-
symbol="PF_XBTUSD",
296-
limitPrice=10000,
297-
),
298-
)
299-
assert is_success(
300-
futures_auth_trade.get_max_order_size(
301-
orderType="mkt",
302-
symbol="PF_XBTUSD",
303-
),
304-
)

0 commit comments

Comments
 (0)