{"id":20121874,"url":"https://github.com/peregin/exchange-rate-service","last_synced_at":"2026-07-15T20:04:48.868Z","repository":{"id":240435350,"uuid":"801117950","full_name":"peregin/exchange-rate-service","owner":"peregin","description":"Provides exchange rates from various sources","archived":false,"fork":false,"pushed_at":"2026-05-28T20:00:55.000Z","size":885,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-28T21:22:20.009Z","etag":null,"topics":["currency-exchange","fx","historical-data","rust"],"latest_commit_sha":null,"homepage":"https://rates.velocorner.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peregin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-15T16:16:18.000Z","updated_at":"2026-05-28T20:00:59.000Z","dependencies_parsed_at":"2024-05-18T21:27:54.454Z","dependency_job_id":"8baa568d-1ed0-447d-9e80-74a57a7cde44","html_url":"https://github.com/peregin/exchange-rate-service","commit_stats":null,"previous_names":["peregin/exchange-rate-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peregin/exchange-rate-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peregin%2Fexchange-rate-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peregin%2Fexchange-rate-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peregin%2Fexchange-rate-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peregin%2Fexchange-rate-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peregin","download_url":"https://codeload.github.com/peregin/exchange-rate-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peregin%2Fexchange-rate-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35519094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-exchange","fx","historical-data","rust"],"created_at":"2024-11-13T19:33:18.323Z","updated_at":"2026-07-15T20:04:48.862Z","avatar_url":"https://github.com/peregin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://dl.circleci.com/status-badge/img/gh/peregin/exchange-rate-service/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/peregin/exchange-rate-service/tree/master)\n\n# Exchange Rate Service\nConnects to various data sources on demand and retrieves the latest conversion rates.\nIt uses a one-hour cache.\n\nSupports the following `json` endpoints:\n- /rates/currencies - to retrieve supported currencies\n- /rates/:base - to retrieve all FX rates for a given base currency\n- /rates/:base/:counter - to retrieve a specific rate for a given currency pair\n\nThe root path `/` retrieves a welcome page in `text/html`.\n\n## Requirements\n- open source and free usage (non-commercial)\n- indicative prices, update frequency is less, but at least once per day\n- provide exchange rates from Africa, e.g. UGX\n- provide historical data - helps to plot a chart trends for the last 30 days or 3 months\n\n### Currencies to be supported\nCurrencies supported in the CO-OPERAID online tool and velocorner.com product search. \n\n| ISO 4217 Currency Code | Currency Name        | Country Code | Country        |\n|------------------------|----------------------|--------------|----------------|\n| BDT                    | Bangladeshi Taka     | BD           | Bangladesh     |\n| CHF                    | Swiss Franc          | CH           | Switzerland    |\n| EUR                    | Euro                 | EU           | Eurozone       |\n| GBP                    | British Pound        | GB           | United Kingdom |\n| KES                    | Kenyan Shilling      | KE           | Kenya          |\n| KHR                    | Cambodian Riel       | KH           | Cambodia       |\n| LAK                    | Lao Kip              | LA           | Laos           |\n| MZN                    | Mozambican Metical   | MZ           | Mozambique     |\n| MWK                    | Malawian Kwacha      | MW           | Malawi         |\n| UGX                    | Ugandan Shilling     | UG           | Uganda         |\n| NPR                    | Nepalese Rupee       | NP           | Nepal          |\n| USD                    | United States Dollar | US           | United States  |\n\n\n## Data Sources\nData sources and characteristics.\nCheck historical rates source for UGX, NPR \n\n| Site                            | KES, BDT | LAK, KIP | Free | Historical   | Quota      | Source      |\n|---------------------------------|----------|----------|------|--------------|------------|-------------|\n| ☑️ https://frankfurter.dev/     | ✅        | ✅ no KIP | ✅    | ✅ timeseries | no         | multiple    |\n| https://exchangerate.host       | ✅        | ⛔️       | ✅    | ✅            | 100/mo     | multiple    | \n| https://exchangerate-api.com    | ✅        | ⛔️       | ✅    | ⛔️ paid      | 1500/mo    | 30+         | \n| https://currencyapi.com         | ✅        | ⛔️       | ✅    | ✅            | 300/mo     | multiple    |\n| https://openexchangerates.org   | ✅        | ⛔️       | ✅    | ✅ timeseries | 1000/mo    | multiple    |\n| https://exchangeratesapi.io     | ✅        | ⛔️       | ✅    | ✅ timeseries | 250/mo     | multiple    |\n| https://currency.getgeoapi.com/ | ✅        | ⛔️       | ✅    | ✅            | 100 / day  | multiple    |\n| https://rapidapi.com            | ✅        | ⛔️       | ✅    | ⛔️           | 1000 / day | multiple    |\n| https://www.abstractapi.com/    | ⛔️       | ⛔️       | ⛔️   | ✅            | ⛔️ 500     | multiple    |\n| https://twelvedata.com/         | ✅        | ⛔️       | ✅    | ✅ timeseries | 800 / day  | multiple    |\n| https://www.centralbank.go.ke/  | ✅        | ⛔️       | ✅    | ✅            | ?          | CBK         |\n| https://currencybeacon.com/     | ✅        | ⛔️       | ✅    | ✅ timeseries | 5000 / mo  | multiple    |\n| ☑️ fawazahmed0/exchange-api     | ✅        | ⛔️       | ✅    | ✅            | no         | unknown     |\n| ☑️ https://www.floatrates.com/  | ✅        | ⛔️       | ✅    | ✅            | no         | CB multiple |\n\n### KES\n#### Get indicative rates from Central Bank Kenya\n```shell\ncurl 'https://www.centralbank.go.ke/wp-admin/admin-ajax.php?action=get_wdtable\u0026table_id=193' \\\n  -H 'accept: application/json, text/javascript, */*; q=0.01' \\\n  -H 'accept-language: en-US,en;q=0.9,de;q=0.8,hu;q=0.7,ro;q=0.6' \\\n  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \\\n  -H 'cookie: _ga=GA1.3.1169526473.1722896765; _gid=GA1.3.1539844224.1723848215; _gat=1; _ga_Y1XLH1GQQ6=GS1.3.1723876245.3.1.1723876411.41.0.0' \\\n  -H 'origin: https://www.centralbank.go.ke' \\\n  -H 'priority: u=1, i' \\\n  -H 'referer: https://www.centralbank.go.ke/forex/' \\\n  -H 'sec-ch-ua: \"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"127\", \"Chromium\";v=\"127\"' \\\n  -H 'sec-ch-ua-mobile: ?0' \\\n  -H 'sec-ch-ua-platform: \"macOS\"' \\\n  -H 'sec-fetch-dest: empty' \\\n  -H 'sec-fetch-mode: cors' \\\n  -H 'sec-fetch-site: same-origin' \\\n  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36' \\\n  -H 'x-requested-with: XMLHttpRequest' \\\n  --data-raw 'draw=1\u0026columns%5B0%5D%5Bdata%5D=0\u0026columns%5B0%5D%5Bname%5D=date_r\u0026columns%5B0%5D%5Bsearchable%5D=true\u0026columns%5B0%5D%5Borderable%5D=true\u0026columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=\u0026columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false\u0026columns%5B1%5D%5Bdata%5D=1\u0026columns%5B1%5D%5Bname%5D=currency\u0026columns%5B1%5D%5Bsearchable%5D=true\u0026columns%5B1%5D%5Borderable%5D=true\u0026columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=\u0026columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false\u0026columns%5B2%5D%5Bdata%5D=2\u0026columns%5B2%5D%5Bname%5D=ROUND(jx_views_fx_new_rates.mean%2C4)\u0026columns%5B2%5D%5Bsearchable%5D=true\u0026columns%5B2%5D%5Borderable%5D=true\u0026columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=\u0026columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false\u0026order%5B0%5D%5Bcolumn%5D=0\u0026order%5B0%5D%5Bdir%5D=desc\u0026start=0\u0026length=25\u0026search%5Bvalue%5D=\u0026search%5Bregex%5D=false'\n```\n\n#### Get KES historical rates from Central Bank Kenya\n```shell\ncurl 'https://www.centralbank.go.ke/wp-admin/admin-ajax.php?action=get_wdtable\u0026table_id=193' \\\n  -H 'accept: application/json, text/javascript, */*; q=0.01' \\\n  -H 'accept-language: en-US,en;q=0.9,de;q=0.8,hu;q=0.7,ro;q=0.6' \\\n  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \\\n  -H 'origin: https://www.centralbank.go.ke' \\\n  -H 'priority: u=1, i' \\\n  -H 'referer: https://www.centralbank.go.ke/forex/' \\\n  -H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n  -H 'sec-ch-ua-mobile: ?0' \\\n  -H 'sec-ch-ua-platform: \"macOS\"' \\\n  -H 'sec-fetch-dest: empty' \\\n  -H 'sec-fetch-mode: cors' \\\n  -H 'sec-fetch-site: same-origin' \\\n  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n  -H 'x-requested-with: XMLHttpRequest' \\\n  --data-raw 'draw=5\u0026columns%5B0%5D%5Bdata%5D=0\u0026columns%5B0%5D%5Bname%5D=date_r\u0026columns%5B0%5D%5Bsearchable%5D=true\u0026columns%5B0%5D%5Borderable%5D=true\u0026columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=11%2F03%2F2024~02%2F06%2F2024\u0026columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false\u0026columns%5B1%5D%5Bdata%5D=1\u0026columns%5B1%5D%5Bname%5D=currency\u0026columns%5B1%5D%5Bsearchable%5D=true\u0026columns%5B1%5D%5Borderable%5D=true\u0026columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=S+FRANC\u0026columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false\u0026columns%5B2%5D%5Bdata%5D=2\u0026columns%5B2%5D%5Bname%5D=ROUND(jx_views_fx_new_rates.mean%2C4)\u0026columns%5B2%5D%5Bsearchable%5D=true\u0026columns%5B2%5D%5Borderable%5D=true\u0026columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=\u0026columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false\u0026order%5B0%5D%5Bcolumn%5D=0\u0026order%5B0%5D%5Bdir%5D=desc\u0026start=0\u0026length=100\u0026search%5Bvalue%5D=\u0026search%5Bregex%5D=false\u0026sRangeSeparator=~'\n```\n\n### BDT\nGet CHF/BDT rates from Central Bank Bangladesh\n```shell\ncurl 'https://www.exchange-rates.org/api/v2/rates/lookup?isoTo=BDT\u0026isoFrom=CHF\u0026amount=1\u0026pageCode=Home' \\\n-H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n-H 'Referer: https://www.exchange-rates.org/' \\\n-H 'sec-ch-ua-mobile: ?0' \\\n-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n-H 'sec-ch-ua-platform: \"macOS\"'\n```\n\n### Floating Rates\n```shell\ncurl -s https://www.floatrates.com/daily/usd.json | jq .\ncurl \"https://www.floatrates.com/historical-exchange-rates.html?operation=rates\u0026page=historical\u0026currency_date=2024-03-11\u0026base_currency_code=CHF\u0026format_type=xml\"\n```\n\n# Docker\n```shell\n# plain\ndocker build -t peregin/velocorner.rates .\n# buildx\ndocker buildx build --platform linux/amd64 -t peregin/velocorner.rates:latest --cache-from \"type=registry,ref=peregin/velocorner.rates:latest\" --cache-to \"type=inline\" --load .\ndocker run --rm -it -p 9012:9012 peregin/velocorner.rates\n```\n\n# Rust\nhttps://www.rust-lang.org/learn/get-started\n\nInstall Rust from shell\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nUpdate `rust-analyzer`, the default is not working with IntelliJ (will cause compilation error when using `cached` library)\n```shell\nrustup component add rust-analyzer\nrustup run stable rust-analyzer --version\n```\n\n## Cargo\nUseful commands for build and package manager.\n\n```shell\n# check for updates and force specific version\ncargo update --dry-run\ncargo update actix-web --precise 4.5.1\n# clean build\ncargo clean\n# dependency tree\ncargo tree\n# remove unused dependencies\ncargo install cargo-machete \u0026\u0026 cargo machete\n# disable unused features\ncargo install cargo-features-manager\ncargo features prune\ncargo fix\ncargo build --release\ncargo install --color=always --force cargo-expand\n```\n\n#### Generate software bill of materials SBOM\n```shell\n# generate bill of materials with cyclonedx plugin\ncargo install cargo-cyclonedx\ncargo cyclonedx --format json --spec-version 1.5 --override-filename sbom\n# generate bill of materials with cargo-sbom\ncargo install cargo-sbom\ncargo sbom --output-format=cyclone_dx_json_1_4\n```\n\n\nTips for speeding up builds\nhttps://corrode.dev/blog/tips-for-faster-rust-compile-times/\n\n## Learn Rust\n- https://www.rust-lang.org/\n- https://github.com/google/comprehensive-rust - great comprehensive course\n- https://rust-exercises.com/ - learn by doing, 100 exercises\n- https://opensource.googleblog.com/2023/06/rust-fact-vs-fiction-5-insights-from-googles-rust-journey-2022.html\n- https://app.pluralsight.com/library/courses/fundamentals-rust/table-of-contents\n- https://cheats.rs/\n- https://github.com/mre/idiomatic-rust\n- https://github.com/rust-unofficial/awesome-rust\n- https://github.com/ctjhoa/rust-learning\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperegin%2Fexchange-rate-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperegin%2Fexchange-rate-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperegin%2Fexchange-rate-service/lists"}