Skip to main content
GET
/
v1
/
rates
Get exchange rate for currency pair
curl --request GET \
  --url https://api.railsfromthecrypt.com/v1/rates \
  --header 'x-api-key: <x-api-key>'
{
  "message": "Rate retrieved successfully",
  "data": {
    "fromCurrency": "NGN",
    "toCurrency": "USDT",
    "rate": "1560.63",
    "status": "live",
    "timestamp": "2024-01-01T00:00:00.000Z"
  }
}
Retrieve exchange rates between different currencies (fiat and crypto).
Important: The fromCurrency and toCurrency must be of opposite types (one fiat, one crypto). For example: NGN to USDT, USD to BTC, etc.

Headers

x-api-key
string
required

API key for authentication

Query Parameters

fromCurrency
enum<string>
required

Source currency (fiat or crypto)

Available options:
NGN,
GHS,
KES,
ZAR,
USD,
EUR,
GBP,
USDC,
USDT
toCurrency
enum<string>
required

Target currency (opposite type of fromCurrency)

Available options:
NGN,
GHS,
KES,
ZAR,
USD,
EUR,
GBP,
USDC,
USDT

Response

Rate retrieved successfully

message
string
required
Example:

"Rate retrieved successfully"

data
object
required