{"repo":"florianv/swap","free":true,"listed":false,"github":"https://github.com/florianv/swap","clone":"git clone https://github.com/florianv/swap.git","description":"PHP currency conversion library for retrieving exchange rates from 30 providers, with caching and fallback. Maintained since 2014.","language":"PHP","stars":1339,"topics":["php","currency","exchange-rates","currency-exchange-rates","money","currency-exchange","currency-converter","currency-rates","currency-conversion","exchange-rate-api"],"license":"MIT","category":"trading","readme_excerpt":"Swap The easy-to-use PHP currency conversion library. Retrieve exchange rates from 30+ providers, with caching and fallback. Maintained since 2014. Sponsored by fastFOREX . Real-time JSON API, 160+ currencies, 55+ years of history, 500+ cryptocurrencies. Free tier ; paid plans from $18/month. → Get a free fastFOREX API key Swap retrieves currency exchange rates in PHP, behind a single API. Use commercial providers in production, or free public sources (ECB, national banks) when you don't need volume. Caching, historical rates and provider fallback are built in. Maintained since 2014. 💡 What is Swap? - Swap is a PHP library for currency conversion and exchange rate retrieval. - It exposes a wide range of exchange rate providers behind a common interface. - It caches results via PSR-16 SimpleCache. - It supports historical rates. - It supports a fallback chain. When a provider errors, the next provider in the chain is tried. 📦 Installation Swap requires PHP 8.2 or newer. symfony/http-client is the PSR-18 HTTP client and nyholm/psr7 provides the PSR-17 factories. Any PSR-18 / PSR-17 implementation works (see the documentation for alternatives such as Guzzle). ⚡ Quickstart The recommended setup uses fastFOREX (the project's sponsor) as the primary provider. Grab a free key and you're ready. Swap retrieves the rate; your application multiplies the amount by $rate- getValue() to perform the conversion. No API key? Start with the European Central Bank (free, EUR-base only). The Eu","default_branch":null,"files":null,"tree":[],"storefront":"/r/florianv","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/florianv/swap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}