Skip to content

feat(docs): per-method hosted/self-hosted toggle on Group A reference pages (v2.49.2)#979

Open
realfishsam wants to merge 2 commits into
mainfrom
docs/per-method-hosted-toggle
Open

feat(docs): per-method hosted/self-hosted toggle on Group A reference pages (v2.49.2)#979
realfishsam wants to merge 2 commits into
mainfrom
docs/per-method-hosted-toggle

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Follow-up to v2.49.1. Adds a synchronized Hosted (recommended) / Self-hosted tab toggle to every Group A method reference page so customers see the hosted endpoint and v2.49 SDK constructor shape by default, and can flip to the local-sidecar variant in place. Mintlify syncs tab selection across pages via shared label keys.

What's in this PR

11 shadow MDX files (docs/api-reference/{buildOrder,cancelOrder,createOrder,fetchAllOrders,fetchBalance,fetchClosedOrders,fetchMyTrades,fetchOpenOrders,fetchOrder,fetchPositions,submitOrder}.mdx) — each wraps the existing OpenAPI auto-render in a <Tabs> toggle. Tab labels byte-identical across all 11 files for cross-page sync.

9 new operations in openapi-hosted.json documenting trade.pmxt.dev/v0/*: buildOrderHosted, submitOrderHosted, createOrderHosted, cancelOrderHosted, fetchBalanceHosted, fetchPositionsHosted, fetchOpenOrdersHosted, fetchMyTradesHosted, fetchOrderHosted. Each with Python + TypeScript x-codeSamples, error coverage 401/403/404/410/422/503, bearer auth.

10 new component schemas for the v0 request/response shapes, reusing existing components from 2.49.1.

docs.json updated so Trading + Orders & Positions sidebar groups point at the shadow MDX slugs.

JSDoc rot fix: createOrder / buildOrder code samples used to show type="market" with price=0.55 (incoherent — price is limit-only). Replaced with coherent limit samples across all 16 venues via PARAM_OVERRIDES in the generator.

Changelog 2.49.2 entry added.

Not addressed (flagged in changelog)

  • fetchClosedOrdersHosted / fetchAllOrdersHosted raise NotSupported in hosted mode (no underlying endpoint). Shadow MDX surfaces this via <Warning> linking to fetchMyTrades.
  • Escrow methods are hosted-only, not in Group A scope. Future PR.
  • Generator capability-map gap (Hyperliquid/GeminiTitan/Mock missing). Future PR.

Test plan

  • Mintlify preview renders all 11 toggle pages
  • Click Self-hosted on createOrder → navigate to fetchBalance → confirm Self-hosted tab is still active (sync)
  • Confirm Hosted tab is active by default on first load
  • No regressions on existing OpenAPI-auto-rendered pages outside Group A

… pages (v2.49.2)

Every Group A method (createOrder, buildOrder, submitOrder, cancelOrder,
fetchBalance, fetchPositions, fetchOpenOrders, fetchMyTrades, fetchOrder,
fetchClosedOrders, fetchAllOrders) now has a synchronized Hosted /
Self-hosted tab toggle. Hosted is the default tab; Mintlify syncs tab
selection across pages via shared label keys so the choice persists.

Added:
- 11 shadow MDX files under docs/api-reference/ (one per Group A method)
  wrapping the existing OpenAPI auto-render in a <Tabs> toggle.
- 9 new operations in openapi-hosted.json documenting the
  trade.pmxt.dev/v0/* surface — build/submit/create/cancel order plus the
  5 read endpoints. Each has Python + TypeScript x-codeSamples with the
  v2.49 hosted constructor shape and error responses covering
  401/403/404/410/422/503.
- 10 new component schemas referencing existing components from 2.49.1.
- docs.json updated so Trading + Orders & Positions sidebar groups point
  at the shadow MDX slugs.

Fixed:
- createOrder/buildOrder code-sample JSDoc rot — pages used to show
  type="market" with price=0.55 (price is only meaningful on limits).
  PARAM_OVERRIDES in generate-openapi.js now emits coherent limit
  samples across all 16 venues (64 lines updated).

Not addressed (flagged for follow-up):
- fetchClosedOrdersHosted / fetchAllOrdersHosted — both raise
  NotSupported in hosted mode (no underlying endpoint). Shadow MDX
  surfaces this with a <Warning> linking to fetchMyTrades.
- Escrow methods — hosted-only, not in Group A scope.
- Generator capability-map omits Hyperliquid/GeminiTitan/Mock — drops
  their x-codeSamples on regeneration. Merged main retains them from a
  prior generator run. Real fix is out of scope.

Tests: tsc --noEmit clean from core/; all 3 JSON files parse cleanly.
Mintlify CLI unavailable locally — cross-page tab sync relies on the
documented Mintlify convention (verified post-merge in the deploy).
@mintlify

mintlify Bot commented Jun 8, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
PMXT 🟢 Ready View Preview Jun 8, 2026, 9:26 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

The shadow MDX pages array already enumerates the toggle pages; the
openapi: spec reference was causing Mintlify to auto-inject every
operation in openapi.json under those groups, polluting the sidebar
with 'API Reference / Local Only / Hosted / Data Feeds' sub-groups
below the 11 shadow MDX pages.
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