{"id":15823875,"url":"https://github.com/stefh/freecurrencyapi","last_synced_at":"2026-01-02T13:35:58.751Z","repository":{"id":227533207,"uuid":"769506699","full_name":"StefH/FreecurrencyAPI","owner":"StefH","description":"RestEase Client for Freecurrency API","archived":false,"fork":false,"pushed_at":"2025-06-20T06:30:02.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-05T12:41:31.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/StefH.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,"zenodo":null}},"created_at":"2024-03-09T09:18:16.000Z","updated_at":"2025-06-20T06:30:06.000Z","dependencies_parsed_at":"2024-03-16T21:13:26.594Z","dependency_job_id":"3d110ba8-848a-4e84-a984-6e83a9ea56e0","html_url":"https://github.com/StefH/FreecurrencyAPI","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":"0.47058823529411764","last_synced_commit":"4c7f7a1f16d9bd946bcfda4ca7bd7eeed83fa762"},"previous_names":["stefh/freecurrencyapi"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/StefH/FreecurrencyAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FFreecurrencyAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FFreecurrencyAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FFreecurrencyAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FFreecurrencyAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/FreecurrencyAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FFreecurrencyAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270014251,"owners_count":24512611,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2024-10-05T08:23:58.046Z","updated_at":"2026-01-02T13:35:58.697Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![icon](./resources/icon_32x32.png) Freecurrency-API\nUnofficial [RestEase](https://github.com/canton7/RestEase) C# Client for [freecurrencyapi](https://app.freecurrencyapi.com) which uses [IMemoryCache](https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory) to cache the results.\n\n## NuGet\n[![NuGet Badge](https://img.shields.io/nuget/v/Freecurrency-API)](https://www.nuget.org/packages/Freecurrency-API) \n\n## Configuration\n\nYou will need your ApiKey to use freecurrencyapi, you can get one [https://app.freecurrencyapi.com/register](https://app.fxapi.com/register).\n\nRegister the client via Dependency Injection:\n\n``` csharp\nservices.AddFreecurrencyAPI(o =\u003e\n    o.ApiKey = \"[YOUR_API_KEY]\"\n);\n```\n\n## Usage\n\n### Status\n\nReturns your current quota\n``` csharp\nIFreecurrencyClient client = // get from DI\nvar statusResponse = await client.GetStatusAsync();\n```\n\n### Latest Exchange Rates\n\nReturns the latest exchange rates. The default base currency is USD.\n``` csharp\nIFreecurrencyClient client = // get from DI\nvar rates = await _client.GetLatestExchangeRatesAsync(CurrencyCodes.USD, new [ CurrencyCodes.EUR, CurrencyCodes.AUD ]);\n\nvar rate = await _client.GetLatestExchangeRateAsync(CurrencyCodes.USD, CurrencyCodes.EUR);\n```\n\n### Historical Exchange Rates\n\nReturns the latest exchange rates. The default base currency is USD.\n\n``` csharp\n// todo\n```\n\n### Currencies\n\nReturns all supported currencies\n``` csharp\nIFreecurrencyClient client = // get from DI\nvar currencyResponse = await client.GetCurrency(\"EUR\");\n\nvar currenciesResponse = await client.GetCurrencies(new [] { \"EUR\", \"USD\" });\n\nvar allCurrenciesResponse = await client.GetCurrencies();\n```\n\n### Options\n``` csharp\npublic class FreecurrencyAPIOptions\n{\n    /// \u003csummary\u003e\n    /// The required BaseAddress.\n    /// \u003c/summary\u003e\n    [Required]\n    public Uri BaseAddress { get; set; } = new(\"https://api.freecurrencyapi.com/v1\");\n\n    [Required]\n    public string ApiKey { get; set; } = null!;\n\n    /// \u003csummary\u003e\n    /// Optional HttpClient name to use.\n    /// \u003c/summary\u003e\n    public string? HttpClientName { get; set; }\n\n    /// \u003csummary\u003e\n    /// This timeout in seconds defines the timeout on the HttpClient which is used to call the BaseAddress.\n    /// Default value is 60 seconds.\n    /// \u003c/summary\u003e\n    [Range(1, int.MaxValue)]\n    public int TimeoutInSeconds { get; set; } = 60;\n\n    /// \u003csummary\u003e\n    /// The maximum number of retries.\n    /// \u003c/summary\u003e\n    [Range(0, 99)]\n    public int MaxRetries { get; set; } = 3;\n\n    /// \u003csummary\u003e\n    /// In addition to Network failures, TaskCanceledException, HTTP 5XX and HTTP 408. Also retry these \u003csee cref=\"HttpStatusCode\"/\u003es. [Optional]\n    /// \u003c/summary\u003e\n    public HttpStatusCode[]? HttpStatusCodesToRetry { get; set; }\n\n    /// \u003csummary\u003e\n    /// The cache expiration time in minutes for the latest exchange rates.\n    /// Default value is 60 minutes.\n    /// \u003c/summary\u003e\n    [Range(0, int.MaxValue)]\n    public int GetLatestExchangeRatesCacheExpirationInMinutes { get; set; } = 60;\n\n    /// \u003csummary\u003e\n    /// The cache expiration time in hours for the currencies.\n    /// Default value is 24 hours.\n    /// \u003c/summary\u003e\n    [Range(0, int.MaxValue)]\n    public int GetCurrenciesCacheExpirationInHours { get; set; } = 24;\n}\n```\n\n## References\n- https://freecurrencyapi.com/docs/\n\n\n## Sponsors\n\n[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=StefH) and [Dapper Plus](https://dapper-plus.net/?utm_source=StefH) are major sponsors and proud to contribute to the development of **Freecurrency-API**.\n\n[![Entity Framework Extensions](https://raw.githubusercontent.com/StefH/resources/main/sponsor/entity-framework-extensions-sponsor.png)](https://entityframework-extensions.net/bulk-insert?utm_source=StefH)\n\n[![Dapper Plus](https://raw.githubusercontent.com/StefH/resources/main/sponsor/dapper-plus-sponsor.png)](https://dapper-plus.net/bulk-insert?utm_source=StefH)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Ffreecurrencyapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Ffreecurrencyapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Ffreecurrencyapi/lists"}