Hi everyone,
My only problem is only to get the Options Price of a Stock, not the Stock Price. I still dont know which server to connect to and which querry should I use to retrieve them.
For stock price, for example. I used
host = gethostbyname("download.finance.yahoo.com"); // server which contain the stock price information
...
connect(Socket,(SOCKADDR*)(&SockAddr),sizeof(SockAddr));
send(Socket,"GET /d/quotes.csv?s=aa&f=nsl1mx HTTP/1.0\n\n", strlen( "GET /d/quotes.csv?s=aa&f=nsl1mx HTTP/1.0\n\n" ),0); //Querries
so I send the querries to the server download.finance.yahoo.com and was able to get the stock data, however for options, I could not do that successfully. It would be helpful if you know the server name and querry I can use with the above format to get the options data for a stock.
Free financial data sources is hardly a C++ programming question. FWIW, looks like Yahoo Finance's options price download is currently broken: you can follow links on their own site: click on "Download Data" on any options page, e.g. on http://finance.yahoo.com/q?s=AAPL121222P00600000 and it returns a CSV filled with "N/A"s. Why not report the issue to Yahoo?
So is there any other site I can use to retrieve options data. Forgive my incompetence as I only got acquainted with programming last month and had a hard time figuring things out.
But I do want to try to write a C++ program that retrieves options price, any idea for server/querry pair? Thank you
I actually read further on YQL but my knowledge on HTML is insufficient to understand what it says. Is it possible to querry option prices with YQL? So which is the server and the querry command? Thank you very much