Skip to content

docs: document async client (AsyncDatamaxi) in README and docs#163

Merged
martinkersner merged 5 commits into
mainfrom
issue-162-document-async-client-readme
Jul 4, 2026
Merged

docs: document async client (AsyncDatamaxi) in README and docs#163
martinkersner merged 5 commits into
mainfrom
issue-162-document-async-client-readme

Conversation

@martinkersner

@martinkersner martinkersner commented Jul 4, 2026

Copy link
Copy Markdown
Member

Closes #162

Summary

Documents the async client (AsyncDatamaxi, added in #149/#150). Restructured per review feedback so async is not a bolt-on duplicate lump.

mkdocs docs site — real Sync/Async content tabs

  • Enabled pymdownx.tabbed (alternate_style: true) in mkdocs.yml.
  • Converted the Python example on every endpoint page into a Sync/Async tab pair (17 pages): all CEX pages, funding-rate, liquidation, open-interest, margin-borrow, index-price, premium, forex, naver-trend, telegram, and the index.md quickstart. Each Async tab is the awaited twin of the Sync tab (full async with + asyncio.run scaffold per page).
  • Slimmed docs/async.md from a per-endpoint duplicate into a concept page: install the datamaxi[async] extra, lifecycle (async with / await client.aclose()), same DATAMAXI_API_KEY env var, coroutine/await rule, async next_request pagination, standalone AsyncTelegram/AsyncNaver, and the ::: datamaxi.aio.AsyncDatamaxi mkdocstrings reference. Points readers to the per-endpoint tabs. Still in the nav.

README — no tabs (GitHub/PyPI render them as raw text)

  • Replaced the earlier bulky async block with a slim co-equal subsection right after Quickstart: one paragraph, the datamaxi[async] install, one runnable asyncio.run example, the lifecycle + async next_request caveats, a one-line mention of AsyncTelegram/AsyncNaver, and a pointer to the docs' Sync/Async tabs. API Reference stays sync-only. ToC keeps the "Async Client" entry.

Correctness fix (both tabs)

While writing the Async twins I found existing docs examples passing kwargs that neither the sync nor async SDK accepts (would raise TypeError): cex.token.updates(sort=...), cex.symbol.cautions(base=...), cex.symbol.delistings(base=...), cex.symbol.volume(exchange=...). Removed those kwargs from both the Sync and Async tabs so the examples are valid and true twins, and corrected the now-inaccurate cex-symbol note.

Test plan

  • mkdocs build --strict passes clean (only a pre-existing unrelated 'unrecognized relative link LICENSE' INFO in index.md); verified Sync/Async content tabs render in the built HTML.
  • All 17 Async-tab snippets validated with ast.parse.
  • Every method/attribute/arg verified against datamaxi/aio/*: coroutine await, async next_request, env-var handling, and the standalone Telegram/Naver clients.
  • Docs-only; no SDK code touched.

@martinkersner martinkersner self-assigned this Jul 4, 2026
- enable pymdownx.tabbed in mkdocs.yml
- convert every endpoint page example into Sync/Async content tabs (17 pages)
- slim docs/async.md to a concept page (install, lifecycle, pagination, ref)
- drop invalid kwargs that neither sync nor async accept (cex.token.updates sort;
  cex.symbol cautions/delistings base; cex.symbol.volume exchange)
cex.token.updates accepts only page/limit/type; sort= would raise
TypeError. Fixes the last instance (README API Reference, mirrored to
docs/index.md via symlink). Closes #165.
@martinkersner martinkersner merged commit 86c8200 into main Jul 4, 2026
@martinkersner martinkersner deleted the issue-162-document-async-client-readme branch July 4, 2026 12:29
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

Successfully merging this pull request may close these issues.

Document the async client (AsyncDatamaxi) in README and docs

1 participant