bars

OHLCV bar history — cursor-paginated, real data, is_closed label

Paginated OHLCV bar history from the canonical price_bars store.

Results are ordered DESC by bar_start (newest first). Paginate via next_cursor — pass it as ?cursor= on the next request. When next_cursor is null the result is exhausted. Empty range returns 200 with bars: [].

Tier depth gates:

  • Free: 30 days
  • Basic: 1 year
  • Pro+: full history (daily back to 1996 for XAU/USD; intraday from 2006)

Intraday intervals (1m, 5m, 15m, 30m, 1h, 2h, 4h) require Pro+.

get/v1/bars

Query parameters

symbolstring required

Symbol in slash or dash form. E.g. "XAU/USD", "XAU-USD-SPOT", "GLD".

Symbol in slash or dash form. E.g. "XAU/USD", "XAU-USD-SPOT", "GLD".

intervalstring

Bar interval. One of: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d.

Bar interval. One of: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d.

fromstring required

ISO-8601 start (inclusive).

ISO-8601 start (inclusive).

tostring required

ISO-8601 end (inclusive).

ISO-8601 end (inclusive).

limitinteger

Max bars per page (1-10000). Default 100.

Max bars per page (1-10000). Default 100.

cursorstring nullable

Opaque keyset pagination cursor from a prior response's next_cursor. When set, returns bars older than the cursor within the from/to window.

Opaque keyset pagination cursor from a prior response's next_cursor. When set, returns bars older than the cursor within the from/to window.

Response

Successful Response

symbolstring required

The requested symbol (e.g. 'XAU/USD', 'GLD').

intervalstring required

The requested interval (e.g. '1d', '15m').

next_cursorstring nullable

Opaque cursor for the next page. Pass as ?cursor= on the next request. Null when the result is exhausted. Encoding: base64url of the bar_start_utc ISO-8601 string of the last bar in this page.

Changes

Changed in 1 of the 7 revisions of this API.1216

  • b7c4b36e1fa11216See the full diff
    • the response property message became optional for the status 400

      response-property-became-optional

    • the response property message became optional for the status 401

      response-property-became-optional

    • the response property message became optional for the status 403

      response-property-became-optional

    • the response property message became optional for the status 404

      response-property-became-optional

    • the response property message became optional for the status 429

      response-property-became-optional

    • the response property message became optional for the status 503

      response-property-became-optional

    • response property message list-of-types was widened by adding types null to media type application/json of response 400

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 401

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 403

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 404

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 429

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 503

      response-property-list-of-types-widened

    • removed the optional property detail from the response with the 422 status

      response-optional-property-removed

    • the endpoint scheme security ApiKeyAuth was added to the API

      api-security-added

    • the endpoint scheme security BearerAuth was added to the API

      api-security-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • added the required property details to the response with the 422 status

      response-required-property-added

    • added the required property error to the response with the 422 status

      response-required-property-added

    • added the required property message to the response with the 422 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog