@year 2026 -->

Currency Exchange API Documentation

Complete guide to integrate real-time currency exchange rates into your applications

Introduction

The RSK World Currency Exchange API provides real-time and historical exchange rate data for over 160 currencies worldwide.

Real-time Rates
Get up-to-date exchange rates updated every minute
Historical Data
Access exchange rates for any date in the past
Currency Conversion
Convert amounts between any supported currencies
160+ Currencies
Support for major and exotic currencies worldwide

Getting Started

Base URL: https://your-domain.com/currency-exchange-api/

Quick Start

Start using the API in just a few simple steps:

  1. Make a GET request to any endpoint
  2. Receive JSON response with exchange rate data
  3. Integrate the data into your application
fetch('https://your-domain.com/currency-exchange-api/api.php?endpoint=latest&base=USD')
  .then(response => response.json())
  .then(data => console.log(data));

API Endpoints

Latest Exchange Rates

GET /api.php?endpoint=latest&base={currency}

Get the latest exchange rates for a specific base currency.

Parameters

Parameter Type Required Description
base String No Base currency code (default: USD)
pretty Boolean No Return pretty-printed JSON (default: false)
Example Response:
{
  "status": "success",
  "message": "Latest rates retrieved successfully",
  "timestamp": 1234567890,
  "api_version": "1.0.0",
  "provider": "RSK World Currency Exchange API",
  "website": "https://rskworld.in",
  "data": {
    "base": "USD",
    "timestamp": 1234567890,
    "rates": {
      "EUR": 0.85,
      "GBP": 0.73,
      "JPY": 110.25,
      "AUD": 1.35
    }
  }
}

Currency Conversion

GET /api.php?endpoint=convert&from={currency}&to={currency}&amount={number}

Convert a specific amount from one currency to another.

Parameters

Parameter Type Required Description
from String Yes Source currency code
to String Yes Target currency code
amount Number Yes Amount to convert
Example Response:
{
  "status": "success",
  "message": "Currency converted successfully",
  "timestamp": 1234567890,
  "api_version": "1.0.0",
  "provider": "RSK World Currency Exchange API",
  "website": "https://rskworld.in",
  "data": {
    "from": "USD",
    "to": "EUR",
    "amount": 100,
    "converted_amount": 85.50,
    "rate": 0.855
  }
}

Historical Exchange Rates

GET /api.php?endpoint=historical&date={YYYY-MM-DD}&base={currency}

Get exchange rates for a specific historical date.

Parameters

Parameter Type Required Description
date String Yes Date in YYYY-MM-DD format
base String No Base currency code (default: USD)

Supported Currencies

GET /api.php?endpoint=currencies

Get a list of all supported currencies with their names and symbols.

Example Response:
{
  "status": "success",
  "message": "Supported currencies retrieved",
  "timestamp": 1234567890,
  "api_version": "1.0.0",
  "provider": "RSK World Currency Exchange API",
  "website": "https://rskworld.in",
  "data": {
    "USD": {
      "name": "United States Dollar",
      "symbol": "$"
    },
    "EUR": {
      "name": "Euro",
      "symbol": "€"
    }
  }
}

Response Format

All API responses follow a consistent JSON format:

{
  "status": "success|error",
  "message": "Human-readable message",
  "timestamp": 1234567890,
  "api_version": "1.0.0",
  "provider": "RSK World Currency Exchange API",
  "website": "https://rskworld.in",
  "data": { ... }
}

Response Fields

Field Type Description
status String Response status: "success" or "error"
message String Human-readable status message
timestamp Number Unix timestamp of the response
data Object The actual response data

Error Handling

The API returns appropriate HTTP status codes and error messages for different scenarios:

Status Code Description
200 Request successful
400 Bad request - invalid parameters
404 Endpoint not found
405 Method not allowed
500 Internal server error
Example Error Response:
{
  "status": "error",
  "message": "Invalid date format. Use YYYY-MM-DD",
  "timestamp": 1234567890,
  "api_version": "1.0.0",
  "provider": "RSK World Currency Exchange API",
  "website": "https://rskworld.in"
}

Code Examples

JavaScript

// Get latest rates
async function getLatestRates(base = 'USD') {
  try {
    const response = await fetch(
      `./api.php?endpoint=latest&base=${base}&pretty=1`
    );
    const data = await response.json();
    
    if (data.status === 'success') {
      console.log('Rates:', data.data.rates);
      return data.data.rates;
    } else {
      throw new Error(data.message);
    }
  } catch (error) {
    console.error('Error:', error);
  }
}

// Convert currency
async function convertCurrency(from, to, amount) {
  try {
    const response = await fetch(
      `./api.php?endpoint=convert&from=${from}&to=${to}&amount=${amount}&pretty=1`
    );
    const data = await response.json();
    
    if (data.status === 'success') {
      console.log(`${amount} ${from} = ${data.data.converted_amount} ${to}`);
      return data.data;
    } else {
      throw new Error(data.message);
    }
  } catch (error) {
    console.error('Error:', error);
  }
}

PHP

getMessage();
}
?>

Python

import requests
import json

# Get latest rates
def get_latest_rates(base='USD'):
    url = f"./api.php?endpoint=latest&base={base}&pretty=1"
    response = requests.get(url)
    data = response.json()
    
    if data['status'] == 'success':
        return data['data']['rates']
    else:
        raise Exception(data['message'])

# Convert currency
def convert_currency(from_currency, to_currency, amount):
    url = f"./api.php?endpoint=convert&from={from_currency}&to={to_currency}&amount={amount}&pretty=1"
    response = requests.get(url)
    data = response.json()
    
    if data['status'] == 'success':
        return data['data']
    else:
        raise Exception(data['message'])

# Usage
try:
    rates = get_latest_rates('USD')
    print(f"EUR rate: {rates['EUR']}")
    
    conversion = convert_currency('USD', 'EUR', 100)
    print(f"100 USD = {conversion['converted_amount']} EUR")
except Exception as e:
    print(f"Error: {e}")

Support

Need help? We're here to assist you with any questions or issues.

Contact Information

Team

  • Founder: Molla Samser
  • Designer & Tester: Rima Khatun
  • Version: 1.0.0
  • Year: 2026