v1

latestSwagger 2.02026-07-132830204.5 KB
E-commerce

Convert

A currency and unit conversion tool

get/convert

Query parameters

from-valuestring required

The value to convert from (e.g. 10.95)

from-typestring required

The type of the value to convert from (e.g. USD)

to-typestring required

The type to convert to (e.g. EUR)

historical-datestring

Convert using the rate on a historical date, accepted date formats are: YYYY-MM-DD, YYYY-MM, YYYY. Historical rates are stored with daily granularity so the date format YYYY-MM-DD is preferred for the highest precision. If an invalid date or a date too far into the past is supplied then the API will respond with 'valid' as false and an empty 'historical-date'

Response

OK

validboolean required

True if the conversion was successful and produced a valid result

resultstring required

The result of the conversion in string format

from-valuestring required

The value being converted from

to-typestring required

The type being converted to

from-typestring required

The type of the value being converted from

result-floatnumber double required

The result of the conversion as a floating-point number

from-namestring required

The full name of the type being converted from

from-symbolstring required

The standard UTF-8 symbol used to represent the type being converted from

to-namestring required

The full name of the type being converted to

to-symbolstring required

The standard UTF-8 symbol used to represent the type being converted to

historical-datestring required

If a historical conversion was made using the 'historical-date' request option this will contain the exact date used for the conversion in ISO format: YYYY-MM-DD

Example response

{
  "from-name": "United States Dollar",
  "from-symbol": "$",
  "from-type": "USD",
  "from-value": "100",
  "historical-date": "",
  "result": "86.259",
  "result-float": 86.259,
  "to-name": "Euro",
  "to-symbol": "€",
  "to-type": "EUR",
  "valid": true
}