Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ error handling:
The primary public interface is each client's generic `request(...)` method —
callers pass the raw `method` + `uri` (+ params) and get parsed, exception-
checked responses. The README "Considerations" section is the design intent:
**concentrate on `request`**; the higher-level domain clients are maintained but
no longer extended.
**concentrate on `request`**; the higher-level domain clients receive bug fixes
only, no new wrapper methods or parameters, because `request` already reaches
every endpoint and parameter in Kraken's API docs. Websocket clients are
exempt: they may still gain new channels or features, because those aren't
reachable through a plain `request` call.

Key shared behaviors:

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

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,12 @@ basis. Instead, it was decided to concentrate on the `request` functions of
the `SpotClient`, `SpotAsyncClient`, `FuturesClient` and the
`FuturesAsyncClient` (as well as their websocket client implementations). All
those clients named "User", "Trade", "Market", "Funding" and so on will no
longer be extended, but maintained to a certain degree.
longer be extended, but maintained to a certain degree. The client's `request`
method takes the raw method, URI, and parameters directly, so every endpoint
and parameter documented by Kraken's API is already reachable without a named
wrapper method. Existing wrapper methods still receive bug fixes. Websocket
clients keep gaining new channels and features, since those cannot be reached
through a plain `request` call.

<a name="references"></a>

Expand Down
2 changes: 1 addition & 1 deletion src/kraken/spot/earn.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Earn(SpotClient):

>>> from kraken.spot import Earn
>>> with Earn(key="api-key", secret="secret-key") as earn:
... print(earn.stake_asset(asset="XLM", amount=200, method="Lumen Staked"))
... print(earn.allocate_earn_funds(amount=200, strategy_id="ESRFUO3-Q62XD-WIOIL7"))
"""

def __init__( # nosec: B107
Expand Down
Loading