I use the php solution in my website and it's also working for now. But no one knows if and when Y will tighten its security's features. The cookie's validity of 1 year is e.g. very convenient ...
Re: Yahoo has changed their protocol
[Re: Sphin]
#466127 05/26/1706:4005/26/1706:40
Another way is to use the .NET webbrowser control in order to load the whole website from yahoo, boerse-frankfurt etc. Then we get a HTML document object and can walk through the tables and it's rows and cells to get the quotes. This is working for me, too.
Re: Yahoo has changed their protocol
[Re: Jens]
#466155 05/27/1717:0805/27/1717:08
For many ETFs I get historical prices only for 2 years via the described Yahoo interface. For the same ETFs I get 5 years or more at boerse-frankfurt.de.
Re: Yahoo has changed their protocol
[Re: jcl]
#466157 05/27/1723:3905/27/1723:39
I made this .Net exe from previous links to C# code source code attached.
Put the exe in zorro folder. Then call it with this in Zorro
var dataFromYahoo(string Code, int mode) { string Format; if (mode == FROM_YAHOO | UNADJUSTED) Format = "%Y-%m-%d,f3,f1,f2,,f4,f6";//UnadjAdj Close else if (mode == FROM_YAHOO) Format = "%Y-%m-%d,f3,f1,f2,f4,,f6";//Adj Close
exec("YahooFinanceAPI.exe", Code, 1); //exec("YahooFinanceAPI.exe", "AAPL 1",1); dataNew(1, 0, 7); int numRecord = dataParse(1, Format, "History\history.csv"); printf("n%s %d records read from YAHOO", Code, numRecord); dataSave(1, strf("%s.t6", Code)); return numRecord; }
Re: Yahoo has changed their protocol
[Re: vinsom]
#466214 06/01/1709:0906/01/1709:09
I made this .Net exe from previous links to C# code source code attached.
Put the exe in zorro folder. Then call it with this in Zorro
var dataFromYahoo(string Code, int mode) { string Format; if (mode == FROM_YAHOO | UNADJUSTED) Format = "%Y-%m-%d,f3,f1,f2,,f4,f6";//UnadjAdj Close else if (mode == FROM_YAHOO) Format = "%Y-%m-%d,f3,f1,f2,f4,,f6";//Adj Close
exec("YahooFinanceAPI.exe", Code, 1); //exec("YahooFinanceAPI.exe", "AAPL 1",1); dataNew(1, 0, 7); int numRecord = dataParse(1, Format, "Historyhistory.csv"); printf("n%s %d records read from YAHOO", Code, numRecord); dataSave(1, strf("%s.t6", Code)); return numRecord; }
Thank you but I don't quite understand this.
Where is the exe code?
What's the purpose of the code here? Should I put it into the script hwere I use FROM_YAHOO?
What's the purpose of the attachment?
I am new here but I really need this working.
Jeff
Re: Yahoo has changed their protocol
[Re: Jeff1228]
#466225 06/01/1721:0606/01/1721:06
You need to compile the attached code with MS Visual studio (can't attach exe). This will generate the exe YahooFinanceAPI.exe. Put this in the Zorro folder. Then get the history with the zorro code snippet above, that will call the exe generated, with exec("YahooFinanceAPI.exe", Code, 1);. Cheers
Re: Yahoo has changed their protocol
[Re: vinsom]
#466237 06/02/1708:0506/02/1708:05
Sorry I dont have MS Visual Studio. Can you please upload the exe to wetransfer.com or similar site? Thanks! Update: i tried to build with msbuild but didnt compile because of error.
Last edited by konorti; 06/02/1719:30.
Re: Yahoo has changed their protocol
[Re: konorti]
#466247 06/02/1723:5406/02/1723:54