{"id":16060320,"url":"https://github.com/maful/vici-exchange-rates","last_synced_at":"2025-07-19T06:37:28.102Z","repository":{"id":56897399,"uuid":"237383464","full_name":"maful/vici-exchange-rates","owner":"maful","description":"A Ruby Library for current and historical foreign exchange rates.","archived":false,"fork":false,"pushed_at":"2023-03-19T16:39:28.000Z","size":45,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T12:58:34.790Z","etag":null,"topics":["exchange-rates","hacktoberfest","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/maful.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-01-31T07:48:00.000Z","updated_at":"2021-10-01T00:04:19.000Z","dependencies_parsed_at":"2024-10-23T05:35:08.239Z","dependency_job_id":null,"html_url":"https://github.com/maful/vici-exchange-rates","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.11111111111111116","last_synced_commit":"b2904322f53b26568c6b2ebf4ba46f895a0f4ca4"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/maful/vici-exchange-rates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fvici-exchange-rates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fvici-exchange-rates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fvici-exchange-rates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fvici-exchange-rates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maful","download_url":"https://codeload.github.com/maful/vici-exchange-rates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fvici-exchange-rates/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265898334,"owners_count":23845775,"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":["exchange-rates","hacktoberfest","ruby"],"created_at":"2024-10-09T04:03:01.105Z","updated_at":"2025-07-19T06:37:28.075Z","avatar_url":"https://github.com/maful.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vici::ExchangeRates\n\n\u003e A Simple and Rich for Exchange Rates\n\n![CI](https://github.com/maful/vici-exchange-rates/workflows/CI/badge.svg?branch=master)\n[![Gem Version](https://badge.fury.io/rb/vici-exchange-rates.svg)](https://badge.fury.io/rb/vici-exchange-rates)\n[![GitHub license](https://img.shields.io/github/license/maful/vici-exchange-rates)](https://github.com/maful/vici-exchange-rates/blob/master/LICENSE.txt)\n\n**Vici::ExchangeRates** is an unofficial SDK for the [ExchangeRatesAPI](https://exchangeratesapi.io). Exchange rates API is a free service for current and historical foreign exchange rates [published by the European Central Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html).\n\n\u003e [Libur.run](https://github.com/maful/libur.run) - Empower Your HR with Next-Gen Open Source Self-Serve Platform\n\n### Note\n- This app requires JSON. If you're using JRuby \u003c 1.7.0\n  you'll need to add `gem \"json\"` to your Gemfile or similar.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'vici-exchange-rates'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install vici-exchange-rates\n\n## Usage\n\nCurrency code must be one of the [supported currency codes](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html).\n\n**Basic usage**\n\n```ruby\nrequire 'vici/exchange_rates'\n\nrates = Vici::ExchangeRates.new\n# or you can retrieve JSON response\nrates = Vici::ExchangeRates.new(true) \nrates.fetch\n```\n\n**Historical rates for any day since 1999**\n\n```ruby\nrates.at_date('2018-02-02')\nrates.fetch\n# OR\nrates.at_date('2018-02-02').fetch \n```\n\n**Latest exchange rates with different base currency (Euro by default)**\n\n```ruby\nrates.base_currency('IDR')\nrates.fetch \n```\n\n**Specific exchange rates**\n\n```ruby\nrates.rates('IDR')\n\n# multi exchange rates\nrates.rates(['IDR', 'USD']) \nrates.fetch \n# =\u003e {\"rates\"=\u003e{\"USD\"=\u003e1.1052, \"IDR\"=\u003e15091.51}, \"base\"=\u003e\"EUR\", \"date\"=\u003e\"2020-01-31\"}\n```\n\n**Historical rates for a time period**\n\n```ruby\nrates.period(date_from: '2018-01-03', date_to: '2018-02-05') \nrates.fetch \n```\n\n**Limit to specific exchange rates**\n\n```ruby\nrates.rates(['IDR', 'JPY']).period(date_from: '2018-01-03', date_to: '2018-02-05') \nrates.fetch \n```\n\n**Historical rates with different currency**\n\n```ruby\nrates.base_currency('JPY').period(date_from: '2018-01-03', date_to: '2018-02-05') \nrates.fetch\n```\n\n## Supported Currencies\n\nThe library supports any currency currently available on the European Central Bank's web service, please refer to [here](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html).\n\n## Contributing\n\n1. Fork [the repo](https://github.com/maful/vici-exchange-rates)\n2. Grab dependencies: `bundle install`\n3. Make sure everything is working: `bundle exec rake spec`\n4. Make your changes\n5. Test your changes\n5. Create a Pull Request\n6. Celebrate!!!!!\n\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## Copyright\n\nCopyright (c) 2020 Maful Prayoga A. See LICENSE for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaful%2Fvici-exchange-rates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaful%2Fvici-exchange-rates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaful%2Fvici-exchange-rates/lists"}