{"id":16085744,"url":"https://github.com/infinitypaul/naira-exchange-rates","last_synced_at":"2025-08-21T11:22:45.875Z","repository":{"id":56991194,"uuid":"247340919","full_name":"infinitypaul/naira-exchange-rates","owner":"infinitypaul","description":"Foreign CBN, Bureau De Change, Bank, Western Union, MoneyGram exchange rates API Against The Naira","archived":false,"fork":false,"pushed_at":"2020-03-28T09:40:52.000Z","size":38,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T07:49:37.137Z","etag":null,"topics":["cbn","currency-exchange-rates","exchange-rates","naira","nigeria"],"latest_commit_sha":null,"homepage":null,"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/infinitypaul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-14T19:33:05.000Z","updated_at":"2024-03-18T11:01:58.000Z","dependencies_parsed_at":"2022-08-21T13:50:15.195Z","dependency_job_id":null,"html_url":"https://github.com/infinitypaul/naira-exchange-rates","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fnaira-exchange-rates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fnaira-exchange-rates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fnaira-exchange-rates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fnaira-exchange-rates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinitypaul","download_url":"https://codeload.github.com/infinitypaul/naira-exchange-rates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243908009,"owners_count":20367331,"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":["cbn","currency-exchange-rates","exchange-rates","naira","nigeria"],"created_at":"2024-10-09T13:09:13.991Z","updated_at":"2025-03-18T06:30:32.872Z","avatar_url":"https://github.com/infinitypaul.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Naira ExchangeRatesAPI - Naira Currency Exchange Rates API SDK\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/infinitypaul/naira-exchange-rates.svg?style=flat-square)](https://packagist.org/packages/infinitypaul/naira-exchange-rates)\n[![Build Status](https://img.shields.io/travis/infinitypaul/naira-exchange-rates/master.svg?style=flat-square)](https://travis-ci.org/infinitypaul/naira-exchange-rates)\n[![Quality Score](https://img.shields.io/scrutinizer/g/infinitypaul/naira-exchange-rates.svg?style=flat-square)](https://scrutinizer-ci.com/g/infinitypaul/naira-exchange-rates)\n[![Total Downloads](https://img.shields.io/packagist/dt/infinitypaul/naira-exchange-rates.svg?style=flat-square)](https://packagist.org/packages/infinitypaul/naira-exchange-rates)\n\n Free Naira Exchange Rates API, which provides past or recent exchange rate lookups. It features a number of useful functions and can be installed easily using Composer..\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require infinitypaul/naira-exchange-rates\n```\nAlternatively, you can download all files from the src/ directory and include them in your project. Important note: if you're manually installing the SDK, you must also install Guzzle Client.\n\n## Usage\n\nThe Naira Currency Exchange API does require API keys or authentication in order to access and interrogate its API, Register and get your token on http://nairaexchangerate.herokuapp.com/.\n\n**Basic usage:**\u003cbr /\u003e\n\nFetch the latest exchange rates \n``` php\n$naira = new NairaExchangeRates\n$rates  = $naira-\u003esetType('cbn')-\u003efetch();\n```\n\n**Historical Data:**\u003cbr /\u003e\nGet historical rates for any day since 1999:\n``` php\n$naira = new NairaExchangeRates\n$rates  = $naira-\u003esetType('cbn')-\u003eaddDateFrom('2019-11-26')-\u003efetch();\n```\n\n**Fetch Specific Rate:**\u003cbr /\u003e\nIf you do not want all current rates, it's possible to specify only the currencies you want\n``` php\n$naira = new NairaExchangeRates\n$rates  = $naira-\u003esetType('cbn')-\u003esetBaseCurrency('usd')-\u003efetch();\n```\n\n### 4. API Reference:\n\nThe following API reference lists the publicly-available methods for the \n\n#### `NairaExchangeRatesAPI` Reference:\n\n`addDateFrom( string $from )`:\u003cbr /\u003e\nSet the date from which to retrieve historic rates. `$from` should be a string containing an ISO 8601 date.\n\n`setType( string $to )`:\u003cbr /\u003e\nSet The Exchange Rate Type You Want To Retrieve, we have the following types\n1. `cbn` Central Bank Of Nigeria Rate\n2. `bdc` Burueu The Change Rate\n3. `bank` Bank Rate\n4. `moneygram` MoneyGram Rate\n5. `westernunion` Western Union Rate\n\n\n\n`addDateTo( string $type )`:\u003cbr /\u003e\nSet the end date for the retrieval of historic rates. `$to` should be a string containing an ISO 8601 date.\n\n`setBaseCurrency( string $code )`:\u003cbr /\u003e\nSet the base currency you want to retrieve. `$code` should be passed an ISO 4217 code (e.g. `EUR`).\u003cbr /\u003e\n`$code` must be one of the [supported currency codes](#5-supported-currencies).\n\n\n`fetch()`:\u003cbr /\u003e\nSend off the request to the API and return either a Json,\n\n### 5. Supported Currencies:\n\nThe library supports the following currencies USD, GBP, EUR, JPY, XAF, CNY, QAR, ZAR, SEK:\n\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Bug \u0026 Features\n\nIf you have spotted any bugs, or would like to request additional features from the library, please file an issue via the Issue Tracker on the project's Github page: [https://github.com/infinitypaul/naira-exchange-rates/issues](https://github.com/infinitypaul/naira-exchange-rate/issues).\n\n## Credits\n\n- [Paul Edward](https://github.com/infinitypaul)\n- [Olutoye Owojaye](https://github.com/teeto4517)\n- [All Contributors](../../contributors)\n\n## How can I thank you?\n\nWhy not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!\n\nDon't forget to [follow me on twitter](https://twitter.com/infinitypaul)!\n\nThanks!\u003cbr\u003e\nEdward Paul.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Fnaira-exchange-rates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitypaul%2Fnaira-exchange-rates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Fnaira-exchange-rates/lists"}