{"id":19091679,"url":"https://github.com/felipeoriani/fynance","last_synced_at":"2025-08-03T19:04:40.064Z","repository":{"id":40872486,"uuid":"267479876","full_name":"felipeoriani/Fynance","owner":"felipeoriani","description":"Fynance is a handy wrapper to get stock market quotes written in C# available at NuGet package manager for .NET applications.","archived":false,"fork":false,"pushed_at":"2024-06-04T17:55:54.000Z","size":104,"stargazers_count":26,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T05:06:20.003Z","etag":null,"topics":["csharp","dotnet","dotnet-core","finance","stock-data","stock-market","stock-quotes","yahoo","yahoo-finance","yahoo-finance-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipeoriani.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}},"created_at":"2020-05-28T03:02:47.000Z","updated_at":"2025-02-12T18:00:21.000Z","dependencies_parsed_at":"2023-02-01T06:15:34.600Z","dependency_job_id":null,"html_url":"https://github.com/felipeoriani/Fynance","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeoriani%2FFynance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeoriani%2FFynance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeoriani%2FFynance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipeoriani%2FFynance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipeoriani","download_url":"https://codeload.github.com/felipeoriani/Fynance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914367,"owners_count":21182408,"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":["csharp","dotnet","dotnet-core","finance","stock-data","stock-market","stock-quotes","yahoo","yahoo-finance","yahoo-finance-api"],"created_at":"2024-11-09T03:16:40.237Z","updated_at":"2025-04-14T16:22:34.867Z","avatar_url":"https://github.com/felipeoriani.png","language":"C#","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=BRLZR87XSBQT8\u0026source=url"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![Fynance](https://raw.githubusercontent.com/felipeoriani/Fynance/master/logo.png)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/felipeoriani/Fynance/.github/workflows/pipeline.yml?branch=main)](https://img.shields.io/github/actions/workflow/status/felipeoriani/Fynance/.github/workflows/pipeline.yml?branch=main)\n\n[![NuGet](https://img.shields.io/nuget/v/fynance.svg)](https://www.nuget.org/packages/Fynance)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/Fynance.svg)](https://www.nuget.org/packages/Fynance)\n[![GitHub Stars](https://img.shields.io/github/stars/felipeoriani/fynance.svg)](https://github.com/felipeoriani/fynance/stargazers)\n[![GitHub Issues](https://img.shields.io/github/issues/felipeoriani/fynance.svg)](https://github.com/felipeoriani/fynance/issues)\n[![Apache License](https://img.shields.io/github/license/felipeoriani/fynance.svg)](LICENSE)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=BRLZR87XSBQT8\u0026source=url)\n\n\u003c/div\u003e\n\nFynance is a handy wrapper to get stock market quotes written in .Net Standard. It is currently support the Yahoo Finance but it can be extended to other APIs.\n\n## Installation - Nuget Package\n\nThis is available on [nuget package](https://www.nuget.org/packages/Fynance).\n\n```\nInstall-Package Fynance\n```\n\nTo update the package to the last version use the following nuget statement:\n\n```\nUpdate-Package Fynance\n``` \n\n## Fynance Examples\n\nWhat data you can get with `Fynance`:\n\n- Get Security Info\n- Get Quotes \n- Get Events\n  - Get Dividends\n  - Get Splits\n\n#### General Usage \n\nFirst you have to add the `Fynance` namespace to make the types available on your code:\n\n```c#\nusing Fynance;\n```\n\nThe *Fynance* implements a fluent interface to read data from a stock market api. Given it, a instance of `Ticker` is a representation of a security on the stock market. Then you can make an instance of `Ticker` and use all the methods to configure what you want to have until call the `Get` method. There is a `async` version of this method called `GetAsync`. The following code is a sample of use:\n\n```c#\nvar result = await Ticker.Build()\n                         .SetSymbol(\"MSFT\")\n                         .SetPeriod(Period.OneMonth)\n                         .SetInterval(Interval.OneDay)\n                         .GetAsync();\n```\n\nThe `Build` method instance the `Ticker` object and all these `Set` methods configure what information you want to get from the available APIs.\n\nTo the the *events* as we call *dividends* or *splits* you can use `SetDividends` and `SetEvents` to define it:\n```c#\nvar result = await Ticker.Build()\n                         .SetSymbol(\"MSFT\")\n                         .SetPeriod(Period.OneMonth)\n                         .SetInterval(Interval.OneDay)\n                         .SetDividends(true)\n                         .SetEvents(true)\n                         .GetAsync();\n```\n\nAlternatively, you can use the method `.SetEvents(true)` and it will set `Dividends` and `Splits`.\n\nWhen you call the `Get` methods, you get a instance of `FyResult`. It contains all the data following the methods configured over the `Ticker`. The `FyResult` can contain all the information from the *Security*, the *OLHC* history, dividends and splits.\n\n##### Results\n\nThere are many information you can read from the security, see some samples available:\n\n```c#\nvar currenty = result.Currency;\nvar symbol = result.Symbol;\nvar symbol = result.ExchangeName;\n```\n   \nReading all the *OLHC* history:\n\n```c#\nforeach (var item in result.Quotes)\n{\n   var period = item.Period; // DateTime\n   var open = item.Open; // Decimal\n   var low = item.Low; // Decimal\n   var high = item.High; // Decimal \n   var close = item.Close; // Decimal \n   var close = item.Close; // Decimal \n   var adjClose = item.AdjClose; // Decimal \n   var volume = item.Volume; // Decimal\n}\n```\n\nReading the dividends:\n\n```c#\nforeach (var item in result.Dividends)\n{\n   var date = item.Date; // DateTime: Payment date \n   var value = item.value; // Decimal: Payment value\n}\n```\n\nReading the splits:\n\n```c#\nforeach (var item in result.Splits)\n{\n   var date = item.Date; // DateTime: Event Date \n   var numerator = item.Numberator; // Decimal: Numerator of splits\n   var denominator = item.Denominator; // Decimal: Denominator of split\n}\n```\n\n\n### Issue Reports\n\nIf you find any issue, please report them using the [GitHub issue tracker](https://github.com/felipeoriani/Fynance/issues). Would be great if you provide a sample of code or a repository with a sample project.\n\n### Contributions\n\nContributions are welcome, feel free to fork the repository and send a pull request with your changes to contribute with the package.\n\n### Licenses\n\nThis software is distributed under the terms of the *Apache License 2.0*. Please, read the [LICENSE](https://github.com/felipeoriani/Fynance/blob/master/LICENSE) file available on this repository.\n\n### Credits\n\nThis project is a collab of [@FelipeOriani](https://github.com/felipeoriani/) and [@EduVencovsky](https://github.com/eduvencovsky/).\n\nMany thanks for the [Newtonsoft.Json](https://www.newtonsoft.com/json) packaged used as a dependency of this project.\n\nIf you wanna colaborate with this project or it was useful to you, make a donate:\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=BRLZR87XSBQT8\u0026source=url)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipeoriani%2Ffynance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipeoriani%2Ffynance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipeoriani%2Ffynance/lists"}