Code Monkey home page Code Monkey logo

fynance's Introduction

Portfolio

Senior Software Engineer with 18+ years of experience in .NET, C#, Node.Js, Javascript, Typescript and also software engineering practices. Proven ability to AWS and Azure cloud providers to design and implement cloud native solutions and also to soft skills such as communication, teamwork, mentoring, training and leadership. This is my Portfolio which is constantly under construction and here you can check some repositories with demo projects, code samples, open source projects, packages and more.

๐Ÿ”— Links

๐Ÿ’ป Projects

โ˜๏ธ Cloud Projects

๐Ÿ’Š How To Projects

๐Ÿ”“ Open Source Projects - Packages

โœ”๏ธ Challenging Projects



๐Ÿ‘ด Old Projects

:octocat: Github Stats

Felipe Oriani's github stats

Top Languages

trophy

Thank you.

fynance's People

Contributors

ceakay avatar dependabot[bot] avatar eduvencovsky avatar felipeoriani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fynance's Issues

Getting exception on GetAsync() for symbol on TSX.V

Getting exception on GetAsync() for symbol DOC.V

Newtonsoft.Json.JsonSerializationException
HResult=0x80131500
Message=Error converting value {null} to type 'System.Int32'. Path 'chart.result[0].meta.firstTradeDate', line 1, position 131.
Source=Newtonsoft.Json
StackTrace:
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Fynance.YahooTicker.d__2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

Inner Exception 1:
InvalidCastException: Null object cannot be converted to a value type.

Source:
FyResult response = await Ticker.Build() .SetSymbol(symbol) .SetPeriod(Period.OneDay) .SetInterval(Interval.OneMinute) .GetAsync();

Started throwing an exception today!

Good evening,
I have a C# app using your worderful wrapper for Yahoo Finance. This afternoon, I noticed it was throwing an exception;

Fynance.FynanceException: Fynance.Yahoo: This result was not possible to get from Yahoo Finance.

This is a sample of my call - the strTicker = "SPY"
var result = await Ticker.Build()
.SetSymbol(strTicker)
.SetTimeZone(TimeZoneInfo.Local)
.SetPeriod(Period.OneYear)
.SetInterval(Interval.OneDay)
.GetAsync();

The resulting URL I see in your code is

https://query1.finance.yahoo.com/v8/finance/chart/SPY?range=1y&interval=1d

This URL works fine from a browser...

Any ideas?
Thanks for the great work!
Mark

Average Volume(3M) not available

Hello, is it possible to add the Average Volume (3M) for a stock indicator or quote?

Also, is it possible to just add all the advanced stats of a stock quote that one can view at other yahoo finance APIs as well?

Thank you

I'm trying to get accurate stock history but the periods are all over the place

I'm trying to get accurate stock history but the periods are all over despite coding it correctly. Here's an example with MSFT:

var res = await Ticker.Build()
                    .SetPeriod(Period.ThreeMonths)
                    .SetInterval(Interval.OneDay)
                    .SetSymbol("MSFT")
                    .GetAsync();

and these are the results when I print out the period of each quote:

10/4/2021 1:30:00 PM
10/5/2021 1:30:00 PM
10/6/2021 1:30:00 PM
10/7/2021 1:30:00 PM
10/8/2021 1:30:00 PM
10/11/2021 1:30:00 PM
10/12/2021 1:30:00 PM
10/13/2021 1:30:00 PM
10/14/2021 1:30:00 PM
10/15/2021 1:30:00 PM
10/18/2021 1:30:00 PM
10/19/2021 1:30:00 PM
10/20/2021 1:30:00 PM
10/21/2021 1:30:00 PM
10/22/2021 1:30:00 PM
10/25/2021 1:30:00 PM
10/26/2021 1:30:00 PM
10/27/2021 1:30:00 PM
10/28/2021 1:30:00 PM
10/29/2021 1:30:00 PM
11/1/2021 1:30:00 PM
11/2/2021 1:30:00 PM
11/3/2021 1:30:00 PM
11/4/2021 1:30:00 PM
11/5/2021 1:30:00 PM
11/8/2021 2:30:00 PM
11/9/2021 2:30:00 PM
11/10/2021 2:30:00 PM
11/11/2021 2:30:00 PM
11/12/2021 2:30:00 PM
11/15/2021 2:30:00 PM
11/16/2021 2:30:00 PM
11/17/2021 2:30:00 PM
11/18/2021 2:30:00 PM
11/19/2021 2:30:00 PM
11/22/2021 2:30:00 PM
11/23/2021 2:30:00 PM
11/24/2021 2:30:00 PM
11/26/2021 2:30:00 PM
11/29/2021 2:30:00 PM
11/30/2021 2:30:00 PM
12/1/2021 2:30:00 PM
12/2/2021 2:30:00 PM
12/3/2021 2:30:00 PM
12/6/2021 2:30:00 PM
12/7/2021 2:30:00 PM
12/8/2021 2:30:00 PM
12/9/2021 2:30:00 PM
12/10/2021 2:30:00 PM
12/13/2021 2:30:00 PM
12/14/2021 2:30:00 PM
12/15/2021 2:30:00 PM
12/16/2021 2:30:00 PM
12/17/2021 2:30:00 PM
12/20/2021 2:30:00 PM
12/21/2021 2:30:00 PM
12/22/2021 2:30:00 PM
12/23/2021 2:30:00 PM
12/27/2021 2:30:00 PM
12/28/2021 2:30:00 PM
12/29/2021 2:30:00 PM
12/30/2021 2:30:00 PM
12/31/2021 2:30:00 PM
1/3/2022 2:30:00 PM

Some say 1:30pm, others say 2:30pm, and even with other stocks, some say 9:00pm. Also the stock market hours are 9:30pm to 4:00pm EST. So even when considering the possibility of time zones, we still won't get the quote data of the stock when it actually closed.

Thirty Minute Interval Not Supported

Is there any particular reason that you are replacing 30m with 15m on all calls?

	// Add the interval based on Interval property.
	var interval = YUtils.GetInterval(Interval == Interval.ThirtyMinutes ? Interval.FifteenMinutes : Interval);

Naming seems wrong for one of the method

		/// <summary>
		/// Set interval between two dates.
		/// </summary>
		/// <param name="startDate">Start date.</param>
		/// <param name="finishDate">Finish date.</param>
		/// <returns>The instance itself.</returns>
		public virtual Ticker SetInterval(DateTime startDate, DateTime finishDate)
			=> SetStartDate(startDate).SetFinishDate(finishDate);

Based on the rest of the methods I think this should be named SetPeriod under the hood it use SetStartDate and SetFinishDate and both are mutating the period not the interval

API works normal time but UTC 0:00 not working

I Wanted to take open prices at UTC 0:0:0 ( Bit flexible if there is delay of 15 min I can take open prices at UTC 0:15:0) I am using following code
var result = await Ticker.Build()
.SetSymbol("ETH-USD")
.SetStartDate(testDate.AddDays(-3))
.SetFinishDate(testDate)
.SetInterval(Interval.OneDay)
.GetAsync();

This code works perfectly at UTC 5:0:0 am but when i run the code in the morning UTC 0:0:0 it give s me only three records instead of 4 ( e.g if i request todays date it will skip yesterday)
Am i doing any thing wrong here. I can see the data is available for today at UTC 0:0 just not able to get the data for last 4 days during that time

If i run in morning same code works

any suggestions or there is bug ?

Thank you for this awesome lib , works nicely except the scenario mentioned above

Regarda
T

Ticker lookup does not flush results when invalid symbol is presented

Below is snippet to check if list of symbols is valid.

                        foreach (string exclusionSymbol in exclusionSymbols)
                        {
                            Console.Write("{0} ", exclusionSymbol);
                            exclusionCheck = new Fynance.Result.FyResult();
                            try
                            {
                                exclusionCheck = await Ticker.Build()
                                        .SetSymbol(exclusionSymbolRead)
                                        .SetPeriod(Period.OneDay)
                                        .SetInterval(Interval.OneDay)
                                        .GetAsync();
                                Console.WriteLine(exclusionCheck.RegularMarketPrice);
                            }
                            catch (Exception ex)
                            {
                                exclExcep += ex.Message;
                                Console.WriteLine(exclusionSymbol + " " + exclExcep);
                                failedSymbols.Add(exclusionSymbol);
                            }
                        }

exclusionCheck does not present an exception, and instead will just return results of previous valid lookup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.