Socket
Socket
Sign inDemoInstall

barchart-market-data-api

Package Overview
Dependencies
115
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    barchart-market-data-api

Barchart OnDemand API servic have access to 15-minute delayed market data for BATS (US equities) and global Forex pairs, and end-of-day (including historical) market data for US equities from AMEX, NASDAQ, NYSE and futures from CBOT, CME, COMEX and NYMEX.


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Barchart OnDemand Free Market Data API Client

Barchart offers free Market data API on freemarketdataapi.barchartondemand.com, to use the API you need an API key which is provided singing up on theirs website.

This client offers access to free methods getQuote and getHistory.

Example

var MarketData = require('barchart-market-data-api');

var md = new MarketData(__YOUR_API_KEY__);
md.getHistory('IBM').then(function (history) {
  console.log('History data:', history);
});
md.getQuote('IBM').then(function (quotes) {
  console.log('Price data:', quotes);
});

MarketData(apiKey)

Creates a new client.

Kind: global function

ParamTypeDescription
apiKeyStringAPI key provided by Barchart

marketData.getHistory(symbol, [type], [options]) ⇒ Promise

The getHistory API is used to request historical time series data on stocks, indices, mutual funds, ETFs, futures, indices or forex pairs. Historical data is available as tick, minute or end-of-day data.

Kind: instance method of MarketData
See: http://www.barchartondemand.com/api/getHistory

ParamTypeDescription
symbolString[description]
[type]String[description]
[options]ObjectAll additional options as key value

marketData.getQuote(symbols, [fields], [mode])

The getQuote API is used to request price data, either real-time, delayed or end-of-day, by symbol. In addition to Last Price or Settlement, other fields such as Open, High, Low, Close, Bid, Ask, 52-week high and low, and more are available.

Kind: instance method of MarketData
See: http://www.barchartondemand.com/api/getQuote

ParamTypeDescription
symbolsStringA symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.
[fields]StringThe fields requested.
[mode]StringParameter to change quote type to real-time ("R"), delayed ("I") or end-of-day ("D")

Keywords

FAQs

Last updated on 01 Oct 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc