README.md

RBarchart v0.2.1

Build Status

Barchart OnDemand features a diverse set of market data and information APIs. Pricing is based on the number of monthly queries and fields requested. They offer four packages: Small, Medium, Large, Enterprise.

Getting Started

Barchart.com have available a free API to retrieve quotes and historical data and they have a diverse premium set of market data and information APIs. See Barchart OnDemand

RBarchart package v0.2.1 implements getQuote, getHistory, getSymbolLookUp, getQuoteEod, getClosePrice, getFuturesExpirations, getFuturesSpecifications methods from Barchart API.

Prerequisities

If you install from devtools you do not need to do anything else.

devtools::install_github("mariope/RBarchart")
library(RBarchart)
setAPIkey('<Your API key>', premium = FALSE)

Getting started

When you load the library, you obtain three functions:

library(RBarchart)

Running RBarchart

The functions available are:

setAPIkey

Set the API key and define if it is premium.

> setAPIkey('<Your API key>', premium = FALSE)

In order to get an API key, please, visit Barchart Ondemand

getHistory

The getHistory API is used to request historical time series data on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies. Historical data is available as tick, minute bars or end-of-day data.

> getHistory(symbol = 'ESM19', type = 'dailyContinue')

getSymbolLookUp

The getSymbolLookUp API provides a list of all instruments based on the keyword being passed.

> getSymbolLookUp('Gold', limit = 100, exchanges = 'COMEX')

getQuote

The getQuote API is used to request price data, either real-time, delayed or end-of-day, by symbol on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies.

> getQuote(symbols = 'ESM19')
> getQuote(symbols = 'NGM19,ESM19', fields = 'openInterest')

getQuoteEod

The getQuoteEod API is used to request end-of-day price data, by combined exchange and symbol, on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, or cryptocurrencies. Historical data is available as tick, minute bars or end-of-day data.

getClosePrice

The getClosePrice API provides the close price for given instruments for the given date.

getFuturesExpirations

The getFuturesExpiration API from Barchart OnDemand provides first notice and last trade dates for futures contracts.

getFuturesSpecifications

Barchart OnDemand's getFuturesSpecifications API provides contract information such as trading hours, contract size and tick size for futures contracts.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the GPL-3 License - see the LICENSE file for details

Acknowledgments



mariope/RBarchart documentation built on June 24, 2019, 9:47 p.m.