Skip to main content
GET
/
fx
/
ohlc
/
time-series
cURL
curl --request GET \
  --url 'https://api.fastforex.io/fx/ohlc/time-series?api_key='
{
  "pair": "EURUSD",
  "interval": "P1D",
  "limit": 3,
  "dtmfmt": "ISO",
  "end": "2021-01-26T00:00:00Z",
  "tzOffset": "+00:00",
  "size": 1,
  "results": [
    {
      "dtm": "2021-01-24T00:00:00Z",
      "o": 1.2145,
      "h": 1.2156,
      "l": 1.2134,
      "c": 1.2142
    },
    {
      "dtm": "2021-01-25T00:00:00Z",
      "o": 1.2142,
      "h": 1.2157,
      "l": 1.2139,
      "c": 1.2149
    },
    {
      "dtm": "2021-01-26T00:00:00Z",
      "o": 1.2149,
      "h": 1.2158,
      "l": 1.2137,
      "c": 1.2145
    }
  ],
  "ms": 8
}

Authorizations

api_key
string
query
required

Query Parameters

pair
string
required

Trading pair, such as EURUSD A single FX trading pair, with or without a slash

Pattern: [A-Z0-9]{3,6}/?[A-Z0-9]{3,6}
start

Time-series start. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or end. A datetime value. If no timezone offset supplied, UTC/GMT is assumed. If only a date is supplied, time is assumed to be 00:00:00 UTC.

Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}
end

Time-series end. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or start. A datetime value. If no timezone offset supplied, UTC/GMT is assumed. If only a date is supplied, time is assumed to be 00:00:00 UTC.

Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}
dtmfmt
enum<string>

Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC).

Available options:
ISO,
TSP,
UTCYMD
interval
string

ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M. ISO8601 Duration. https://en.wikipedia.org/wiki/ISO_8601#Durations

limit
number<int32>

Maximum number of data points to return. Default varies upon duration.

Required range: 1 <= x <= 100

Response

Success

pair
string

A single FX trading pair, with or without a slash

Pattern: [A-Z0-9]{3,6}/?[A-Z0-9]{3,6}
limit
number<int32>
dtmfmt
enum<string>

Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC).

Available options:
ISO,
TSP,
UTCYMD
start

A datetime value. If no timezone offset supplied, UTC/GMT is assumed.

Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
end

A datetime value. If no timezone offset supplied, UTC/GMT is assumed.

Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
tzOffset
string

Timezone offset. e.g. +00:00 or -05:00

size
number<int32>

Size of the quote is units of the base currency/symbol. Usually 1.

results
object[]
ms
number<int32>

Server response time in milliseconds