Giter Club home page Giter Club logo

data-fetcher's Introduction

Data Fetcher

This code is part of Project Mencator. This particular module is responsible for gathering input data using the FMP and Polygon.io. Keep in mind that this project is intended for MacOS users. If you would like to implement this project to a different operating system, feel free to fork the repository and make the necessary changes.

Table of contents

Dependencies

The dependencies can be installed using dependencies.sh which is located in the root directory of the project. You can run the script by executing the following command:

./dependencies.sh
zsh: permission denied: ./dependencies.sh

To fix this error run:

chmod +x dependencies.sh

This will make the file executable. Now you can run the file and install all the dependencies.

Installation

First, clone the repository:

git clone https://github.com/Roiqk7/Data-Fetcher.git

Afterwards navigate to the project directory:

cd Data-Fetcher

Then install the dependencies by running the dependencies.sh file:

./dependencies.sh
zsh: permission denied: ./dependencies.sh

To fix this error run:

chmod +x dependencies.sh

This will make the file executable. Now you can run the file and install all the dependencies.

Now you can build the project by executing the build.sh file:

./build.sh
zsh: permission denied: ./build.sh
chmod +x build.sh

This will make the file executable. Now you can run the file and build the project.

Note: You do not have to build the project if you only want to use it as a library. Building the project is only necessary if you want to run the tests or want to contribute. In order for the tests to run, you need to add your API keys into src/include/constants.h.

Usage

Include the library in your C++ project by including the header file:

#include <dataFetcher/dataFetcher.h>

Then, you can use the functions provided by the library:

Declarations
Json::Value fetchHistoricalData(const std::string& tickerSymbol, const std::string& fromDate, const std::string& toDate,
                const std::string& timeFrame, const std::string& api, const std::string& apiKey);
Json::Value fetchHistoricalData(const std::string& urlString);
Json::Value fetchHistoricalData(const std::string& urlString, const std::string& apiKey);

These functions will allow you, the user, to fetch historical data of a given stock/etf in a given period of time with a desired time frame. The programme supports the FMP and Polygon.io APIs. The function will return a Json::Value object that contains the fetched data. Browse the documentation for more information.

If you need to run the tests, you can do so by running the following command:

./FetcherTests

Project structure

  • data/: Contains the output data files.
  • docs/: Contains the documentation files.
  • include/: Contains the header files.
  • src/: Contains the source files for the main application.
  • src/include/: Contains internally used header files.
  • test/: Contains the test files.
  • test/data/: Contains files used for testing.
  • tool/: Tools used, or offered, by the program.
  • CMakeLists.txt: CMake configuration file.

data-fetcher's People

Contributors

roiqk7 avatar

Stargazers

 avatar

Watchers

 avatar

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.