x-api-key request header. All requests must be made over HTTPS to either the test or production base URL. Contact the Strails team to obtain your key before you begin.
Base URLs
Use the test environment while building and validating your integration. Switch to the production URL only when you are ready to go live. Test environmentAPI Key Authentication
Include your API key in every request as thex-api-key header alongside a Content-Type header:
curl example that lists your transactions:
Obtaining Your API Key
To get access to the Strails API, email support@strails.co to begin your onboarding. The team will reply with your
x-api-key and step-by-step setup instructions. Once you receive your key, store it immediately as a server-side environment variable - never hard-code it in your application source or commit it to version control.Rate Limits
Every endpoint enforces a per-window request limit to ensure platform stability and fair use. The tables below list the configured limit and its equivalent in requests per minute (rpm) for each endpoint. Endpoints with no explicit limit inherit the service default of 30 rpm.If your backend hits rate limits frequently, move high-volume operations behind an async queue so requests are processed in an eventually consistent way. If your use case genuinely requires higher limits, contact the Strails team with your application details and traffic patterns.
429 Too Many Requests:
retry_after value (in seconds) before re-attempting the request.
User Management & Authentication
Virtual Accounts & Wallet
Wallet Management
Transactions & Asset Management
FX Orderbook & Trading
Error Handling
All errors follow a standard response shape:For a full list of status codes, state transitions, and domain-specific errors (e.g. orderbook or trading errors), see the API Status & Error Reference.
Security Best Practices
- Store your API key securely. Never commit it to version control or embed it in client-side code.
- Use environment variables. Load your key from
process.env.STRAILS_API_KEY(Node.js) or equivalent - not from a hard-coded string. - Rotate your key regularly. Use the
/regenerateapikeyendpoint to issue a new key and revoke the old one on a regular schedule. - Always use HTTPS. The Strails API does not accept plain HTTP connections. Every request must go over a secure TLS connection.
Registering Your Public Key
Strails supports optional payload encryption for production integrations that handle PII, wallet addresses, or financial data. To opt in, generate an X25519 keypair and register your 64-character hex public key with Strails using the/storepublickey endpoint. Once registered, Strails will use your public key to encrypt all response payloads and webhook bodies - only your server can decrypt them.
/storepublickey accepts { "data": "<64-hex-character X25519 public key>" } or the AES-encrypted legacy envelope whose decrypted data is the same 64-hex key.
A 200 OK response confirms your key has been stored. See the Encryption guide for full details on key generation, request encryption, and response decryption.
Platform public key
Retrieve the Strails X25519 public key viaGET /getplatformpublickey. Use it to seal requests to Strails with libsodium crypto_box_seal.
AES key (legacy)
CallGET /getaeskey to retrieve your raw, unmasked AES key. You can use it to decrypt legacy AES-GCM payloads and to verify webhook signatures when no dedicated webhook secret is configured.