API Endpoint
Currency Conversion
Convert amount from one currency to another using exchange rate.
Endpoint
Also supports GET with query parameters.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
amount | number | — | Amount in source currency |
exchangeRate | number | — | Exchange rate (target per source) |
Request Examples
POST (JSON body)
curl -X POST https://likeoptions.com/api/v1/calculate/currency \
-H "Content-Type: application/json" \
-d '{"amount": 100000, "exchangeRate": 50000}'GET (query parameters)
curl "https://likeoptions.com/api/v1/calculate/currency?amount=100000&exchangeRate=50000"Response
{
"kind": "currency",
"result": {
"primary": 1234.56,
"secondary": [
{ "label": "Example metric", "value": 100, "format": "money" },
{ "label": "Example percent", "value": 5.5, "format": "percent" }
]
}
}When to Use
- Convert currency amounts
- Compare international prices
- Budget for travel
Error Handling
- 400 Bad Request — Invalid input parameters or missing required fields
- 404 Not Found — Unknown calculator kind
- 429 Too Many Requests — Rate limit exceeded (120 req/hour per IP)
- 413 Payload Too Large — Request body exceeds 16 KB
Related Endpoints
View request examples in JavaScript, Python, cURL, and more →
Inflation, currency and percentage change
- Inflation calculatorCalculator
- Currency converterCalculator
- Percentage change calculatorCalculator
- Percentage difference calculatorCalculator
- Inflation and purchasing powerGuide