PHPackages                             relessar/currency-rate-cbr - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. relessar/currency-rate-cbr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

relessar/currency-rate-cbr
==========================

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation. Fork from https://github.com/AndyDune/CurrencyRateCbr

v1.1(1y ago)010MITPHPPHP &gt;=5.6

Since May 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/relesssar/CurrencyRateCbr)[ Packagist](https://packagist.org/packages/relessar/currency-rate-cbr)[ Docs](https://github.com/relessar/CurrencyRateCbr)[ RSS](/packages/relessar-currency-rate-cbr/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Курсы валют ЦБ России
=====================

[](#курсы-валют-цб-россии)

[![Build Status](https://camo.githubusercontent.com/977b3c45669e06f97cd310356c460efd38b76847709547e2ad2abc5b909d09d2/68747470733a2f2f7472617669732d63692e6f72672f416e647944756e652f43757272656e6379526174654362722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AndyDune/CurrencyRateCbr)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/a6a997e53fa66fe522480b59cd77c19d5a237f7e4db2ab845020194d0e7ca510/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647964756e652f63757272656e63792d726174652d6362722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andydune/currency-rate-cbr)[![Total Downloads](https://camo.githubusercontent.com/ff12e3656eb3ea7fc9c22d9412993828b3347ab9a7e6b1633437b986515b98a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647964756e652f63757272656e63792d726174652d6362722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andydune/currency-rate-cbr)

Библиотека для получения и парсинга XML-данных о курсах валют.

Источник данных: [Получение данных, используя XML](http://www.cbr.ru/development/SXML/)

Уставнока
---------

[](#уставнока)

Уставнока через композер:

```
composer require relesssar/currency-rate-cbr

```

Or if composer was not installed globally:

```
php composer.phar require relesssar/currency-rate-cbr

```

Or edit your `composer.json`:

```
"require" : {
     "relesssar/currency-rate-cbr": "^1"
}

```

Запустить команду:

```
php composer.phar update

```

Использование
-------------

[](#использование)

```
use AndyDune\CurrencyRateCbr\DailyRate;

$rate = new DailyRate();
$rate->setDate(new \DateTime()); // не обязательно - по умолчанию используется текущая дата
$isOk = $rate->retrieve(); // true если данные успешно получены

// Извлекаем курс доллара

/** @var DailyRateItem $item */
$item = $rate->get('usd'); // код валюты, регистр не важен

$item->getDate(); // \DateTime::class - объект даты
$item->getCharCode(); // код валюты: USD
$item->getValue(); // цена: 63,1394
$item->getNominal(); // номинал: 1
$item->getName(); // наименование: Доллар США
$item->getValueId(); // ID валюты: R01235
$item->getNumCode(); // числовой код: 208
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.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

Unknown

Total

1

Last Release

721d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d57e2064ac81043cdb415a3472cd8f0dc2de227546e50a22fd127ce8579fa9e?d=identicon)[relesssar](/maintainers/relesssar)

---

Top Contributors

[![AndyDune](https://avatars.githubusercontent.com/u/3772910?v=4)](https://github.com/AndyDune "AndyDune (11 commits)")[![relesssar](https://avatars.githubusercontent.com/u/45258081?v=4)](https://github.com/relesssar "relesssar (1 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/relessar-currency-rate-cbr/health.svg)

```
[![Health](https://phpackages.com/badges/relessar-currency-rate-cbr/health.svg)](https://phpackages.com/packages/relessar-currency-rate-cbr)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[amirbagh75/smsir-php

Unofficial sms.ir PHP Package

181.2k](/packages/amirbagh75-smsir-php)

PHPackages © 2026

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