Cascade

Introduction

Get started with building on Cascade

REST API Overview

Cascade's matcher exposes a typed REST surface for reading market configuration, inspecting account state, and driving the full order lifecycle. The pages underneath this section are generated from the schema/openapi.yaml file, so every change shipped with the matching engine is automatically reflected here.

Getting Started

  1. Authenticate with a wallet. Follow the Authentication guide (or use the in-page API Key Manager) to request a challenge, sign it, and exchange it for the JWT bearer token required by every /account/* route.
  2. Target the matcher host. By default the docs, mock server, and SDKs all point at https://matcher.cascade.xyz.
  3. Call any endpoint from the auto-generated reference. Each method block includes path, params, schema examples, and request bodies; copy them directly into curl, Postman, or your HTTP client:
curl "https://matcher.cascade.xyz/account/balance?account=0xabc...&subaccountIndex=0" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"
  1. Pair REST with streaming. Use REST for deterministic snapshots (balances, positions, configs) and complement it with the WebSocket feeds when you need incremental updates.

Rate Limits

The Cascade REST API enforces a steady 200 requests-per-second budget per account (shared across IPs). Bursts above that threshold return HTTP 429 responses with a short cool-down. Batch reads whenever possible (e.g., /account/orders) and fan out requests across multiple delegated accounts if you need higher throughput.

Architecture Overview

  • Configuration primitivesGET /config and GET /markets return verifying contract data, oracle + risk parameters, and everything you need to build signed orders client-side.
  • Market data surfaces/price, /summary, /orderbook, /candles, and /trades expose low-latency views of each market so you can quote or reconcile without touching the matcher database directly.
  • Account and risk views/account/balance, /account/positions, /account/margin, /account/orders, and /account/delegates require the JWT and always honor delegation rules so service accounts can manage positions on behalf of traders.
  • Order lifecyclePOST /account/order, POST /account/orders (batch/TWAP), and DELETE /account/orders (bulk cancel) enforce the same validations the matcher runs internally: nonce progression, trigger flags, reduce-only protection, and deterministic status codes.
  • Signer + custody management/account/signers, /account/margin, and /account/transfer/* endpoints let you rotate signers, adjust funding, and move collateral without bypassing the on-chain invariants defined by the Perennial contracts.

Support

For integration help, share HTTP logs (path, timestamp, request body, and matcher response) with the Cascade engineering contacts you were onboarded with. Include the relevant account, subaccountIndex, and orderId so the team can trace the request quickly.