Skip to content

Commit e79ac27

Browse files
Fix stale Earn docstring example and document wrapper policy (#467)
Fixing a docstring in the earn client + refining the maintenance policy for wrapper methods.
1 parent fc6f18d commit e79ac27

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

‎AGENTS.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ error handling:
4949
The primary public interface is each client's generic `request(...)` method —
5050
callers pass the raw `method` + `uri` (+ params) and get parsed, exception-
5151
checked responses. The README "Considerations" section is the design intent:
52-
**concentrate on `request`**; the higher-level domain clients are maintained but
53-
no longer extended.
52+
**concentrate on `request`**; the higher-level domain clients receive bug fixes
53+
only, no new wrapper methods or parameters, because `request` already reaches
54+
every endpoint and parameter in Kraken's API docs. Websocket clients are
55+
exempt: they may still gain new channels or features, because those aren't
56+
reachable through a plain `request` call.
5457

5558
Key shared behaviors:
5659

@@ -97,8 +100,9 @@ auth in the background. It is not a wrapper around the domain clients.
97100
- Type hints on all signatures; ruff + mypy run in `strict` mode (config in
98101
`pyproject.toml`). `line-length = 130`.
99102
- Public interfaces get sphinx-style docstrings; skip them on internal helpers.
100-
- When adding/adjusting an endpoint, add or update the matching test under
101-
`tests/` (mirroring `src/` layout) with the correct marker.
103+
- When fixing a domain-client wrapper or adding a websocket feature, add or
104+
update the matching test under `tests/` (mirroring `src/` layout) with the
105+
correct marker.
102106
- Versioning is SemVer; version is derived from git tags via setuptools_scm
103107
(`src/kraken/_version.py` is generated — do not edit).
104108

‎README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,12 @@ basis. Instead, it was decided to concentrate on the `request` functions of
603603
the `SpotClient`, `SpotAsyncClient`, `FuturesClient` and the
604604
`FuturesAsyncClient` (as well as their websocket client implementations). All
605605
those clients named "User", "Trade", "Market", "Funding" and so on will no
606-
longer be extended, but maintained to a certain degree.
606+
longer be extended, but maintained to a certain degree. The client's `request`
607+
method takes the raw method, URI, and parameters directly, so every endpoint
608+
and parameter documented by Kraken's API is already reachable without a named
609+
wrapper method. Existing wrapper methods still receive bug fixes. Websocket
610+
clients keep gaining new channels and features, since those cannot be reached
611+
through a plain `request` call.
607612
608613
<a name="references"></a>
609614

‎src/kraken/spot/earn.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Earn(SpotClient):
4545
4646
>>> from kraken.spot import Earn
4747
>>> with Earn(key="api-key", secret="secret-key") as earn:
48-
... print(earn.stake_asset(asset="XLM", amount=200, method="Lumen Staked"))
48+
... print(earn.allocate_earn_funds(amount=200, strategy_id="ESRFUO3-Q62XD-WIOIL7"))
4949
"""
5050

5151
def __init__( # nosec: B107

0 commit comments

Comments
 (0)