All Projects → Chudleyj → IEX_CPP_API

Chudleyj / IEX_CPP_API

Licence: other
Unofficial C++ Lib for the IEXtrading API

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to IEX CPP API

IEXSharp
IEX Cloud API for C# and other .net languages. Supports SSE streaming
Stars: ✭ 87 (+155.88%)
Mutual labels:  finance, iex, iextrading, iex-trading, iex-api, iex-stock, iexfinance-api, iex-trading-api
pyEX
Python interface to IEX and IEX cloud APIs
Stars: ✭ 407 (+1097.06%)
Mutual labels:  finance, iex, stocks, stock-data, financial-analysis
stocki
The CLI for fetching stock market data
Stars: ✭ 32 (-5.88%)
Mutual labels:  finance, stock, iex, iex-api
Stocksera
Web application that provides alternative data to retail investors
Stars: ✭ 426 (+1152.94%)
Mutual labels:  finance, stock, stocks, financial-data
R-code-for-finance
R code for finance
Stars: ✭ 19 (-44.12%)
Mutual labels:  stock, stock-data, financial-analysis, financial-markets
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (+129.41%)
Mutual labels:  finance, stocks, stock-data, financial-data
Mida
The open-source and cross-platform trading framework
Stars: ✭ 263 (+673.53%)
Mutual labels:  finance, stocks, financial-markets
iextrading4j-hist
IEX Trading library to parse TOPS and DEEP multicast packets
Stars: ✭ 20 (-41.18%)
Mutual labels:  iex, iextrading, iex-trading
fhub
Python client for Finnhub API
Stars: ✭ 31 (-8.82%)
Mutual labels:  finance, financial-data, financial-markets
Sec Edgar Downloader
Download SEC filings from the EDGAR database using Python
Stars: ✭ 146 (+329.41%)
Mutual labels:  finance, stocks, financial-data
pytickersymbols
Fundamental stock data and yahoo/google ticker symbols for several indices.
Stars: ✭ 69 (+102.94%)
Mutual labels:  finance, stock-data, financial-data
akshare
AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
Stars: ✭ 5,155 (+15061.76%)
Mutual labels:  finance, stock, financial-data
stocktwits-sentiment
Stocktwits market sentiment analysis in Python with Keras and TensorFlow.
Stars: ✭ 23 (-32.35%)
Mutual labels:  stock, stocks, stock-data
Pandas Datareader
Extract data from a wide range of Internet sources into a pandas DataFrame.
Stars: ✭ 2,183 (+6320.59%)
Mutual labels:  finance, stock-data, financial-data
TerminalStocks
Pure terminal stock ticker for Windows.
Stars: ✭ 88 (+158.82%)
Mutual labels:  stock, stocks, stock-data
Beibo
🤖 Predict the stock market with AI 用AI预测股票市场
Stars: ✭ 46 (+35.29%)
Mutual labels:  finance, stock, stocks
Finance4py
股市技術分析小工具
Stars: ✭ 8 (-76.47%)
Mutual labels:  finance, stock, stock-data
stock-market-scraper
Scraps historical stock market data from Yahoo Finance (https://finance.yahoo.com/)
Stars: ✭ 110 (+223.53%)
Mutual labels:  finance, stock, stock-data
wallstreet
Stock Quotes and Charts for the Terminal
Stars: ✭ 75 (+120.59%)
Mutual labels:  finance, stock, financial-analysis
pinance
Python module(s) to get stock data, options data and news.
Stars: ✭ 70 (+105.88%)
Mutual labels:  finance, stock, stock-data

IEX_CPP_API

Unofficial C++ Lib for the IEXtrading API

For the OFFICIAL API and its docs and all credit to the data pulled by this program go to: https://iextrading.com/developer/docs/

This lib will allow for easier use of IEXtrading GET requests in C++ through the use of prebuilt functions.

As it stands currently, the dependancies used in this lib will need to be manually installed:

Libcurl: https://curl.haxx.se/docs/install.html

Jsoncpp: https://github.com/open-source-parsers/jsoncpp

Why use this lib over official API?

C++ code with the official API:

namespace
{
    std::size_t callback(
    const char* in,
    std::size_t size,
    std::size_t num,
    std::string* out)
    {
    const std::size_t totalBytes(size * num);
    out->append(in, totalBytes);
    return totalBytes;
    }
}

Json::Value acquireJSONofAAPLchart{
    const std::string url("https://api.iextrading.com/1.0/stock/aapl/chart");
    
    CURL* curl = curl_easy_init();
    
    // Set remote URL.
    curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
    
    // Don't bother trying IPv6, which would increase DNS resolution time.
    curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    
    // Don't wait forever, time out after 10 seconds.
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);
    
    // Follow HTTP redirects if necessary.
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    
    // Response information.
    int httpCode(0);
    std::unique_ptr<std::string> httpData(new std::string());
    
    // Hook up data handling function.
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback);
    
    // Hook up data container (will be passed as the last parameter to the
    // callback handling function).  Can be any pointer type, since it will
    // internally be passed as a void pointer.
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData.get());
    
    // Run our HTTP GET command, capture the HTTP response code, and clean up.
    curl_easy_perform(curl);
    curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode);
    curl_easy_cleanup(curl);
    
    JSONdata parsedData;
    if (httpCode == 200)
    {
    std::cout << "\nGot successful response from " << url << std::endl;
    
    // Response looks good - done using Curl now.  
    Json::Reader jsonReader;
    Json::Value jsonData;
    jsonReader.parse(*httpData, jsonData); //TODO error handle
    
    return jsonValue;
    
    
}

C++ code with IEX_CPP_API:

  IEX::stocks::chart("aapl");

NOTE:

The code currently in "int main()" is simply test cases as this is still in dev. The final product would not use an "int main()", it just shows examples of how to use each function currently in the lib.

Using the lib:

Formal docs to be added when this project gets closer to done, however some basic examples plus the offical docs should make this easy to use. See the int main() code for examples on using each currently supported function. Each function returns a JSON data type. This lib uses the Jsoncpp API for its' JSON data types. See the Jsoncpp docs linked above for info on how to use the JSON objects.

To Do:

Stocks:

  • Batch Requests (Half implemented, still needs parameteres)
  • Book
  • Chart (Completed all range options, some additional params not in yet)
  • Company
  • Crypto
  • Delayed Quote
  • Dividends
  • Earnings
  • Earnings Today
  • Effective Spread
  • Financials
  • Historical Prices (Done VIA "Chart" as the official API does.)
  • Upcoming IPOS
  • Today's IPOS
  • IEX Regulation SHO Threshold Securities List (Can't get this to return anything, unsure if not supported or me being dumb, will revisit later)
  • IEX Short Interest List(Can't get this to return anything, unsure if not supported or me being dumb, will revisit later)
  • Key Stats
  • Largest Trades
  • List
  • Logo
  • News
  • OHLC
  • Open/Close (OHLC function per offical API docs)
  • Peers
  • Previous
  • Price
  • Quote
  • Relevant
  • Splits
  • Time Series
  • Volume by Venue

Reference Data:

  • Symbols
  • IEX Corporate Actions
  • IEX Dividends
  • IEX Next Day Ex Date
  • IEX Listed Symbol Directory

IEX Market Data:

  • TOPS
  • Last
  • HIST
  • DEEP
  • Book
  • Trades
  • System Event
  • Trading Status
  • Operational Hault Status
  • Short Sale Price Test Status
  • Security Event
  • Trade Break
  • Auction
  • Official Price

IEX Stats:

  • Intraday
  • Recent
  • Records
  • Historical Summary
  • Historical Daily

Markets

  • Market
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].