JSON Schemas
Machine-readable JSON Schema definitions for all API request and response types. These schemas describe the wire format — base-unit amounts as integer strings (prices as decimal strings), identifiers as display-order hex.
Request Schemas
quote_params
route.quote / route.subscribe request parameters.
build_params
tx.build request parameters.
Response Schemas
route_result
Route result (Cauldron, Combined, or Wrapped quote). Internally tagged by kind.
build_result
tx.build success response.
error_response
JSON-RPC error response.
Notification Schemas
route_update_notification
route.update success notification (server-pushed).
route_update_error
route.update error notification (route became unroutable).
tx_update_notification
tx.update success notification (a freshly assembled unsigned tx, pushed when a tx.subscribe route's pools move). Same shape as build_result.
tx_update_error
tx.update error notification (the subscribed build can no longer be assembled).
unsubscribe_ack
Response to route.unsubscribe / tx.unsubscribe, confirming the cleared slot.
Usage
Validation
Use any JSON Schema validator to validate requests/responses:
import json, jsonschema
schema = json.load(open("docs/schemas/quote_params.schema.json"))
jsonschema.validate({"sell": "bch", "buy": "abcd" * 16, "amount": "1000"}, schema)
Client Generation
Schemas can be used with code generators like quicktype or json-schema-to-typescript to generate type-safe client code.
Versioning
The schemas are generated from the service's own wire types and published alongside it, so they describe the format the deployed endpoint actually accepts and returns. While the API is in beta they may change without notice.