What you will accomplish
- Download and validate the official schema
- Generate a typed client
- Pin and review schema changes
- Avoid assuming the public schema covers authenticated trading
Before you begin
- Node.js 22.12+ for current Redocly CLI v2
- npm/npx or Docker
- A pinned OpenAPI Generator release
- The Quote.Trade public OpenAPI schema
Download and hash the schema
Save the schema in source control or a versioned artifact store and record its SHA-256 hash and retrieval date. Treat the retrieved schema as public/read-only unless an authenticated operation is explicitly present and approved.
curl -fsS https://quote.trade/openapi/quote-trade.openapi.yaml -o quote-trade.openapi.yaml
sha256sum quote-trade.openapi.yamlLint with a recorded Redocly version
Use a version pinned in package-lock.json or record the version printed by npx. Redocly CLI v2 currently supports Node.js 20.19+ or 22.12+; check the installed package requirements before running it.
npx @redocly/cli@latest --version
npx @redocly/cli@latest lint quote-trade.openapi.yamlGenerate with a stable OpenAPI Generator image
The example pins OpenAPI Generator 7.22.0. Review release notes and test generated output before changing that version.
docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli:v7.22.0 generate \
-i /local/quote-trade.openapi.yaml \
-g python \
-o /local/generated/quote_trade_publicInspect generated operations
Confirm the client contains only the verified public endpoints represented by the schema. Do not add order, account, withdrawal, or private WebSocket methods based on Binance assumptions.
Run generated-client tests in CI
Pin the schema hash, generator version, runtime, and generated diff. Pause CI when an endpoint or schema changes until the impact has been evaluated.
Common problems and fixes
Generator output changes without a code change
Compare the pinned schema hash and generator image/version.
A generated method uses the wrong base URL
Set the production base explicitly in the wrapper configuration.
Private endpoints are missing
Use the trading reference and request an official schema update rather than inventing undocumented operations.