Universal Stock Crawler requires libcurl4-dev
and cmake
.
$ sudo apt install libcurl4-openssl-dev cmake
Download the source.
$ wget https://github.com/kdzlvaids/stock-crawler/archive/master.zip
Extract the source.
$ unzip master.zip
Build the source.
$ cd ./stock-crawler-master
$ cmake .
All classes derive from the interface named RetrieveDataInterface
.
You can use the internal API by yourself with your detailed settings,
or use the well-defined macro-like external API functions named starting with RetrieveDataFrom
.
You can retrieve all kinds of stock data from YahooFinance with one function.
Following example is retrieving the NASDAQ Composite stock data from Yahoo Finance.
/*
Retrieve the NASDAQ Composite (^IXIC) stock data from Yahoo Finance
between 2014-05-08 and 2017-05-05 with interval 1 day.
*/
stock_crawler::RetrieveDataFromYahooFinance ("^IXIC", "1399474800", "1494169200", "1d");
For more information, see the API documentation.