Skip to content

Refresh API docs: spec sync, WebSocket section, AI-agent artifacts - #14

Open
guiviaje wants to merge 10 commits into
mainfrom
api-refresh-websocket
Open

Refresh API docs: spec sync, WebSocket section, AI-agent artifacts#14
guiviaje wants to merge 10 commits into
mainfrom
api-refresh-websocket

Conversation

@guiviaje

@guiviaje guiviaje commented Jul 6, 2026

Copy link
Copy Markdown

What

Single-page docs refresh, aligned with the current API code and the WebSocket stream server (GitLab MR 2422 / BAC-912):

Spec refresh (anboto-trading-api-2.0.yml) — regenerated from code:

  • listenKey endpoint (WebSocket auth), 429 rate-limit responses on all authenticated endpoints
  • OrderDetails extended (trades, fees, strategy, timing) + new TradeDetails schema
  • include_trades / include_fees params on order/byId
  • request exchange enum published as TradingExchange with the list the API actually accepts (incl. newly enabled HYPERLIQUID); response-side Exchange enum unchanged
  • auth description corrected: HMAC signatures are Base64, not hex

WebSocket API section (same page) — new Slate include source/includes/_websocket.md, wired via widdershins --includes:
listenKey auth, keep-alive, subscribe protocol, error codes, and all nine topics (order, child_order, trade, position, position_risk, balance, ticker, ohlcv, open_interest) with example frames.

AI-agent artifacts — builds on the "For AI Agents" section: post-build workflow step now generates the machine-readable files it links to (llms.txt, llms-full.txt, index.md, websocket.md, agents.md, asynapi.yml).

Also: duplicate args key fixed in .pre-commit-config.yaml; large-file cap raised to 1500 KB (the generated page crossed 500 KB).

Merge timing

⚠️ Documents the WebSocket API and listenKey endpoint — merge (and thereby publish) only once api-ws is deployed (GitLab MR 2422 + the api-docs-refresh MR).

Site rebuilt locally with ruby 3.3 mirroring the Build action; docs/ in this PR is the rendered result.

🤖 Generated with Claude Code

guiviaje and others added 5 commits July 6, 2026 16:04
Spec regenerated from the current api-gw code:
- listenKey endpoint (WebSocket auth) and 429 rate-limit responses
- OrderDetails extended (trades, fees, strategy, timestamps) + TradeDetails
- include_trades / include_fees params on order/byId
- request exchange enum published as TradingExchange with the list the
  API actually accepts (incl. the newly enabled HYPERLIQUID); the wider
  Exchange enum remains for response fields
- corrected auth description (signatures are Base64, not hex) and typos

WebSocket API documented on the same page via a Slate include
(source/includes/_websocket.md, wired with widdershins --includes):
listenKey authentication, keep-alive, subscribe protocol, error codes
and the six topics (order, child_order, trade, position, position_risk,
balance) with example frames.

docs/ rebuilt with middleman (ruby 3.3, mirroring the Build action).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…artifacts

- New 'For AI Agents' docs section (source/includes/_agents.md) with MCP
  quickstart, guardrail flags, and machine-readable doc links; wired into
  the Widdershins regeneration (--includes websocket,agents)
- llms.txt index served from docs/, llms-full.txt generated at build
  (all Markdown concatenated, HTML stripped)
- Publish raw Markdown variants (index.md, websocket.md, agents.md) and the
  AsyncAPI WebSocket spec (asynapi.yml) alongside the OpenAPI spec
- Spec fixes: add missing /api/v2/trading/listenKey path; correct response
  schemas for /trading/balance (AssetBalance[]), /trading/position
  (AccountPosition[]), /trading/userTrades (TradeDetailsList),
  /data/exchanges and /data/instruments and funding endpoints (arrays);
  point API intro at the agent tooling

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ise large-file cap for the generated page

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant