Key Features
- RGB LSPS1 (Lightning Service Provider Specification) Support: Liquidity services and swap functionalities.
- Real-time Market Data: WebSocket request/response quote streaming (
quote_request/quote_response). - Swap Protocol: Taker-maker model for initiating and executing swaps.
- Asset and Trading Pair Management: Comprehensive API for fetching supported assets and pairs.
Two Sub-APIs
The KaleidoSwap API is split into two distinct services:
The Maker API is publicly accessible and handles all trading and liquidity operations. The RLN API is the REST API served directly at the root of your own RGB Lightning Node (e.g.
http://<node>:3001/nodeinfo) and requires a running node instance.
Which API do I need?
The interactive API playground below runs against the Signet environment (
https://api.signet.kaleidoswap.com). Use it for exploration and testing. For production, use the mainnet URL once available.Authentication
Current state: Anonymous access works for all Maker API endpoints. Bearer API keys (Authorization: Bearer <token>) are already accepted and attributed today — keys carry scopes such as quote:read (market data and quotes) and swap:execute (swap init/execute) — but enforcement is rolling out gradually, so requests without a key are still served. The API playground is pre-configured with bearer auth.
Rolling out: Once enforcement is enabled, requests with a missing or invalid key will receive 401 responses. Integrations should start sending an API key now to be ready.
Base Response Format
All API responses follow a consistent JSON structure. Successful responses return the requested data directly as a JSON object or array. Errors use one of three envelopes. Application errors (invalid parameters, missing resources, conflicts, rate limits, server errors) return a structured envelope:422) return FastAPI’s validation envelope:
400 responses as a bare detail object, without error_code or request_id — for example an unsupported route on /market/quote or a malformed pair_ticker filter on /market/pairs:
See Error Handling for a complete list of error codes.
Rate Limits
Rate limits apply to all API endpoints. Requests that exceed the limit receive a429 Too Many Requests response. Specific limits vary by endpoint and environment. When building integrations, implement exponential backoff for retries and cache static data (assets, pairs) locally where possible.
Using the SDK
Instead of calling the REST API directly, you can use the official KaleidoSDK libraries that wrap these endpoints with type safety and convenience methods:TypeScript SDK
Auto-generated typed client from the OpenAPI spec with
client.maker.* and client.rln.* sub-clientsPython SDK
Synchronous Python client with Pydantic models, using the same sub-client architecture