sifting/io
GET/v1/convert/:from/:to

FX / Crypto Converter

Convert any amount between supported forex and crypto symbols at the current market rate. Returns the converted amount, the rate applied, and the timestamp of the underlying market price so clients can see how fresh the conversion is.

Format
JSON

Example

request · shell
curl -H "X-API-Key: $KEY" \
  "https://api.sifting.io/v1/convert/USD/GBP?amount=100"
200OKapplication/json
{  "from": "USD",  "to": "GBP",  "amount": 100,  "rate": 0.78912,  "result": 78.912,  "t": 1733256123000}
Loading runner…
First load only

Parameters

Parameter
fromrequiredstring · path
The currency or token you're converting from (e.g. USD, EUR, BTC, ETH). Case-insensitive.
torequiredstring · path
The currency or token you want to receive (e.g. GBP, JPY, BTC, ETH). Case-insensitive.
amountnumber · query
How much you want to convert. Defaults to 1 when omitted, useful for fetching just the rate.

Response fields

Field
fromstring
Echo of the source symbol.
tostring
Echo of the target symbol.
amountnumber
Amount you sent in.
ratenumber
Rate applied. amount × rate = result.
resultnumber
Your converted amount. Usually the only number you need.
tint64 (epoch ms)
Timestamp of the underlying market rate, Unix epoch milliseconds.

Reference

What it's for
Localised prices
Show your customers prices in their own currency without maintaining your own FX feed.
Cross-asset checkout
Power flows like 'pay $50 worth of USDC' without bolting on a separate pricing service.
Portfolio dashboards
Normalise multi-asset holdings to a single display currency.
Spot quotes
Quick valuations and rate look-ups inside trading and analytics tools.
Reference rates
Anywhere you'd otherwise hardcode a stale exchange rate.
Good to know
Rates are live
Each request reads the most recent market price. Identical requests minutes apart can return slightly different numbers, that's the market moving, not us.
Same asset
Converting an asset to itself returns the original amount with rate 1. USD to USD always returns rate 1.
Case-insensitive
usd, USD, and Usd all resolve identically.
Market trade price
Rates use the trade price from our live feed. No fees, no spreads, no slippage, useful for display and reference, not for executing trades.

Error responses

  • 404pair_not_found

    At least one of the symbols isn't in our live feed. Double-check spelling, or pick a more common quote currency (USD, USDC, EUR).

    {  "error": "pair_not_found",  "message": "No live rate available for this pair."}