{"id":17164146,"url":"https://github.com/florianv/laravel-swap","last_synced_at":"2025-05-15T20:03:49.374Z","repository":{"id":33554115,"uuid":"37200322","full_name":"florianv/laravel-swap","owner":"florianv","description":":dollar: Currency exchange rates for Laravel and Lumen","archived":false,"fork":false,"pushed_at":"2024-04-11T09:01:43.000Z","size":128,"stargazers_count":336,"open_issues_count":2,"forks_count":46,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-24T10:43:32.781Z","etag":null,"topics":["currency","currency-converter","currency-exchange-rates","currency-rates","exchange-rates","laravel","lumen","php"],"latest_commit_sha":null,"homepage":"https://florianv.github.io/laravel-swap/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/florianv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-10T13:56:51.000Z","updated_at":"2025-04-21T01:03:08.000Z","dependencies_parsed_at":"2024-04-11T09:39:58.513Z","dependency_job_id":"94aede04-6590-4970-bdc1-3d7697f6c5c5","html_url":"https://github.com/florianv/laravel-swap","commit_stats":{"total_commits":72,"total_committers":11,"mean_commits":6.545454545454546,"dds":"0.26388888888888884","last_synced_commit":"735802da2ea09b31799f43591f73ace50b4efa57"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianv%2Flaravel-swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianv%2Flaravel-swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianv%2Flaravel-swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianv%2Flaravel-swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florianv","download_url":"https://codeload.github.com/florianv/laravel-swap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250860521,"owners_count":21498943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["currency","currency-converter","currency-exchange-rates","currency-rates","exchange-rates","laravel","lumen","php"],"created_at":"2024-10-14T22:51:02.500Z","updated_at":"2025-05-15T20:03:47.849Z","avatar_url":"https://github.com/florianv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://s3.amazonaws.com/swap.assets/swap_logo.png\" height=\"30px\" width=\"30px\"/\u003e Laravel Swap\n\n[![Build status](http://img.shields.io/travis/florianv/laravel-swap.svg?style=flat-square)](https://travis-ci.org/florianv/laravel-swap)\n[![Total Downloads](https://img.shields.io/packagist/dt/florianv/laravel-swap.svg?style=flat-square)](https://packagist.org/packages/florianv/laravel-swap)\n[![Version](http://img.shields.io/packagist/v/florianv/laravel-swap.svg?style=flat-square)](https://packagist.org/packages/florianv/laravel-swap)\n\nSwap allows you to retrieve currency exchange rates from various services such as **[Fixer](https://fixer.io/)**, **[Currency Data](https://currencylayer.com)**\nor **[Exchange Rates Data](https://exchangeratesapi.io)** and optionally cache the results. \n\n## Sponsors\n\n\u003ctable\u003e\n   \u003ctr\u003e\n      \u003ctd\u003e\u003cimg src=\"https://assets.apilayer.com/apis/fixer.png\" width=\"50px\"/\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://fixer.io/\"\u003eFixer\u003c/a\u003e is a simple and lightweight API for foreign exchange rates that supports up to 170 world currencies.\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n     \u003ctd\u003e\u003cimg src=\"https://assets.apilayer.com/apis/currency_data.png\" width=\"50px\"/\u003e\u003c/td\u003e\n     \u003ctd\u003e\u003ca href=\"https://currencylayer.com\"\u003eCurrency Data\u003c/a\u003e provides reliable exchange rates and currency conversions for your business up to 168 world currencies.\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n     \u003ctd\u003e\u003cimg src=\"https://assets.apilayer.com/apis/exchangerates_data.png\" width=\"50px\"/\u003e\u003c/td\u003e\n     \u003ctd\u003e\u003ca href=\"https://exchangeratesapi.io\"\u003eExchange Rates Data\u003c/a\u003e provides reliable exchange rates and currency conversions for your business with over 15 data sources.\u003c/td\u003e\n   \u003c/tr\u003e\n\u003c/table\u003e\n\n## QuickStart\n\n### Installation\n\n```bash\n$ composer require php-http/curl-client nyholm/psr7 php-http/message florianv/laravel-swap\n```\n\n### Laravel 5.7 or lesser\n\nIf you use cache, add also PSR-6 adapter and PSR-16 bridge cache dependencies :\n\n```bash\n$ composer require cache/illuminate-adapter cache/simple-cache-bridge\n```\n\nThese dependencies are not required with Laravel 5.8 or greater which [implements PSR-16](https://github.com/laravel/framework/pull/27217).\n\n### Laravel 5.5+\n\nIf you don't use auto-discovery, add the `ServiceProvider` to the providers array in `config/app.php`:\n\n```php\n// /config/app.php\n'providers' =\u003e [\n    Swap\\Laravel\\SwapServiceProvider::class\n],\n```\n\nIf you want to use the facade to log messages, add this to your facades in app.php:\n\n```\n'aliases' =\u003e [\n    'Swap' =\u003e Swap\\Laravel\\Facades\\Swap::class\n]\n```\n\nCopy the package config to your local config with the publish command:\n\n```bash\n$ php artisan vendor:publish --provider=\"Swap\\Laravel\\SwapServiceProvider\"\n```\n\n### Lumen\n\nConfigure the Service Provider and alias:\n\n```php\n// /boostrap/app.php\n\n// Register the facade\n$app-\u003ewithFacades(true, [\n    Swap\\Laravel\\Facades\\Swap::class =\u003e 'Swap'\n]);\n\n// Load the configuration\n$app-\u003econfigure('swap');\n\n// Register the service provider\n$app-\u003eregister(Swap\\Laravel\\SwapServiceProvider::class);\n```\n\nCopy the [configuration](config/swap.php) to `/config/swap.php` if you wish to override it.\n\n## Usage\n\n```php\n// Get the latest EUR/USD rate\n$rate = Swap::latest('EUR/USD');\n\n// 1.129\n$rate-\u003egetValue();\n\n// 2016-08-26\n$rate-\u003egetDate()-\u003eformat('Y-m-d');\n\n// Get the EUR/USD rate yesterday\n$rate = Swap::historical('EUR/USD', Carbon\\Carbon::yesterday());\n```\n\n## Documentation\n\nThe complete documentation can be found [here](https://github.com/florianv/laravel-swap/blob/master/doc/readme.md).\n\n## Services\n\nHere is the list of the currently implemented services:\n\n| Service | Base Currency | Quote Currency | Historical |\n|---------------------------------------------------------------------------|----------------------|----------------|----------------|\n| [Fixer](https://fixer.io/) | EUR (free, no SSL), * (paid) | * | Yes |\n| [Currency Data](https://currencylayer.com) | USD (free), * (paid) | * | Yes |\n| [Exchange Rates Data](https://exchangeratesapi.io) | USD (free), * (paid) | * | Yes |\n| [Abstract](https://www.abstractapi.com) | * | * | Yes |\n| [coinlayer](https://coinlayer.com) | * Crypto (Limited standard currencies) | * Crypto (Limited standard currencies) | Yes |\n| [Fixer](https://fixer.io) | EUR (free, no SSL), * (paid) | * | Yes |\n| [currencylayer](https://currencylayer.com) | USD (free), * (paid) | * | Yes |\n| [exchangeratesapi](https://exchangeratesapi.io) | USD (free), * (paid) | * | Yes |\n| [European Central Bank](https://www.ecb.europa.eu/home/html/index.en.html) | EUR | * | Yes |\n| [National Bank of Georgia](https://nbg.gov.ge) | * | GEL | Yes |\n| [National Bank of the Republic of Belarus](https://www.nbrb.by) | * | BYN (from 01-07-2016),\u003cbr\u003eBYR (01-01-2000 - 30-06-2016),\u003cbr\u003eBYB (25-05-1992 - 31-12-1999) | Yes |\n| [National Bank of Romania](http://www.bnr.ro) | RON, AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EGP, EUR, GBP, HRK, HUF, INR, JPY, KRW, MDL, MXN, NOK, NZD, PLN, RSD, RUB, SEK, TRY, UAH, USD, XAU, XDR, ZAR | RON, AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EGP, EUR, GBP, HRK, HUF, INR, JPY, KRW, MDL, MXN, NOK, NZD, PLN, RSD, RUB, SEK, TRY, UAH, USD, XAU, XDR, ZAR | Yes |\n| [National Bank of Ukranie](https://bank.gov.ua) | * | UAH | Yes |\n| [Central Bank of the Republic of Turkey](http://www.tcmb.gov.tr) | * | TRY | Yes |\n| [Central Bank of the Republic of Uzbekistan](https://cbu.uz) | * | UZS | Yes |\n| [Central Bank of the Czech Republic](https://www.cnb.cz) | * | CZK | Yes |\n| [Central Bank of Russia](https://cbr.ru) | * | RUB | Yes |\n| [Bulgarian National Bank](http://bnb.bg) | * | BGN | Yes |\n| [WebserviceX](http://www.webservicex.net) | * | * | No |\n| [1Forge](https://1forge.com) | * (free but limited or paid) | * (free but limited or paid) | No |\n| [Cryptonator](https://www.cryptonator.com) | * Crypto (Limited standard currencies) | * Crypto (Limited standard currencies)  | No |\n| [CurrencyDataFeed](https://currencydatafeed.com) | * (free but limited or paid) | * (free but limited or paid) | No |\n| [Open Exchange Rates](https://openexchangerates.org) | USD (free), * (paid) | * | Yes |\n| [Xignite](https://www.xignite.com) | * | * | Yes |\n| [Currency Converter API](https://www.currencyconverterapi.com) | * | * | Yes (free but limited or paid) |\n| [xChangeApi.com](https://xchangeapi.com) | * | * | Yes |\n| [fastFOREX.io](https://www.fastforex.io) | USD (free), * (paid) | * | No |\n| [exchangerate.host](https://www.exchangerate.host) | * | * | Yes |\n| Array | * | * | Yes |\n\n## Credits\n\n- [Florian Voutzinos](https://github.com/florianv)\n- [All Contributors](https://github.com/florianv/laravel-swap/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE](https://github.com/florianv/laravel-swap/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianv%2Flaravel-swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorianv%2Flaravel-swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianv%2Flaravel-swap/lists"}