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
GETRequired parameters form part of the URL path. Optional parameters are query string parameters.
GET (large parameter sets)Endpoints that retrieve resources but take many optional parameters accept a POST instead, to avoid URL length limits.
POST, PUT, DELETEParameters that are not part of the URL are JSON encoded in the request body.

Dates and times

Date-time values are RFC 3339 date-time, and are usually provided in UTC. This example represents 19 December 2016 at 4:30pm Sydney daylight saving time:

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

Where a time component is not relevant, the value is an RFC 3339 full-date:

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

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. The updates form is polled with an X-Request-ID header that identifies your subscription. The codes returned when that header is wrong are listed under Request tracking errors.

Rate limits and availability

Requests are rate limited according to the package or plan chosen when your application was registered. 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.