PHPackages                             allratestoday/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. allratestoday/sdk

ActiveLibrary[API Development](/categories/api)

allratestoday/sdk
=================

Official PHP SDK for AllRatesToday exchange rate API

v1.3.1(2mo ago)401MITTypeScriptPHP &gt;=7.4CI passing

Since Apr 9Pushed 3w agoCompare

[ Source](https://github.com/AllRates-Today/exchange-rates-api)[ Packagist](https://packagist.org/packages/allratestoday/sdk)[ Docs](https://allratestoday.com)[ RSS](/packages/allratestoday-sdk/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

AllRatesToday — Exchange Rates API
==================================

[](#allratestoday--exchange-rates-api)

[![Powered by AllRatesToday](https://camo.githubusercontent.com/de3e746e09028d596ef5fccddda04fcf29e095fb53400f412adabe665eaff969/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f776572656425323062792d416c6c5261746573546f6461792d6f72616e67652e737667)](https://allratestoday.com)

**[AllRatesToday](https://allratestoday.com/)** is a free, fast, and reliable REST API for real-time and historical currency exchange rates. Sourced from Reuters (Refinitiv) and interbank market feeds.

- Website: [allratestoday.com](https://allratestoday.com/)
- Free API key: [allratestoday.com/register](https://allratestoday.com/register/)
- Docs: [allratestoday.com/docs](https://allratestoday.com/docs/)

[![API Status](https://camo.githubusercontent.com/5937a6b6a75831b998f876df6ef0efb26cbe792f6d39e2949f2b7a0e854d8ebd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d4f6e6c696e652d627269676874677265656e)](https://allratestoday.com/status)[![Tests](https://github.com/allratestoday/exchange-rates-api/actions/workflows/test.yml/badge.svg)](https://github.com/allratestoday/exchange-rates-api/actions/workflows/test.yml)[![codecov](https://camo.githubusercontent.com/58b3a77c68e786591df9d3d4c352fc28d870e3ba0625a4b6253cefaa16e7595a/68747470733a2f2f636f6465636f762e696f2f67682f616c6c7261746573746f6461792f65786368616e67652d72617465732d6170692f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/allratestoday/exchange-rates-api)[![Known Vulnerabilities](https://camo.githubusercontent.com/905e91d369f61f13c88001bc8c5934693a340d317ff72960611312faa50d5a91/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f616c6c7261746573746f6461792f65786368616e67652d72617465732d6170692f62616467652e737667)](https://snyk.io/test/github/allratestoday/exchange-rates-api)[![zero dependencies](https://camo.githubusercontent.com/20f4b99a958aadb02ff273ac6428c17cf55c6b817657ed64b1c39c7f71955a0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d627269676874677265656e2e737667)](https://www.npmjs.com/package/@allratestoday/sdk)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![TypeScript](https://camo.githubusercontent.com/81d486f164baea27656bcadd57f445ca927a0ec07e234a8746bcc10614cdd76e/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f747970657363726970742f636f64652f747970657363726970742e7376673f763d313031)](https://www.typescriptlang.org/)[![npm](https://camo.githubusercontent.com/9cd36a70e2f9b455dbcb67a009e611e9629b991576e08a24ce5436c5cae1fc52/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f40616c6c7261746573746f6461792f73646b3f6c6162656c3d6e706d26636f6c6f723d636233383337)](https://www.npmjs.com/package/@allratestoday/sdk)[![PyPI](https://camo.githubusercontent.com/0bfa21a14cbc2ae0cf353d51919126a6f8edfbb12e7e47904deda56271151603/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f616c6c7261746573746f6461793f6c6162656c3d5079504926636f6c6f723d333737356139)](https://pypi.org/project/allratestoday/)[![Packagist](https://camo.githubusercontent.com/bc8e1ad319f43bd677d4085f74114a2adee7451a02cdb6cfcfc7cb17b2e2b5e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6c7261746573746f6461792f73646b3f6c6162656c3d5061636b616769737426636f6c6f723d663238643161)](https://packagist.org/packages/allratestoday/sdk)

🚀 Features
----------

[](#-features)

- ⚡ **Real-time rates** — Live mid-market exchange rates updated on every request
- 🌍 **160+ currencies** — Major, emerging market, and popular currencies
- 📅 **Historical data** — Access historical rates with flexible date ranges (1d/7d/30d/1y)
- 📦 **Official SDKs** — JavaScript/TypeScript, Python, PHP, and React
- 🆓 **Free tier** — Get started at no cost
- 🛡️ **Fast &amp; reliable** — Powered by Cloudflare's global edge network
- 📡 **Data source** — Reuters (Refinitiv) and interbank market feeds

📦 Official SDKs
---------------

[](#-official-sdks)

### JavaScript / TypeScript

[](#javascript--typescript)

```
npm install @allratestoday/sdk
```

```
import AllRatesToday from '@allratestoday/sdk';

const client = new AllRatesToday();
const rate = await client.getRate('USD', 'EUR');
console.log(`1 USD = ${rate.rate} EUR`);

// Convert amount
const result = await client.convert('USD', 'EUR', 100);
console.log(`$100 = €${result.result}`);

// With API key for higher limits & historical data
const auth = new AllRatesToday({ apiKey: 'art_live_...' });
const history = await auth.getHistoricalRates('USD', 'EUR', '30d');
```

### Python

[](#python)

```
pip install allratestoday
```

```
from allratestoday import AllRatesToday

client = AllRatesToday()
rate = client.get_rate("USD", "EUR")
print(f"1 USD = {rate['rate']} EUR")

# Convert amount
result = client.convert("USD", "EUR", 100)
print(f"$100 = €{result['result']}")

# With API key for higher limits & historical data
auth = AllRatesToday(api_key="art_live_...")
history = auth.get_historical_rates("USD", "EUR", "30d")
```

### PHP

[](#php)

```
composer require allratestoday/sdk
```

```
use AllRatesToday\AllRatesToday;

$client = new AllRatesToday();
$rate = $client->getRate('USD', 'EUR');
echo "1 USD = {$rate['rate']} EUR";

// Convert amount
$result = $client->convert('USD', 'EUR', 100);
echo "$100 = €{$result['result']}";

// With API key for higher limits & historical data
$auth = new AllRatesToday('art_live_...');
$history = $auth->getHistoricalRates('USD', 'EUR', '30d');
```

### React

[](#react)

```
npm install react-currency-localizer-realtime
```

```
import { LocalizedPrice } from 'react-currency-localizer-realtime';

// Automatically detects user's currency via IP geolocation
function PricingCard() {
  return (

      Pro Plan

  );
}
```

```
import { useCurrencyConverter } from 'react-currency-localizer-realtime';

// Hook-based API for full control
function ProductPrice({ price }: { price: number }) {
  const { convertedPrice, localCurrency, isLoading } = useCurrencyConverter({
    basePrice: price,
    baseCurrency: 'USD',
    apiKey: 'art_live_...',
  });

  if (isLoading) return Loading...;

  return (

      {new Intl.NumberFormat(undefined, {
        style: 'currency',
        currency: localCurrency || 'USD',
      }).format(convertedPrice || price)}

  );
}
```

```
import { useCurrencyLocalizer } from 'react-currency-localizer-realtime';

// Batch conversion for product lists
function ProductList({ products }) {
  const { convertAndFormat, isReady } = useCurrencyLocalizer({
    baseCurrency: 'USD',
    apiKey: 'art_live_...',
  });

  return (

      {products.map(p => (
        {p.name}: {isReady ? convertAndFormat(p.price) : '...'}
      ))}

  );
}
```

🏁 Quick Start (No SDK)
----------------------

[](#-quick-start-no-sdk)

```
curl "https://allratestoday.com/api/v1/rates?source=USD&target=EUR" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Get your free API key at [allratestoday.com/register](https://allratestoday.com/register).

📚 API Endpoints
---------------

[](#-api-endpoints)

MethodEndpointAuthDescriptionGET`/api/v1/rates`YesExchange rates (supports comma-separated targets)GET`/api/v1/symbols`NoList all supported currenciesGET`/api/rate`YesSimple pair rate lookupGET`/api/historical-rates`YesHistorical rate data &amp; time series🌍 Supported Currencies
----------------------

[](#-supported-currencies)

160+ currencies including:

**Major:** USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD

**Popular:** INR, CNY, BRL, MXN, TRY, ZAR, SGD, HKD, KRW, THB, PHP, PKR, BDT, LKR, NGN, GHS, KES, AED, SAR, EGP, and more

🛡️ Error Handling
-----------------

[](#️-error-handling)

CodeDescription400Bad request — missing or invalid parameters401Missing or invalid API key429Rate limit or monthly quota exceeded500Internal server error503Service temporarily unavailable📄 API Specifications
--------------------

[](#-api-specifications)

For the complete technical reference, download the **AllRatesToday Currency Data API Specifications** document:

- **[Download PDF](docs/AllRatesToday-API-Specifications.pdf)** — Full 20-page API specification (endpoints, parameters, responses, error codes, SDKs)
- **[View Online](https://allratestoday.com/api-specifications)** — Browse the specification on our website

🔗 Links
-------

[](#-links)

- **Website:** [allratestoday.com](https://allratestoday.com)
- **API Specs:** [allratestoday.com/api-specifications](https://allratestoday.com/api-specifications)
- **API Docs:** [allratestoday.com/docs](https://allratestoday.com/docs)
- **Developer Guide:** [allratestoday.com/developers](https://allratestoday.com/developers)
- **Status:** [allratestoday.com/status](https://allratestoday.com/status)
- **Support:** [allratestoday.com/contact](https://allratestoday.com/contact)

📜 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

87d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/254173078?v=4)[AllRates Today](/maintainers/allratestoday)[@allratestoday](https://github.com/allratestoday)

---

Top Contributors

[![cahthuranag](https://avatars.githubusercontent.com/u/58804605?v=4)](https://github.com/cahthuranag "cahthuranag (47 commits)")[![allratestoday](https://avatars.githubusercontent.com/u/254173078?v=4)](https://github.com/allratestoday "allratestoday (4 commits)")

---

Tags

currency-apicurrency-conversioncurrency-exchangeexchange-rateexchange-rate-apiforexforex-apifree-apijavascriptnodejsreal-time-ratesrest-apireuterssdktypescriptapicurrencyexchange rateforexReutersallratestoday

### Embed Badge

![Health badge](/badges/allratestoday-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/allratestoday-sdk/health.svg)](https://phpackages.com/packages/allratestoday-sdk)
```

###  Alternatives

[oneforge/forexquotes

Library to fetch and parse realtime Forex quotes and convert currencies

7312.8k1](/packages/oneforge-forexquotes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
