Candles (v4)

Get historical candle data for a specific instrument

Retrieves historical candle data for a specific instrument.

get/v4/user/accounts/{server}/{accountId}/candles/{instrumentId}

Request

Path parameters

server'oanda' | 'oanda-demo' | 'otms' | 'v20' | 'v20-demo' | 'oj' | 'oj-demo' | 'opt' | 'ftmo-1' required

Account trading server.

accountIdstring required

The user's account identifier.

instrumentIdstring required

Requested Instrument ID

Query parameters

fromstring

UTC timestamp in milliseconds. Required if countBack is not provided.

tostring required

UTC timestamp in miliseconds

granularity'M1' | 'M5' | 'M15' | 'H1' | 'H4' | 'D1' required
countBackinteger

Number of candles to return ending at the 'to' timestamp. Takes precedence over 'from' when both are provided. Only supported for v20/v20-demo servers.

Response

Success response

Changes

No recorded changes to this operation across all 1 revision of this API.