pmxt-core package’s OpenAPI specification. This
page is the hand-written preface; everything else under
API Reference → Endpoints is rendered directly from the spec.
How this works
PMXT Hosted mountspmxt-core’s HTTP surface under
POST /api/:exchange/:method. That surface is the same one the local
sidecar exposes, and it’s described by a single OpenAPI 3 document
(openapi.yaml)
generated from the TypeScript source of
BaseExchange.ts
on every pmxt-core build.
The spec ships inside the pmxt-core npm package at
node_modules/pmxt-core/dist/server/openapi.yaml. On every npm install,
hosted-pmxt’s postinstall hook runs scripts/sync-docs.js, which:
- Copies the spec into
docs/api-reference/openapi.yaml. - Rewrites
serversto point athttps://api.pmxt.dev. - Adds a
bearerAuthsecurity scheme so every endpoint in this reference shows the correctAuthorization: Bearer …requirement. - Regenerates
concepts/venuesfrom theExchangeParamenum.
pmxt-core publishes a new version, the immediate watcher in
hosted-pmxt opens a PR that bumps the dependency — npm install inside
that PR re-runs the sync, and the refreshed spec lands in the same
commit. There is no separate docs build, no drift, and no manual
step. If you see a method documented here, it exists in the hosted
surface at exactly that path.
Request shape
Every venue pass-through call has the same wire shape:args array is the positional signature of the underlying SDK
method, which is why each generated endpoint page lists its arguments in
order. For example, fetchMarkets({ query, limit }) becomes:
args. When it supports positional arguments, pass them
inline.
Response envelope
Every pass-through response is wrapped in the same envelope:Interactive try-it-out
Every generated endpoint page in this reference has a “Try It” panel on the right — paste your API key once at the top of the page and every request runs againsthttps://api.pmxt.dev with Bearer auth attached.
