Currencies


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

GET /v1/currencies.:output_format
  • :output_format – The serialization format of the output
    • format: (string) One of json, xml, or csv
    • REQUIRED
    • See API Endpoints

Input Query Parameters

data_set – (optional) Which dataset to query

  • format: (string) – OANDA or one of the supported central bank codes (see API Endpoints for complete list)
  • default: OANDA
  • example: Request the currency list of European Central Bank
    • curl -X GET "https://web-services.oanda.com/rates/api/v1/currencies.json?data_set=EUCB"

Responses

JSON

Request:

GET /v1/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 /v1/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 /v1/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