Create your staging API keys in the
Stabyl staging app. Staging keys work only
with
https://api-staging.stabyl.com/v1. Staging access does not grant
production access.What You Can Automate
Partner withdrawals are authorized by an API key with the
wallets:withdraw
scope and an Ed25519 request signature. They do not require an emailed
verification code or a separate withdrawal token after submission.
Base URLs
The production URL is available only to organizations that have completed KYB
and been invited by Stabyl.
API Conventions
All requests use HTTPS. JSON writes requireContent-Type: application/json. Authenticated routes require X-Api-Key.
Successful JSON responses use a response envelope:
Content-Type: application/json header (415), malformed JSON (400), or an
unknown body field (422), is rejected before the envelope is built and
returns a plain-text body. Branch on the HTTP status first and only then on
error.code.
Timestamps are RFC3339 strings in UTC. Monetary amounts are strings to avoid floating point rounding issues. Stablecoins (USDT, USDC) are settlement rails for the USD wallet, not separate wallet currencies.
Design Principles
- Keep API keys server-side and grant each key only the access it needs.
- Discover wallet routes from the API instead of hardcoding chain availability.
- Treat order writes as asynchronous; read the order after submission for canonical status.
- Send a UUID
Idempotency-Keyon every create, cancel, and replace order request, and setclient_order_idon orders you must be able to find again. - Reuse a withdrawal body idempotency key only for retries of the same request.
- Reconcile from transaction and order reads, not from manual exports or UI state.
- Remove simulation calls from production code paths.