PHPackages                             georgii-web/cbr-api-exchange - 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. georgii-web/cbr-api-exchange

ActiveLibrary[API Development](/categories/api)

georgii-web/cbr-api-exchange
============================

Cbr.ru exchange rate API package. Gets currency rate from Russian Central Bank API, http://www.cbr.ru.

1.0.3(2y ago)1414MITPHPPHP ^7.4|^8.0

Since Jan 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/GeorgII-web/cbr-api-exchange)[ Packagist](https://packagist.org/packages/georgii-web/cbr-api-exchange)[ RSS](/packages/georgii-web-cbr-api-exchange/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

CbrApiExchange
==============

[](#cbrapiexchange)

Cbr.ru exchange API.

Gets currency rate from Russian Central Bank API, .

All currencies list: [http://www.cbr.ru/scripts/XML\_val.asp?d=0](http://www.cbr.ru/scripts/XML_val.asp?d=0)

Get USD rate example url: [http://www.cbr.ru/scripts/XML\_dynamic.asp?date\_req1=01/01/2021&amp;date\_req2=12/01/2021&amp;VAL\_NM\_RQ=R01235](http://www.cbr.ru/scripts/XML_dynamic.asp?date_req1=01/01/2021&date_req2=12/01/2021&VAL_NM_RQ=R01235)

### Features

[](#features)

Centrak Bank announce exchange rate for tomorrow everyday (in a second part of the day).

On holidays there are no announcements, so it uses previous date of the exchange rate.

For example, on 2020-12-31 at 08:00 we don't get exchange rate for 2021-01-01, but at 21:00 we'll get it. And if we check exchange rate on 2021-01-04 we get it for 2021-01-01.

Install
-------

[](#install)

```
$ composer require georgii-web/cbr-api-exchange
```

How to
------

[](#how-to)

#### Add class

[](#add-class)

```
use CbrApiExchange\CbrApiExchange;

```

#### Use examples

[](#use-examples)

```
CbrApiExchange::get(); // Get default currency 'R01235'(USD) on default date 'Today()'
CbrApiExchange::get('R01239'); // Get currency 'R01239'(EUR) on default date 'Today()'
CbrApiExchange::get('R01239', '2021-01-01'); // Get currency 'R01239'(EUR) on date '2021-01-01'

```

#### Returns

[](#returns)

```
[
  "code" => "R01235", // The actual currency code
  "date" => "2021-01-01", // The actual date of the exchange rate
  "rate" => 73.8757, // Exchange rate of this currency to the Ruble
]

```

Development
-----------

[](#development)

Testing
-------

[](#testing)

```
$ ./vendor/bin/pest
```

Psalm check
-----------

[](#psalm-check)

```
$ ./vendor/bin/psalm
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~334 days

Total

4

Last Release

981d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.0.2PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8732fb5579944b880eba4d8f719cb9d97cf3c2d2cfafa4c7562c1c0850eeeb96?d=identicon)[GeorgII](/maintainers/GeorgII)

---

Top Contributors

[![GeorgII-web](https://avatars.githubusercontent.com/u/52407577?v=4)](https://github.com/GeorgII-web "GeorgII-web (2 commits)")[![georgedeploy](https://avatars.githubusercontent.com/u/68266767?v=4)](https://github.com/georgedeploy "georgedeploy (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/georgii-web-cbr-api-exchange/health.svg)

```
[![Health](https://phpackages.com/badges/georgii-web-cbr-api-exchange/health.svg)](https://phpackages.com/packages/georgii-web-cbr-api-exchange)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M916](/packages/statamic-cms)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k406.5k25](/packages/team-reflex-discord-php)[temporal/sdk

Temporal SDK

4102.7M22](/packages/temporal-sdk)[smodav/mpesa

M-Pesa API implementation

16167.1k1](/packages/smodav-mpesa)[icawebdesign/hibp-php

PHP library for accessing the Have I Been Pwned API.

2548.8k2](/packages/icawebdesign-hibp-php)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1122.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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