Data retrieval is performed via standard Web Requests (HTTP GET).
URL Part Description (see table below for more information of each):
All request for data begin with following Base Url followed by a combination of the URL parameters described in the Table below.
Basic Usage
In all of the following examples please replace APP_ID with your own "App ID".Example 1: Get a list of Symbols
The following example URL retrieves a complete list of ISO symbols (Currency and/or Metals) available in your account./symbols/APP_ID
Example 2: Get a list of Intervals
The following example URL retrieves a complete list of Intervals (OHLC Time scales) available in your account./intervals/APP_ID
Example 3: Get a Currency Conversion
The following example URL retrieves a live Currency Conversion using the latest market pricing. This conversion request converts 999 EUR to USD./convert/APP_ID/999/EUR/USD
URL Part Description (see table below for more information of each):
/convert/APP_ID/CONVERT_VALUE/CONVERT_FROM/CONVERT_TO
Example 4: Get the current Bid/Ask Prices
The following example URL retrieves the current Bid/Ask (Tick) in CSV format for the EUR/USD and GBP/USD currency pairs:/data/APP_ID/i-1/s-EURUSD,GBPUSD
Example 5: Get the current 5-min Open, High, Low, Close (OHLC) Quote
The following example URL retrieves the current 5-min Open, High, Low, Close (OHLC) quote in CSV format for the EUR/USD currency pair:/data/APP_ID/i-300/s-EURUSD
Example 6: Get the past 24 hours of OHLC quotes in XML format
The following example URL retrieves the past twentyfour hours of 1-hour OHLC quotes in XML format for the EUR/USD, USD/GBP, USD/CHF and USD/JPY currency pairs. A total of 96 quotes are returned (twentyfour 1-hour OHLC quotes for each of the four symbols)/data/APP_ID/n-24/f-xml/i-3600/s-EURUSD,USDGBP,USDCHF,USDJPY
Example 7: Get the past 30 days of OHLC quotes in CSV format
The following example URL retrieves the past thirty Daily OHLC quotes in CSV format for the EUR/USD, XAU/USD Currency & Gold pairs. A total of 60 quotes are returned (thirty 1-Day OHLC quotes for each of the two symbols)/data/APP_ID/n-30/f-csv/i-86400/s-EURUSD,XAUUSD
Advanced Data Retrieval
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)
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. 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 further separated by a comma (,).
Variable name | Default value | Allowed values | Description |
---|---|---|---|
f | csv | csv, xml, json |
Data Output Format csv = Comma Separated Values xml = Extensible Markup Language json = JavaScript Object Notation |
n | 1 | numeric |
Number of Data Points / Periods 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 | none |
1 5 10 15 30 45 60 300 600 900 1200 1800 2700 3600 7200 10800 14400 21600 43200 86400 604800 2628000 |
Data Interval 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 | mid | mid bid ask bid,ask |
Price Type OHLC options: mid, bid, or ask Tick options: mid or bid,ask |
sep | comma (,) | User defined |
Column Separator This parameter allows you to change the default column separator (applicable to CSV data format only) |
eol | LF | LF CRLF CR |
Line Ending / End Of Line 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 | Epoch timestamp |
epoch ymd ymdh ymdhm ymdhms mmddyyyyhhmm mmddyyyyhhmmss |
Date/Timestamp Formatting 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 | 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 | D | Y, N, D | Include Weekend Data: Y: Yes N: No D: Default |
s | none |
AUDCAD, AUDCHF, AUDCNY, AUDCZK, AUDDKK, AUDEUR, AUDGBP, AUDHKD, AUDHUF, AUDINR, AUDJPY, AUDMXN, AUDNOK, AUDNZD, AUDPLN, AUDSAR, AUDSEK, AUDSGD, AUDTHB, AUDTRY, AUDTWD, AUDUSD, AUDXAG, AUDXAU, AUDZAR, CADAUD, CADCHF, CADCNY, CADCZK, CADDKK, CADEUR, CADGBP, CADHKD, CADHUF, CADINR, CADJPY, CADMXN, CADNOK, CADNZD, CADPLN, CADSAR, CADSEK, CADSGD, CADTHB, CADTRY, CADTWD, CADUSD, CADXAG, CADXAU, CADZAR, CHFAUD, CHFCAD, CHFCNY, CHFCZK, CHFDKK, CHFEUR, CHFGBP, CHFHKD, CHFHUF, CHFINR, CHFJPY, CHFMXN, CHFNOK, CHFNZD, CHFPLN, CHFSAR, CHFSEK, CHFSGD, CHFTHB, CHFTRY, CHFTWD, CHFUSD, CHFXAG, CHFXAU, CHFZAR, CNYAUD, CNYCAD, CNYCHF, CNYEUR, CNYGBP, CNYHKD, CNYJPY, CNYSGD, CNYUSD, CZKAUD, CZKCAD, CZKCHF, CZKEUR, CZKGBP, CZKHKD, CZKJPY, CZKSGD, CZKUSD, DKKAUD, DKKCAD, DKKCHF, DKKEUR, DKKGBP, DKKHKD, DKKJPY, DKKSGD, DKKUSD, EURAUD, EURCAD, EURCHF, EURCNY, EURCZK, EURDKK, EURGBP, EURHKD, EURHUF, EURINR, EURJPY, EURMXN, EURNOK, EURNZD, EURPLN, EURSAR, EURSEK, EURSGD, EURTHB, EURTRY, EURTWD, EURUSD, EURXAG, EURXAU, EURZAR, GBPAUD, GBPCAD, GBPCHF, GBPCNY, GBPCZK, GBPDKK, GBPEUR, GBPHKD, GBPHUF, GBPINR, GBPJPY, GBPMXN, GBPNOK, GBPNZD, GBPPLN, GBPSAR, GBPSEK, GBPSGD, GBPTHB, GBPTRY, GBPTWD, GBPUSD, GBPXAG, GBPXAU, GBPZAR, HKDAUD, HKDCAD, HKDCHF, HKDCNY, HKDCZK, HKDDKK, HKDEUR, HKDGBP, HKDHUF, HKDINR, HKDJPY, HKDMXN, HKDNOK, HKDNZD, HKDPLN, HKDSAR, HKDSEK, HKDSGD, HKDTHB, HKDTRY, HKDTWD, HKDUSD, HKDXAG, HKDXAU, HKDZAR, HUFAUD, HUFCAD, HUFCHF, HUFEUR, HUFGBP, HUFHKD, HUFJPY, HUFSGD, HUFUSD, INRAUD, INRCAD, INRCHF, INREUR, INRGBP, INRHKD, INRJPY, INRSGD, INRUSD, JPYAUD, JPYCAD, JPYCHF, JPYCNY, JPYCZK, JPYDKK, JPYEUR, JPYGBP, JPYHKD, JPYHUF, JPYINR, JPYMXN, JPYNOK, JPYNZD, JPYPLN, JPYSAR, JPYSEK, JPYSGD, JPYTHB, JPYTRY, JPYTWD, JPYUSD, JPYXAG, JPYXAU, JPYZAR, MXNAUD, MXNCAD, MXNCHF, MXNEUR, MXNGBP, MXNHKD, MXNJPY, MXNSGD, MXNUSD, NOKAUD, NOKCAD, NOKCHF, NOKEUR, NOKGBP, NOKHKD, NOKJPY, NOKSGD, NOKUSD, NZDAUD, NZDCAD, NZDCHF, NZDEUR, NZDGBP, NZDHKD, NZDJPY, NZDSGD, NZDUSD, NZDXAG, NZDXAU, PLNAUD, PLNCAD, PLNCHF, PLNEUR, PLNGBP, PLNHKD, PLNJPY, PLNSGD, PLNUSD, SARAUD, SARCAD, SARCHF, SAREUR, SARGBP, SARHKD, SARJPY, SARSGD, SARUSD, SEKAUD, SEKCAD, SEKCHF, SEKEUR, SEKGBP, SEKHKD, SEKJPY, SEKSGD, SEKUSD, SGDAUD, SGDCAD, SGDCHF, SGDCNY, SGDCZK, SGDDKK, SGDEUR, SGDGBP, SGDHKD, SGDHUF, SGDINR, SGDJPY, SGDMXN, SGDNOK, SGDNZD, SGDPLN, SGDSAR, SGDSEK, SGDTHB, SGDTRY, SGDTWD, SGDUSD, SGDXAG, SGDXAU, SGDZAR, THBAUD, THBCAD, THBCHF, THBEUR, THBGBP, THBHKD, THBJPY, THBSGD, THBUSD, TRYAUD, TRYCAD, TRYCHF, TRYEUR, TRYGBP, TRYHKD, TRYJPY, TRYSGD, TRYUSD, TWDAUD, TWDCAD, TWDCHF, TWDEUR, TWDGBP, TWDHKD, TWDJPY, TWDSGD, TWDUSD, USDAUD, USDCAD, USDCHF, USDCNY, USDCZK, USDDKK, USDEUR, USDGBP, USDHKD, USDHUF, USDINR, USDJPY, USDMXN, USDNOK, USDNZD, USDPLN, USDSAR, USDSEK, USDSGD, USDTHB, USDTRY, USDTWD, USDXAG, USDXAU, USDXPT, USDZAR, XAGAUD, XAGCAD, XAGCHF, XAGEUR, XAGGBP, XAGHKD, XAGJPY, XAGNZD, XAGSGD, XAGUSD, XAGXAU, XAUAUD, XAUCAD, XAUCHF, XAUEUR, XAUGBP, XAUHKD, XAUJPY, XAUNZD, XAUSGD, XAUUSD, XAUXAG, XPTUSD, ZARAUD, ZARCAD, ZARCHF, ZAREUR, ZARGBP, ZARHKD, ZARJPY, ZARSGD, ZARUSD, |
Data Symbol(s) One or more currency symbols (separated by a comma). For a current list, please click here. SYMBOL, DECIMALS AUD/CAD, 5 AUD/CHF, 5 AUD/CNY, 4 AUD/CZK, 4 AUD/DKK, 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