DevelopersOsai website ↗
API v1
Get started

Authentication

Use the correct authentication scheme for API credentials, Console sessions and market-data feeds.

Customer API keys

Send Authorization: ApiKey <public_id>:<secret>. The gateway resolves institution identity from the credential. Route-specific entitlements govern operations such as quote writes, balance reads and credential changes.

Authenticated API callbash
curl "$OSAI_API_BASE_URL/v1/balances" \
  -H "Authorization: ApiKey $OSAI_PUBLIC_ID:$OSAI_API_SECRET" \
  -H "X-Osai-Correlation-Id: balance-read-1042"

Console sessions

Company workspaces and the configured identity provider establish institutional sessions. Role, institution, account eligibility and recent MFA affect access. Authentication does not replace independent financial approval. State-changing browser requests require the configured Origin and X-CSRF-Token; the browser manages the session cookie.

Read an institutional sessionjavascript
const response = await fetch("/api/auth/session", { credentials: "include" });
if (!response.ok) throw new Error("Session unavailable");
const session = await response.json();

Market-data access

Use Authorization: Bearer <feed-token> against the feed base URL. Access is scoped to configured feeds and roles; it does not grant order execution authority. Financial API keys are not substitutes for feed credentials.

Secret handling

  • Keep application keys server-side and grant only necessary permissions.
  • Redact Authorization, cookies, signing secrets and activation tokens from logs.
  • Treat 401 as an authentication problem and 403 as permission or policy denial.
  • Coordinate credential rotation before invalidating an application’s old secret.

16 suggested pages

Get startedIntroductionIntegrate institutional FX and stablecoin trading with quotes, orders, market data, account records and settlement reporting.Get startedQuickstartMake an authenticated read, request a quote and follow an instruction without losing its original references.Get startedAuthenticationUse the correct authentication scheme for API credentials, Console sessions and market-data feeds.Get startedErrorsDistinguish invalid inputs, denied access, conflicts, rate limits and uncertain outcomes.Get startedRate limitsUse response headers, bounded concurrency and backoff rather than repeated bursts.Get startedAmounts & precisionKeep minor-unit money, fixed-point FX rates and instrument-scaled quantities exact.Get startedPagination & recoveryUse each resource’s pagination model and preserve stable recovery checkpoints.Financial workflowsQuotes & acceptanceRequest explicit FX economics, review conditions and retain accepted terms.Financial workflowsTrade lifecycleTrack funding, execution and settlement as distinct business transitions.Financial workflowsBalances & transactionsRead institutional financial positions and reconcile movements by currency.Financial workflowsBeneficiariesRegister beneficiaries and coordinate their institutional approval lifecycle.Financial workflowsCredential managementCreate, inspect, rotate and revoke application credentials without exposing secrets.Events & reliabilityIdempotencyPrevent duplicate financial effects across retries and uncertain outcomes.Events & reliabilityWebhooks & verificationVerify deliveries, persist original events and make downstream processing idempotent.Events & reliabilityEvent payloadsUnderstand the customer event envelope and business transitions behind subscriptions.Events & reliabilityDelivery retries & replayRepair webhook delivery without creating a second business event.