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

1.2.0(1mo ago)00MITPHPPHP &gt;=7.4

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/allratestoday/sdk-php)[ Packagist](https://packagist.org/packages/allratestoday/sdk)[ Docs](https://allratestoday.com)[ RSS](/packages/allratestoday-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

AllRatesToday PHP SDK
=====================

[](#allratestoday-php-sdk)

Official PHP SDK for the [AllRatesToday](https://allratestoday.com) exchange rate API.

Real-time mid-market exchange rates for 160+ currencies, sourced from Reuters (Refinitiv) and interbank market feeds.

Installation
------------

[](#installation)

```
composer require allratestoday/sdk
```

Quick Start
-----------

[](#quick-start)

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

```
use AllRatesToday\AllRatesToday;

$client = new AllRatesToday('art_live_your_key_here');

// Get exchange rate
$rate = $client->getRate('USD', 'EUR');
echo "1 USD = {$rate[0]['rate']} EUR\n";

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

// Get historical rates
$history = $client->getHistoricalRates('USD', 'EUR', '30d');
foreach ($history['rates'] as $point) {
    echo "{$point['time']}: {$point['rate']}\n";
}
```

API Reference
-------------

[](#api-reference)

### `new AllRatesToday($apiKey, $baseUrl, $timeout)`

[](#new-allratestodayapikey-baseurl-timeout)

ParameterTypeDefaultDescription`$apiKey``string`**required**Your API key ([register free](https://allratestoday.com/register))`$baseUrl``string``https://allratestoday.com`API base URL`$timeout``int``10`Request timeout in seconds### Methods

[](#methods)

MethodDescription`getRate($from, $to, $amount)`Get exchange rate between two currencies`convert($from, $to, $amount)`Convert amount between currencies`getRates($source, $target)`Get rate data with metadata`getHistoricalRates($source, $target, $period)`Historical rates (1d/7d/30d/1y)All methods require an API key.

### Error Handling

[](#error-handling)

```
use AllRatesToday\AllRatesToday;
use AllRatesToday\AllRatesTodayException;

try {
    $rate = $client->getRate('USD', 'INVALID');
} catch (AllRatesTodayException $e) {
    echo $e->getMessage();      // Error message
    echo $e->getStatusCode();   // HTTP status code
}
```

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- ext-curl
- ext-json

Pricing
-------

[](#pricing)

PlanRequests/MonthPriceFree300FreeSmall5,000€4.99/moMedium10,000€9.99/moLarge100,000€49.99/moLinks
-----

[](#links)

- [API Documentation](https://allratestoday.com/docs)
- [Register (Free)](https://allratestoday.com/register)
- [Dashboard](https://allratestoday.com/profile)
- [Pricing](https://allratestoday.com/pricing)

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

45d 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 (3 commits)")

---

Tags

apicurrencyexchange 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

7212.5k](/packages/oneforge-forexquotes)

PHPackages © 2026

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