Endpoints

Each API endpoint has the following format:

https://web-services.oanda.com/rates/api/v1/:endpoint.:output_format

OR for the Rates endpoint and Currencies endpoint:

https://web-services.oanda.com/rates/api/v1/rates/:base_currency.:output_format[?parameter=value…]

output_format

The :output_format parameter determines how information is returned. It can take on one of the following values:

  • json – Javascript Object Notation
    • All real numbers in JSON responses are returned as strings to prevent JSON parsers from damaging the precision of the quotes.
  • xml – Well-formed XML document
  • csv – Comma Separated Values
    • Can be imported into most spreadsheet and financial applications
    • Note that CSV format provides standard Unix-like line endings (Unix, Linux, *BSD, MacOS > 9 among others) via an LF character (hex: 0x0A; dec: 10)
    • Due to the limitations of this format, it will often not return as much information as is available in other serializations formats; particularly the metadata associated with the request

data_set

For Rates endpoint and Currencies endpoint, the data_set parameter determines which data set to query. It can take one of the following values depending on your plan:

  • OANDA – The original and default OANDA rate
  • EUCB – The European Central Bank rate
  • ALCB – The Bank of Albania rate
  • ANCB – The Central Bank of Curacao and Sint Maarten rate
  • AUCB – The Reserve Bank of Australia rate
  • BGCB – The Bulgarian National Bank rate
  • BRCB – The Banco Central do Brasil rate
  • CACB – The Bank of Canada rate
  • CZCB – The Czech National Bank rate
  • DKCB – The Denmarks National Bank rate
  • GHCB – The Bank of Ghana rate
  • GYCB – The Bank Of Guyana rate
  • HKCB – The Treasury Market Association, Hong Kong rate
  • HRCB – The Croatian National Bank rate
  • HUCB – The Hungarian National Bank rate
  • IDCB – The Bank of Indonesia rate
  • INCB – The Reserve Bank of India rate
  • ISCB – The Central Bank of Iceland rate
  • MXCB – The Banco de Mexico rate
  • MYCB – The Bank Negara Malaysia rate
  • NOCB – The Norges Bank rate
  • PKCB – The State Bank of Pakistan rate
  • PLCB – The Narodowy Bank Polski rate
  • RSCB – The National Bank of Serbia rate
  • VECB-DICOM – The Banco Central de Venezuela rate
  • VNCB – The State Bank of Vietnam rate

NOTE: Central Bank rates are available for our Advanced and Custom Plan. For more information, or to upgrade your subscription plan, please contact us at fxdata@oanda.com.

NOTE: All examples in the endpoint documentation omit authentication, though they do require it.