Currencies

Retrieve information about world currencies, including ISO codes, symbols, and decimal precision.

Standards Used

  • ISO 4217
  • ISO 3166-1

Minor Units#

The minor_units field indicates decimal places. It is null for non-decimal currencies like XAU (gold) or XBT (Bitcoin) where decimal subdivision doesn't apply.

The Currency object#

FieldTypeRequiredDescription
codestringYesISO 4217 alphabetic code.
Example: USD
countriesstring[]YesCountries using this currency (alpha-2 codes).
Example: ["US","EC","SV"]
minor_unitsinteger | null (int32)NoDecimal places (minor units).
Example: 2
namestringYesCurrency name.
Example: United States dollar
numericinteger (int32)YesISO 4217 numeric code.
Example: 840
symbolstringNoCommon currency symbol.
Example: $

Endpoints#

Query Parameters

ParameterTypeRequiredDescription
pagequeryintegerNoPage number (1-indexed).
Example: 1
per_pagequeryintegerNoNumber of results per page (1-100).
Example: 20

Response

FieldTypeRequiredDescription
dataobject[]YesThe data items for this page.
paginationobjectYes Pagination metadata in response.
pageintegerYesCurrent page number.
Example: 1
per_pageintegerYesItems per page.
Example: 20
total_itemsintegerYesTotal number of items.
Example: 100
total_pagesintegerYesTotal number of pages.
Example: 5

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/currencies?page=1&per_page=20',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
429Rate limit exceeded

Path Parameters

ParameterTypeRequiredDescription
identifierpathstringYesCurrency code (alphabetic or numeric) or name

Response

FieldTypeRequiredDescription
codestringYesISO 4217 alphabetic code.
Example: USD
countriesstring[]YesCountries using this currency (alpha-2 codes).
Example: ["US","EC","SV"]
minor_unitsinteger | null (int32)NoDecimal places (minor units).
Example: 2
namestringYesCurrency name.
Example: United States dollar
numericinteger (int32)YesISO 4217 numeric code.
Example: 840
symbolstringNoCommon currency symbol.
Example: $

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/currencies/example',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
404Currency not found