Currencies

Use the Currencies endpoint to get a list of valid three-character currency codes for use in the Rates endpoints.

GET /v2/currencies.:output_format[?data_set=:data_set]

output_format

The :output_format URL part determines how information is returned. It can be 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, only quotes will be returned, and metadata will be excluded from the output

data_set

The data_set parameter is optional and determines which type of rates to retrieve currencies for. The endpoint defaults to returning OANDA currencies if not specified. The following data_set values are supported:

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

NOTE: Access to Central Bank rates may require an account upgrade. contact our Customer Experience Team at fxdata@oanda.com to confirm your subscription details.

Examples

NOTE: All examples omit authentication, though they do require it.

JSON

Request:

GET /v2/currencies.json

Response headers & body:

1
2
HTTP/1.1 200 OK
Content-Type: application/json
1
2
3
4
5
6
7
8
9
10
11
12
{
   "currencies" : [
      {
         "code" : "ADF",
         "description" : "Andorran Franc"
      },
      {
         "code" : "ADP",
         "description" : "Andorran Peseta"
      },
      ...
}

XML

Request:

GET /v2/currencies.xml

Response headers & body:

1
2
HTTP/1.1 200 OK
Content-Type: application/xml
1
2
3
4
5
6
7
8
9
10
11
12
13
<response>
  <currencies>
    <currency>
      <code>ADF</code>
      <description>Andorran Franc</description>
    </currency>
    <currency>
      <code>ADP</code>
      <description>Andorran Peseta</description>
    </currency>
    ...
  </currencies>
</response>

CSV

Request:

GET /v2/currencies.csv

Response headers & body:

1
2
HTTP/1.1 200 OK
Content-Type: text/plain
1
2
3
4
currency,description
ADF,"Andorran Franc"
ADP,"Andorran Peseta"
...

Response Fields

currencies – (JSON | XML) The container for all currencies

currency – (CSV) The currency code

code – (JSON | XML) The currency code

description – (ALL) A description of the currency code