{"id":13693285,"url":"https://github.com/osfx/open_exchange_rates","last_synced_at":"2025-05-02T21:31:49.062Z","repository":{"id":94959924,"uuid":"65519769","full_name":"osfx/open_exchange_rates","owner":"osfx","description":"A library for Open Exchange Rates API","archived":false,"fork":false,"pushed_at":"2017-03-31T11:59:04.000Z","size":69,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-12T19:41:10.680Z","etag":null,"topics":["api","api-client","crystal","currencies","openexchangerates"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/osfx.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}},"created_at":"2016-08-12T03:19:43.000Z","updated_at":"2020-10-20T20:02:04.000Z","dependencies_parsed_at":"2023-03-06T18:45:43.614Z","dependency_job_id":null,"html_url":"https://github.com/osfx/open_exchange_rates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfx%2Fopen_exchange_rates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfx%2Fopen_exchange_rates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfx%2Fopen_exchange_rates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfx%2Fopen_exchange_rates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osfx","download_url":"https://codeload.github.com/osfx/open_exchange_rates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252108860,"owners_count":21696150,"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":["api","api-client","crystal","currencies","openexchangerates"],"created_at":"2024-08-02T17:01:07.963Z","updated_at":"2025-05-02T21:31:48.748Z","avatar_url":"https://github.com/osfx.png","language":"Crystal","funding_links":[],"categories":["Third-party APIs"],"sub_categories":[],"readme":"# OpenExchangeRates\nCrystal library for [Open Exchange Rates Service](https://openexchangerates.org)\n\n## Docs\n[![docrystal.org](http://docrystal.org/badge.svg)](http://docrystal.org/github.com/osfx/open_exchange_rates)\n\n## Installation\n\n\nAdd this to your application\"s `shard.yml`:\n\n```yaml\ndependencies:\n  open_exchange_rates:\n    github: osfx/open_exchange_rates\n```\n\n\n## Usage\n```crystal\nrequire \"open_exchange_rates\"\n```\n### Latest:\nGet the latest exchange rates available from the Open Exchange Rates API.\n\n**Exapmple:**\n```crystal\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nputs oxr.latest       #=\u003e return mapped object\nputs oxr.latest.rates #=\u003e {\"AED\" =\u003e 3.672852, \"AFN\" =\u003e 67.842051, \"ALL\" =\u003e 121.8915, \"AMD\" =\u003e 476.242503...\nputs oxr.latest[\"EUR\"]#=\u003e 0.8942\n\n```\n\n### Historical:\nGet historical exchange rates for any date available from the Open Exchange Rates API.\n\n**Exapmple:**\n```crystal\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nputs oxr.historical(\"2016-01-01\") #=\u003e {\"AED\" =\u003e 3.672754, \"AFN\" =\u003e 68.45, \"ALL\" =\u003e 125.9742, \"AMD\" =\u003e 483.75, \"ANG\" =\u003e 1.78875, \"AOA\" =\u003e 135.256669, \"ARS\" =\u003e 12.96635, \"AUD\" =\u003e 1.37393, \"AWG\" =\u003e 1.790083, \"AZN\" =\u003e 1.562017, \"BAM\" =\u003e 1.797331...}\n\n```\n\n### Currencies:\nGet a JSON list of all currency symbols available from the Open Exchange Rates API\n\n**Exapmple:**\n```crystal\n\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nputs oxr.currencies #=\u003e \"{\"AED\" =\u003e \"United Arab Emirates Dirham\", \"AFN\" =\u003e \"Afghan Afghani\", \"ALL\" =\u003e \"Albanian Lek\", \"AMD\" =\u003e \"Armenian Dram\", \"ANG\" =\u003e \"Netherlands Antillean Guilder\", \"AOA\" =\u003e \"Angolan Kwanza\", \"ARS\" =\u003e \"Argentine Peso\"...}\n\n```\n\n### Time-Series:\nGet historical exchange rates for a given time period, where available.\n\n[**Open Exchange Rates time-series original docs**](https://docs.openexchangerates.org/docs/time-series-json)\n\n**Exapmple:**\n```crystal\n\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nputs oxr.time_series(\"2016-01-01\", \"2016-01-31\", \"EUR,BTC\")\n#=\u003e {\"2016-01-01\" =\u003e {\"BTC\" =\u003e 0.0023245218, \"EUR\" =\u003e 0.920961}, \"2016-01-02\" =\u003e {\"BTC\" =\u003e 0.00230479, \"EUR\" =\u003e 0.920862}, \"2016-01-03\" =\u003e {\"BTC\" =\u003e 0.0023312414, \"EUR\" =\u003e 0.920289}, \"2016-01-04\" =\u003e {\"BTC\" =\u003e 0.0022988242, \"EUR\" =\u003e 0.923285}, \"2016-01-05\" =\u003e {\"BTC\" =\u003e 0.0023133529, \"EUR\" =\u003e 0.930028}, \"2016-01-06\" =\u003e {\"BTC\" =\u003e 0.002318432, \"EUR\" =\u003e 0.92771}, \"2016-01-07\" =\u003e {\"BTC\" =\u003e 0.0021923574, \"EUR\" =\u003e 0.915366}}\n```\n\n### Convert:\nConvert any money value from one currency to another at the latest API rates.\n[**Open Exchange Rates convert docs**](https://docs.openexchangerates.org/docs/convert)\n\n**Exapmple:**\n```crystal\n\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nresult = oxr.convert(value: 800.23, from: \"USD\", to: \"BTC\")\nputs result[\"meta\"] #=\u003e \"{\"timestamp\" =\u003e 1470957306, \"rate\" =\u003e 0.001700835604}\"\n\n```\n\n### Usage:\nShow usage information\n\n**Exapmple:**\n```crystal\n\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\n\noxr = OpenExchangeRates::API.new(\"your_awesome_app_id\")\nusage = oxr.usage\nputs usage.to_json                  #=\u003e {\"app_id\":\"your_awesome_app_id\",\"status\":\"active\",\"plan\":{\"name\":\"Unlimited\",\"quota\":\"Unlimited requests/month\",\"update_frequency\":\"300s\",\"features\":{\"base\":true,\"symbols\":true,\"experimental\":true,\"time-series\":true,\"convert\":true}},\"usage\":{\"requests\":275,\"requests_quota\":-1,\"requests_remaining\":-1,\"days_elapsed\":14,\"days_remaining\":17,\"daily_average\":19}}\nputs usage.status                   #=\u003e \"active\"\nputs usage.plan.to_json             #=\u003e {\"name\":\"Unlimited\",\"quota\":\"Unlimited requests/month\",\"update_frequency\":\"300s\",\"features\":{\"base\":true,\"symbols\":true,\"experimental\":true,\"time-series\":true,\"convert\":true}}\nputs usage.plan.name                #=\u003e \"Unlimited\"\nputs usage.plan.quota               #=\u003e \"Unlimited requests/month\"\nputs usage.plan.update_frequency    #=\u003e \"300s\"\nputs usage.plan.features            #=\u003e {\"base\" =\u003e true, \"symbols\" =\u003e true, \"experimental\" =\u003e true, \"time-series\" =\u003e true, \"convert\" =\u003e true}\n```\n\n\n\n## Contributing\n\n1. Fork it ( https://github.com/osfx/open_exchange_rates/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am \"Add some feature\")\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Contributors\n\n- [ Peter Boriskin](https://github.com/osfx) - creator, maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfx%2Fopen_exchange_rates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosfx%2Fopen_exchange_rates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfx%2Fopen_exchange_rates/lists"}