Skip to content

docs: list unirate_api in provider tables#155

Open
rob-browncc wants to merge 1 commit into
florianv:masterfrom
rob-browncc:add-unirate-api-provider
Open

docs: list unirate_api in provider tables#155
rob-browncc wants to merge 1 commit into
florianv:masterfrom
rob-browncc:add-unirate-api-provider

Conversation

@rob-browncc
Copy link
Copy Markdown

Adds UniRateAPI to the documented provider lists, following florianv/exchanger#180 which landed the UniRateApi service and registered it under the identifier unirate_api in Exchanger\Service\Registry.

Swap\Service\Registry already pulls every entry from ExchangerRegistry::getServices(), so once Exchanger ships its next tagged release this is usable on master as-is:

$swap = (new Builder())
    ->add('unirate_api', ['api_key' => getenv('UNIRATE_API_KEY')])
    ->build();

This PR only updates the docs.

Changes

  • README.md — adds UniRateAPI row to the commercial provider table, alphabetical between open_exchange_rates and webservicex; bumps the provider count 30 → 31 in three places (tagline, Providers section, sibling-package line for Exchanger).
  • doc/readme.md — adds unirate_api / api_key to the commercial provider configuration table.

Notes

  • Identifier unirate_api matches the key used in Exchanger's Registry::getServices() after #180.
  • UniRateAPI is a commercial REST API for FX (170+ currencies, EUR/USD/any base). Latest rates are available on the free tier; historical (/api/historical) and commodities are paid-tier only — the upstream UniRateApi.php maps HTTP 403 from those endpoints to Exchanger\Exception\ChainException, matching the existing fastFOREX / Fixer behaviour for plan-gated endpoints.

Disclosure

I work with UniRateAPI. The implementation work (Exchanger #180) was done first; opening this docs PR now that the merge has landed so users can discover the provider through the standard table without needing to read the changelog. Happy to revise the wording or drop the count bump if you'd rather hold the count fixed until the next Exchanger release tag.

Exchanger merged UniRateAPI support in florianv/exchanger#180. Swap
auto-inherits provider services from Exchanger's Registry, so
`->add('unirate_api', ['api_key' => getenv('UNIRATE_API_KEY')])` already
works on master; only the docs were missing.

- README.md: add row to commercial providers table (alphabetical
  position between `open_exchange_rates` and `webservicex`); bump
  provider counts 30 → 31 in tagline, providers section, and the
  Exchanger sibling-package line.
- doc/readme.md: add `unirate_api` / `api_key` row to the commercial
  config table.

UniRateAPI is a commercial REST API for FX (latest rates on the free
tier; historical and commodities on the paid tier — same shape as the
other paid providers in the table).
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Swap’s documentation to include the newly added UniRateAPI provider (registered upstream in Exchanger as unirate_api) and to reflect an updated total provider count.

Changes:

  • Add UniRateAPI (unirate_api) to the README commercial providers table.
  • Add unirate_api / api_key to the provider configuration reference in doc/readme.md.
  • Update several README references from “30 providers” to “31 providers”.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Adds UniRateAPI to the commercial providers list and updates stated provider counts.
doc/readme.md Documents unirate_api configuration (api_key) in the commercial provider options table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
[![Version](http://img.shields.io/packagist/v/florianv/swap.svg?style=flat-square)](https://packagist.org/packages/florianv/swap)

> _The easy-to-use PHP currency conversion library. Retrieve exchange rates from 30 providers, with caching and fallback. Maintained since 2014._
> _The easy-to-use PHP currency conversion library. Retrieve exchange rates from 31 providers, with caching and fallback. Maintained since 2014._
Comment thread README.md
## 📊 Providers

Swap supports 30 exchange rate providers. Pass the **identifier** to `Builder::add()`.
Swap supports 31 exchange rate providers. Pass the **identifier** to `Builder::add()`.
Comment thread README.md

- [**Swap**](https://github.com/florianv/swap). The easy-to-use, high-level API (this package).
- [**Exchanger**](https://github.com/florianv/exchanger). Lower-level, more granular alternative; direct access to the 30 provider implementations and the `ExchangeRateService` interface.
- [**Exchanger**](https://github.com/florianv/exchanger). Lower-level, more granular alternative; direct access to the 31 provider implementations and the `ExchangeRateService` interface.
@rob-browncc
Copy link
Copy Markdown
Author

Quick note on the Copilot suggestions about the 30 → 31 provider counts:

The Exchanger PR that adds UniRateAPI (florianv/exchanger#180) merged 2026-05-18, but the most recent tagged Exchanger release (2.9.1, 2026-05-14) was before that, so packagist installs of florianv/exchanger don't ship unirate_api yet. That makes the bumped counts in this docs PR technically inaccurate for anyone on current Composer until the next Exchanger release.

Happy with either path here, whichever you prefer:

  1. Merge as-is and the counts become accurate the moment the next Exchanger tag drops.
  2. I drop the three 30 → 31 bumps in this PR (keeping just the table row + config line for unirate_api), and open a separate count-only PR once the next Exchanger release ships.

No pending changes on my end otherwise — just let me know.

(Disclosure unchanged: I work on UniRateAPI, raised in the PR body.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants