bars

Latest bar for a symbol+interval — the most-recent settled or forming bar

Changed on

Return the single most-recent bar for a symbol+interval.

Ordered by bar_start DESC, returns the first row. Provisional (forming) bars are returned with is_closed=False. Empty → 200 with bar: null, never 404. No tier gate on this endpoint (latest bar is the lightest read; depth-gating only applies to ranges).

get/v1/bars/latest

Request

  • Base URL
    https://api.goldprice.dev
  • URL
    https://api.goldprice.dev/v1/bars/latest
  • Auth
    • none
    • or HTTP bearer
    • or API key in header X-API-Key

Query parameters

symbolstring required

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

intervalstring

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

Response

Successful Response

symbolstring required
intervalstring required

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

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

    • breaking

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

    • breaking

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

    • breaking

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

    • breaking

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

    • warning

      removed the optional property from the response with the status

    • info

      the endpoint scheme security ApiKeyAuth was added to the API

    • info

      the endpoint scheme security BearerAuth was added to the API

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status