Documentation Index
Fetch the complete documentation index at: https://docs.ratiofx.com/llms.txt
Use this file to discover all available pages before exploring further.
This section covers every Ratio API endpoint. For step-by-step integration guidance, see the Integration Guide.
Base URLs
| Environment | Base URL |
|---|
| Sandbox | https://api.sandbox.ratiofx.com/v1 |
| Production | https://api.ratiofx.com/v1 |
Sandbox connects to the Kaia Kairos testnet. No real funds are involved. Production connects to the Kaia mainnet and involves live stablecoins.
Authentication
Every request requires the following headers:
| Header | Value |
|---|
Authorization | Bearer {api_key} |
X-Partner-ID | {partner_id} |
Content-Type | application/json |
API keys are 256-bit random tokens issued during onboarding. Sandbox and production keys are separate.
curl -X GET "https://api.ratiofx.com/v1/quote?pair=USD-IDR&side=BUY&amount=10000" \
-H "Authorization: Bearer sk_live_abc123..." \
-H "X-Partner-ID: partner_uuid_xyz" \
-H "Content-Type: application/json"
Endpoint index
Quotes and execution
| Method | Endpoint | Description | Reference |
|---|
GET | /v1/quote | Indicative quote — no inventory reservation | Quotes API |
POST | /v1/firm-quote | Firm executable quote with inventory reservation | Quotes API |
POST | /v1/execute | Execute a firm quote for on-chain settlement | Swaps API |
System
| Method | Endpoint | Description | Reference |
|---|
GET | /v1/system/state | Current system state per corridor | Swaps API |
Webhook events
| Event | Trigger | Reference |
|---|
settlement.confirmed | Swap settled on-chain successfully | Webhooks |
settlement.failed | Swap execution failed | Webhooks |
quote.expired | Firm quote expired without execution | Webhooks |
system.state_change | A corridor’s system state changed | Webhooks |