Skip to main content
POST
/
currencies
/
convert
Convert Between Currencies
curl --request POST \
  --url https://v1.api.flux-os.com/currencies/convert \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-user-id: <api-key>' \
  --data '
{
  "value": 123,
  "from_currency": "<string>",
  "to_currency": "<string>"
}
'
{
  "data": {
    "from": {
      "value": 123,
      "currency": {
        "name": "<string>",
        "symbol": "<string>",
        "id": "<string>"
      }
    },
    "to": {
      "value": 123,
      "currency": {
        "name": "<string>",
        "symbol": "<string>",
        "id": "<string>"
      }
    },
    "conversion": {
      "exchange_rate": 123,
      "id": "<string>",
      "from_currency": 123,
      "to_currency": 123,
      "updated_at": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

x-api-key
string
header
required
x-user-id
string
header
required

Body

application/json
value
number
required

The value to convert

from_currency
string
required

The symbol of the currency to convert from

to_currency
string
required

The symbol of the currency to convert to

Response

The converted value and exchange rate between the two currencies.

data
object