---
title: "GET /v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles"
method: GET
path: "/v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles"
tags: ["Candles (v2)"]
---

# GET /v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles

`GET /v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles`

## Request

- Base URL: `https://trading-api.oanda.com` (the document declares no server; this is the origin it was published from)
- URL: `https://trading-api.oanda.com/v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oanda/apis/up-gateway-v1/docs/v2/user/accounts/:server/:accountId/instruments/:instrumentId/candles/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `server` 'oanda' | 'oanda-demo' | 'otms' | 'v20' | 'v20-demo' | 'oj' | 'oj-demo' | 'opt' | 'ftmo-1', required
- `accountId` string, required
- `instrumentId` string, required

## Query parameters

- `from` string, required
- `to` string, required
- `granularity` 'M1' | 'M5' | 'M15' | 'H1' | 'H4' | 'D1', required

## Response `200`

Success response

- object[]
  - `open` number, required
  - `close` number, required
  - `low` number, required
  - `high` number, required
  - `time` number, required
  - `complete` boolean, required
  - `volume` number, required

---

[API](https://skmtc.dev/oanda/apis/up-gateway-v1.md) - [All operations](https://skmtc.dev/oanda/apis/up-gateway-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/oanda/apis/up-gateway-v1/revisions/395d645513bf?raw)
