Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.55 KB

get-started.md

File metadata and controls

53 lines (42 loc) · 1.55 KB

Get started

Index

  1. How to build
  2. How to use

How to build

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 .

How to use

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.

YahooFinance

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.

Examples

References