Web Services API Parameters

The table below describes various data retrieval parameters and their purpose.


All request for data begin with following Base Url followed by a combination of the URL parameters described in the Table below.
/data/APP_ID/ ...(additional URL parameters)

Defining the Parameters in your Request URL

  • Parameters are passed in as URL Parts (separated by a forward slash /).
  • Each Parameter must be accompanied by a Value.
  • Each Parameter and it's Value are separated by a hyphen (-).
  • Parameters that accept multiple values (such a s) have their Values separated by a comma (,).

Note that not every parameter is required at all times. Many parameters have a Default Value, where if a value is not provided (by you) then the Default Value will be applied.


URL Parameter Parameter Purpose Default value Allowed values Description
f Data Output Format csv csv, xml, json csv = Comma Separated Values
xml = Extensible Markup Language
json = JavaScript Object Notation
n Number of Data Points / Periods 1 numeric The number of periods to retrieve. For example, if you fetch 1 minute data and 30 periods then you would receive a 30 count of 1-minute OHLC bars
i Data Interval none 1
5
10
15
30
45

60
300
600
900
1200
1800
2700

3600
7200
10800
14400
21600
43200

86400
604800
2628000
1 = Tick data (for Bid/Ask or Mid quotes)
5 = 5 Second data (OHLC)
10 = 10 Second data (OHLC)
15 = 15 Second data (OHLC)
30 = 30 Second data (OHLC)
45 = 45 Second data (OHLC)

60 = 1 Minute data (OHLC)
300 = 5 Minute data (OHLC)
600 = 10 Minute data (OHLC)
900 = 15 Minute data (OHLC)
1200 = 20 Minute data (OHLC)
1800 = 30 Minute data (OHLC)
2700 = 45 Minute data (OHLC)

3600 = 1 Hour data (OHLC)
7200 = 2 Hour data (OHLC)
10800 = 3 Hour data (OHLC)
14400 = 4 Hour data (OHLC)
21600 = 6 Hour data (OHLC)
43200 = 12 Hour data (OHLC)

86400 = 1 Day/Daily data (OHLC)
604800 = 1 Week/Monthly data (OHLC)
2628000 = 1 Month/Monthly data (OHLC)
p Price Type mid mid
bid
ask
bid,ask
OHLC options: mid, bid, or ask
Tick options: mid or bid,ask
sep Column Separator comma (,) User defined This parameter allows you to change the default column separator (applicable to CSV data format only)
eol Line Ending / End Of Line LF LF
CRLF
CR
This parameter allows you to change the default line ending.
Unix programs might expect a Line Feed: "LF" (\n)
Mac programs might expect a Carriage Return: "CR" (\r)
Windows programs might expect a Carriage Return Line Feed: "CRLF" (\r\n)
df Date/Timestamp Formatting Epoch timestamp epoch
ymd
ymdh
ymdhm
ymdhms
mmddyyyyhhmm
mmddyyyyhhmmss
epoch: Seconds since Jan, 1 1970
ymd: YYYY-MM-DD
ymdh: YYYY-MM-DD HH
ymdhm: YYYY-MM-DD HH:MM
ymdhms: YYYY-MM-DD HH:MM:SS
mmddyyyyhhmm: MM/DD/YYYY HH:MM
mmddyyyyhhmmss: MM/DD/YYYY HH:MM:SS
All date are in UTC / GMT time
st Start Time none epoch The requested Starting Time of data. The Starting Time is expressed as an Epoch timestamp representing the earliest date you wish to load. The number of data points will then be limited by the requested Number of Data Points.
NOTE: Historical data services must be enabled on your service in order to use the load by Start Time function. * Only one Symol per request will be included when retrieving Historic Data by Start Time.
wd Include Weekend Data D Y, N, D Y: Yes
N: No
D: Default
s Data Symbol(s) none

AUDUSD
EURUSD
GBPUSD
XAGCAD
XAUUSD
XAUXAG
XBTUSD
...
One or more currency symbols (separated by a comma).
SYMBOL, DECIMALS
AUD/USD, 5
EUR/USD, 5
GBP/USD, 5
XAG/CAD, 5
XAU/USD, 3
XAU/XAG, 3
XBT/USD, 3
...
For current Symbol Coverage, please click here.