DevelopersOsai website ↗
API v1
Market data / API reference

Get exchange candles

Request and response reference for GET /v1/exchange/candles.

GET/v1/exchange/candles
Authentication: Feed bearer
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

Use your feed-scoped bearer token against the market-data service. Feed access does not authorize exchange execution.

Request templatecURL
curl -X GET "$OSAI_MARKET_DATA_BASE_URL/v1/exchange/candles?feed_id=$FEED_ID&feed_version=$FEED_VERSION&pair=$PAIR&interval=$INTERVAL&from=$FROM&to=$TO&limit=$LIMIT" \
  -H "Authorization: Bearer $OSAI_FEED_TOKEN"

Parameters

NameLocationRequirementDescription
feed_idquery · stringRequiredScoped feed ID from candle-series discovery.
feed_versionquery · stringRequiredExact version string from discovery.
pairquery · stringRequiredCanonical pair; must match configured feed.
intervalquery · stringRequiredResolution independent of visible range.
fromquery · stringRequiredInclusive UTC-aligned bucket open; current retention applies.
toquery · stringRequiredExclusive UTC-aligned end; full window bounded by maximum_query_buckets.
limitquery · integerRequiredBucket count INCLUDING gaps, also bounded by configured feed policy.
as_ofquery · stringOptionalOptional snapshot; carry unchanged with next_from and original to/interval/feed. Snapshot is not source freshness and does not bypass current retention.

Request body

This operation does not define a JSON request body.

Responses

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

200 · HTTP 200 response
FieldTypeDescription & constraints
contract_versionRequired in parent objectstringDefined by the resource contract.Values: osai-candles/v1
price_scaleRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
feed_versionRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
pair_versionRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
feedRequired in parent objectobjectLegacy internal feed-policy object. Browser consumers use top-level string price_scale/feed_version/pair_version, not numeric copies in this object.
intervalRequired in parent objectstringDefined by the resource contract.Values: 1m, 5m, 15m, 1h, 4h, 1d
orderRequired in parent objectstringDefined by the resource contract.Values: ASC
timestamp_precisionRequired in parent objectstringDefined by the resource contract.Values: MILLISECOND
aggregationRequired in parent objectstringDefined by the resource contract.Values: EVENT_TIME_THEN_SEQUENCE_THEN_EVENT_ID
aggregation_versionRequired in parent objectstringDefined by the resource contract.Values: osai-indicative-candles/v1
as_ofRequired in parent objectstringdate-timeDefined by the resource contract.
window_fromRequired in parent objectstringdate-timeDefined by the resource contract.
window_toRequired in parent objectstringdate-timeDefined by the resource contract.
next_fromOptionalstringdate-timeDefined by the resource contract.
candlesRequired in parent objectarrayDefined by the resource contract.
candles[].timestampRequired in parent objectstringdate-timeDefined by the resource contract.
candles[].openRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
candles[].highRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
candles[].lowRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
candles[].closeRequired in parent objectstringDefined by the resource contract.Pattern: ^[1-9][0-9]*$
candles[].volumeRequired in parent objectstring | nullAlways null for this indicative contract; undefined volume is never zero.
candles[].source_typeRequired in parent objectstringDefined by the resource contract.Values: INDICATIVE
candles[].is_completeRequired in parent objectbooleanDefined by the resource contract.
candles[].updated_atRequired in parent objectstringdate-timeDefined by the resource contract.
candles[].revision_hashRequired in parent objectstringDefined by the resource contract.Pattern: ^[a-f0-9]{64}$
candles[].qualityRequired in parent objectarrayDefined by the resource contract.
gapsRequired in parent objectarrayDefined by the resource contract.
executableRequired in parent objectbooleanDefined by the resource contract.Values: false
externally_releasedRequired in parent objectbooleanDefined by the resource contract.Values: false
400 · HTTP 400 response
FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
401 · HTTP 401 response
FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
403 · HTTP 403 response
FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
404 · HTTP 404 response
FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
405 · HTTP 405 response
FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
429 · HTTP 429 response

Response headers: Retry-After.

FieldTypeDescription & constraints
errorRequired in parent objectstringDefined by the resource contract.
503 · HTTP 503 response
FieldTypeDescription & constraints
errorRequired 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.