Market Data API

Retrieve quotes, depth, trades, time series and more across the exchanges available to your organisation.

At a glance

Scopemarket-data-api
Testhttps://test-market-data-api.openmarkets.com.au/
Productionhttps://market-data-api.openmarkets.com.au/
Version1.0.0

Base URLs are per API. The Market Data host does not serve the OMS, News or back office APIs, and a token issued for one scope will not authorise another. If you have been given a dedicated sandbox, the correct URL is provided to you as part of onboarding.

What's in it

AreaPurpose
ExchangesExchange information, holidays, statuses and more.
PricingQuotes, depth, time series, trades and top movers.
SecuritiesSecurity information, names and more.
System ListsLists of securities and list categories.
SessionsSession management.

Getting started

Request a token with the market-data-api scope, then list the exchanges available to you:

curl 'https://test-market-data-api.openmarkets.com.au/exchanges/information/v1' \
  -H 'Authorization: Bearer {access_token}'

From there, /pricing/quotes/v3 returns quotes for the securities you request.

Tokens come from the identity service, which is shared by every Openmarkets API:

EnvironmentToken endpoint
Testhttps://stage-identity.openmarkets.com.au/connect/token
Productionhttps://identity.openmarkets.com.au/connect/token

See Authentication for the full flow.

Conventions

All API access is sent and received as JSON, and must be requested over HTTPS. Every endpoint requires a bearer token.

Blank and null fields are omitted from requests. JSON request and response bodies use camelCase, except authorisation and authentication requests, which use snake_case to follow the OAuth2 and OpenID Connect specifications.

Parameters

MethodWhere parameters go
GET, DELETEParameters are part of the URL path or query string parameters. Each endpoint's reference states which parameters are required.
GET (large parameter sets)Endpoints that retrieve resources but take many optional parameters accept a POST instead, to avoid URL length limits.
POST, PUTParameters that are not part of the URL are JSON encoded in the request body.

Dates and times

Date-time values in responses have no UTC offset. Each field's description states whether it is exchange time or GMT:

{
    "dateTimeFieldName": "2016-12-19T16:30:00"
}

Where a time component is not relevant, the value is returned at midnight:

{
    "dateFieldName": "2016-12-19T00:00:00"
}

Plain dates should be used literally, without any timezone conversion. Converting them can shift the date by a day.

Update subscriptions

Several pricing endpoints have both a snapshot form and an /updates/ form. Call the snapshot form with the Updates header set to true, then poll the updates form with the same X-Request-ID header to receive the changes since the previous call. The codes returned when that header is wrong are listed under Request tracking errors.

Rate limits and availability

Requests are rate limited per client and per endpoint. Throttled requests return HTTP 429 with one of ApiCallsFrequencyExceeded, ActiveApiCallsExceeded or MaxUpdatesQueuedExceeded. See Errors.

Cache your access token for its full expires_in lifetime. Requesting a token per API call is the most common cause of unexpected throttling. Implement a circuit breaker with increasing delay between retries rather than retrying immediately.

This API is briefly unavailable on a regular maintenance schedule. See Known issues.

Trading reference

Exchange session behaviour affects when orders are accepted and how they are priced.

Reference

ErrorsError format, top-level codes and parameter-level codes.