Skip to content

Work in progress

This documentation page is currently work in progress.
Not all existing DecAPI endpoints are documented here yet. For the currently active documentation, please visit docs.decapi.me.

Convert currency

Convert currency from one currency to another.
Currency rates are cached for up to 24 hours, so don't expect the precise latest rates.

Regular currencies follow the ISO 4217 standard.
Some cryptocurrencies are also supported.

You can see a list of supported currencies/cryptocurrencies here: https://decapi.me/misc/currency?list

Endpoint URL

https://decapi.me/misc/currency?from=EUR&to=NOK&value=1

Query parameters

  • from - Required - The currency to convert from.
  • to - Required - The currency to convert to.
  • value - Required - The amount of from you wish to convert.
  • round - Optional - Round to the specified number of decimal places.
    • If specified with 0 or below, or with no value, the result will be rounded to the nearest whole number.
  • list - Optional - If specified, will return a list of supported currencies.
    • ⚠ This will prevent any other parameters from being used. Only use this parameter by itself when you wish to see what currencies are available.

Examples

Examples for bots

Nightbot

Note: Nightbot will automatically convert variables, such as $(channel) or $(touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.

Fossabot

Note: Fossabot will automatically convert variables, such as $(channel) or $(user.login) to the correct channel name / username, when the command is used.
You do not have to change those variables.

StreamElements

Note: StreamElements will automatically convert variables, such as ${channel} or ${touser} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Chat Bot

Note: Streamlabs Chat Bot will automatically convert variables, such as $mychannel or $touserid to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Cloudbot

Note: Streamlabs Cloudbot will automatically convert variables, such as {channel.name} or {touser.name} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Deepbot

Note: Deepbot will automatically convert variables, such as @stream@ or @user@ to the correct channel name / username, when the command is used.
You do not have to change those variables.

PhantomBot

Note: PhantomBot will automatically convert variables, such as (channelname) or (touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.