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.

Getting Started

  1. Authenticate with a wallet. Follow the Connect to API guide (or use the in-page API Key Manager) to request a challenge, sign it, and exchange it for an API key (JWT bearer token) required by every /account/* route.
No API key
  1. Target the matcher host. The testing default is https://engine.cascade.cooking, and production is https://engine.cascade.xyz.
  2. 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://engine.cascade.cooking/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.