Machine-Readable Specs
BTSE publishes its full API surface as standard OpenAPI 3.0.3 (for REST endpoints) and AsyncAPI 2.6.0 (for WebSocket channels) files. These are the same files this documentation site is generated from — they are the single source of truth.
Use them to generate clients, validate requests, drive Postman / Insomnia collections, or feed an AI coding assistant the complete API surface in a few hundred KB.
Point your tool at the URLs below instead of HTML-scraping the documentation. The HTML pages render the same information, but the YAML files give you typed schemas, examples, error responses, and authentication requirements in a form a parser can rely on.
REST API specs (OpenAPI 3.0.3)
| Product | Base URL | Download |
|---|---|---|
| Markets | https://api.btse.com | markets-rest.openapi.yaml |
| Spot | https://api.btse.com/spot | spot-rest.openapi.yaml |
| Futures | https://api.btse.com/futures | futures-rest.openapi.yaml |
| Wallet | https://api.btse.com | wallet-rest.openapi.yaml |
| Earn | https://api.btse.com/spot | earn-rest.openapi.yaml |
| OTC | https://api.btse.com | otc-rest.openapi.yaml |
WebSocket API specs (AsyncAPI 2.6.0)
| Product | Endpoint | Download |
|---|---|---|
| Spot | wss://ws.btse.com/ws/spot | spot-websocket.asyncapi.yaml |
| Futures | wss://ws.btse.com/ws/futures | futures-websocket.asyncapi.yaml |
| OTC | wss://ws.btse.com/ws/otc | otc-websocket.asyncapi.yaml |
What's in each spec
Every REST spec contains:
servers:— production and testnet base URLspaths:— every endpoint with its method, parameters, request body schema, and response schemacomponents.securitySchemes:— declares the three required headers (request-api,request-nonce,request-sign) for private endpointscomponents.schemas:— typed object schemas for orders, positions, wallet entries, etc.- Per-operation
description,summary, and at least one example response
The path that appears in each spec is the signed urlpath — the exact string you concatenate with the nonce and body to compute request-sign. See Signed Request Walkthrough for the algorithm.
Common consumption patterns
Generate a client SDK
The site already ships pre-built Python, JavaScript, and Java SDKs. For other languages or custom generators:
# Install the OpenAPI generator (Java required)
npm install -g @openapitools/openapi-generator-cli
# Generate a Go client for the Spot REST API
openapi-generator-cli generate \
-i https://docs.btse.com/specs/spot-rest.openapi.yaml \
-g go \
-o ./btse-spot-go
Supported generators: see OpenAPI Generator's full list.
Validate requests in code
Use a runtime validator (e.g. openapi-core for Python, express-openapi-validator for Node, kin-openapi for Go) to reject malformed requests before they hit the network — useful in CI and in trading bots where catching a bad order shape locally is cheaper than a 400.
Drive a Postman / Insomnia collection
Both tools import OpenAPI directly:
- Postman: File → Import → paste one of the URLs above
- Insomnia: Application → Import/Export → Import Data → From URL
Each tool will scaffold every endpoint with parameter forms; you fill in your API key, nonce, and signature manually (or wire up a pre-request script using the Authentication signer code).
Feed an AI coding assistant
The full English documentation is also published as a single large text file at /llms-full.txt (~185 KB) — designed to be pasted into a model context for end-to-end coverage. The Chinese version is at /zh/llms-full.txt. A shorter index for discovery is at /llms.txt.
For programmatic consumption, prefer the structured YAML specs above over the markdown bundle — they parse losslessly and include type information.
Reporting spec issues
If you find a discrepancy between a spec file and actual API behavior, please report it to support.btse.com with the endpoint path and the diverging field. Specs are versioned alongside the docs site — fixes ship with the next deploy.