Skip to main content

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.

Ratio provides a dedicated sandbox environment on Kaia’s Kairos testnet that mirrors production behaviour. Use the sandbox to develop, test, and certify your integration before any real funds flow.

Sandbox environment

PropertyValue
Base URLhttps://api.sandbox.ratiofx.com
BlockchainKaia Kairos (testnet)
StablecoinsTest tokens (no real value)
Oracle feedsSimulated feeds with configurable scenarios
Pool balancesMock balances matching production structure
The sandbox exposes the same API endpoints as production with identical request/response formats. Your integration code should work in both environments with only a base URL and API key change.

Getting sandbox access

Sandbox credentials are issued during Stage 3 (Technical integration) of onboarding:
  • Sandbox API key — Separate from your production key; no rotation required during testing
  • Partner ID — The same UUID used in both sandbox and production
  • Webhook secret — A separate sandbox secret for testing callback delivery

Test scenarios

The sandbox supports configurable test scenarios for edge case testing.
Default state. All corridors active, oracle feeds fresh, pools healthy. Use this for happy-path testing — verifying the full quote → execute → settle → confirm flow for each corridor you intend to support.
Simulate system state changes to test how your integration handles protective states and trading halts. Verify that your UI degrades gracefully when corridors are paused or the system enters a protective state.
Simulate stale oracle data or source divergence. Verify that your error handling correctly processes ORACLE_STALE and ORACLE_DEVIATION errors and presents appropriate messaging to downstream users.
Request a firm quote and wait for it to expire before attempting execution. Verify that your flow handles the QUOTE_EXPIRED error and re-requests a fresh quote without requiring manual intervention.
Submit transactions that exceed configured daily or monthly limits. Verify that rejections are handled gracefully and that your system does not retry automatically in a way that could cause duplicate submissions.
Verify that your webhook endpoint receives all event types, validates HMAC signatures correctly, and handles duplicate delivery idempotently. Ratio may deliver the same event more than once; your handler must be safe to call multiple times with the same payload.

Certification test cases

You must pass all mandatory test cases before production activation. The full set of categories is listed below.
CategoryDescriptionApplicable to
Happy pathEnd-to-end: quote → execute → settle → confirm for each enabled corridorAll partners
Quote expiryAttempt execution on expired quote; verify rejection and re-quote flowAll partners
State scenariosTest behaviour under different system statesAll partners
Volume limitsExceed daily/monthly limits; verify graceful rejectionAll partners
Webhook deliveryVerify callbacks received, HMAC signature validated, idempotent handlingAll partners
Auth failureInvalid API key, expired token, wrong Partner ID — verify clean error responsesAll partners
Error and rollbackSimulate settlement failure; verify error handlingAll partners
ReconciliationDaily reconciliation of stablecoin-in vs. fiat-out; zero discrepancy targetAll partners
Deposit routingVerify stablecoin deposit reaches correct poolLP and Issuer
kToken issuanceVerify kToken received on deposit; verify balance increases with fee accrualLP and Issuer
Withdrawal cooldownSignal withdrawal intent; verify cooldown enforced before processingLP and Issuer
Quote-response SLARespond to automated RFQ requests within the required latency targetRFQ counterparty

SLA targets

During sandbox testing, demonstrate the following SLA targets before certification is granted.
MetricTargetMeasurement
API uptime99.5%Monthly uptime
Quote response time< 2 secondsP95 latency for /v1/quote and /v1/firm-quote
Fiat → stablecoin conversion< 30 minutesTime from fiat receipt to stablecoin delivery (On-Ramp)
Stablecoin → fiat payout< 60 minutesTime from stablecoin receipt to fiat credit (Off-Ramp)

Certification and next steps

Once all mandatory test cases pass and SLA targets are demonstrated, Ratio certifies your integration for production. Certification typically takes 1–3 weeks depending on partner type and integration complexity. Gate criteria: All mandatory test cases passed; SLA targets demonstrated. After certification, Ratio issues your production API key and begins the controlled ramp-up described in Going Live.