DevelopersOsai website ↗
API v1
Quotes / API reference

Create a quote

Request and response reference for POST /v1/quotes.

POST/v1/quotes
Authentication: API key
Use the base URL and access configuration provided to your institution. Examples are request templates, not transaction results. Field tables focus on client fields; preserve additional metadata returned by the configured service.

Request

Keep API keys in your backend. Required entitlements and institution scope still apply.

Request templatecURL
curl -X POST "$OSAI_API_BASE_URL/v1/quotes" \
  -H "Authorization: ApiKey $OSAI_PUBLIC_ID:$OSAI_API_SECRET" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <stable-operation-key>" \
  --data '{
  "quote_mode": "FIXED_SOURCE",
  "base_amount_minor": 100000,
  "base_currency": "NGN",
  "quote_currency": "USD",
  "customer_reference": "order-1042"
}'

Parameters

NameLocationRequirementDescription
Idempotency-Keyheader · stringRequiredUse the value defined for this resource.
X-Request-Idheader · stringOptionalUse the value defined for this resource.
Authorizationheader · stringRequiredUse the value defined for this resource.

Request body

Send JSON with Content-Type: application/json. Nested field names identify their parent object; required markers apply within that object. Replace template values using the relevant resource and configured instrument rules.

FieldTypeDescription & constraints
base_amount_minorOptionalintegerFor FIXED_SOURCE, the exact all-in source debit including fees. Required only for FIXED_SOURCE.
quote_modeOptionalstringOmitted values retain the legacy FIXED_SOURCE request interpretation.Values: FIXED_SOURCE, FIXED_DESTINATION
destination_amount_minorOptionalintegerExact target proceeds for FIXED_DESTINATION. Required only for FIXED_DESTINATION.
base_currencyRequired in parent objectstringDefined by the resource contract.
quote_currencyRequired in parent objectstringDefined by the resource contract.
destination_railOptionalstringDefined by the resource contract.
urgencyOptionalstringDefined by the resource contract.
customer_referenceOptionalstringInstitution-scoped reference returned on the resulting trade.

Responses

Inspect HTTP status before parsing a body. These tables describe client response fields rather than invented successful transaction payloads.

200 · Quote created
FieldTypeDescription & constraints
quote_idRequired in parent objectstringDefined by the resource contract.
statusRequired in parent objectstringDefined by the resource contract.
base_amount_minorRequired in parent objectintegerDefined by the resource contract.
base_currencyRequired in parent objectstringDefined by the resource contract.
quote_currencyRequired in parent objectstringDefined by the resource contract.
destination_railOptionalstringDefined by the resource contract.
amount_out_minorRequired in parent objectintegerDefined by the resource contract.
rate_minorRequired in parent objectintegerDefined by the resource contract.
fee_minorRequired in parent objectintegerInstitution pricing fee in source-currency minor units.
quote_modeRequired in parent objectstringDefined by the resource contract.Values: FIXED_SOURCE, FIXED_DESTINATION
source_principal_minorRequired in parent objectintegerSource-currency principal converted by the quoted rate.
total_debit_minorRequired in parent objectintegerExact all-in source-currency debit, including fee.
total_cost_minorRequired in parent objectintegerTotal customer debit in source-currency minor units, including applicable customer-paid fees; equal to total_debit_minor.
total_cost_currencyRequired in parent objectstringCurrency of total_cost_minor; equal to base_currency.
destination_target_minorOptionalintegerContracted destination amount for FIXED_DESTINATION; zero for FIXED_SOURCE.
destination_surplus_minorRequired in parent objectintegerConservatively rounded proceeds above the exact requested destination target; separately identified for downstream accounting.
rate_directionRequired in parent objectstringDefined by the resource contract.
rate_scaleRequired in parent objectintegerRate is destination major units per source major unit multiplied by this scale.
fee_schedule_idRequired in parent objectstringDefined by the resource contract.
fee_schedule_versionRequired in parent objectintegerDefined by the resource contract.
source_minor_exponentRequired in parent objectintegerDefined by the resource contract.
destination_minor_exponentRequired in parent objectintegerDefined by the resource contract.
sell_amount_minorRequired in parent objectintegerDefined by the resource contract.
sell_currencyRequired in parent objectstringDefined by the resource contract.
buy_amount_minorRequired in parent objectintegerDefined by the resource contract.
buy_currencyRequired in parent objectstringDefined by the resource contract.
expires_atRequired in parent objectstringdate-timeDefined by the resource contract.
request_idOptionalstringDefined by the resource contract.
400 · Validation failure
FieldTypeDescription & constraints
errorRequired in parent objectobjectDefined by the resource contract.
error.codeRequired in parent objectstringDefined by the resource contract.
error.messageRequired in parent objectstringDefined by the resource contract.
error.request_idRequired in parent objectstringDefined by the resource contract.

Retries & recovery

Keep the original request identifiers and any required idempotency key. A timeout does not establish failure. Read the original resource or command before another financial write; use expected versions for concurrent changes.

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.