Based on ajbarry:yahoo-finance but updated more frequently + tests are fixed.
Provides a Meteor server-side interface to node-yahoo-finance through
a YahooFinance
object.
YahooFinance.historical({symbol:'YHOO', from:'2014-06-01T22:00:00.000Z', to:'2014-06-01T22:00:00.000Z'})
yields:
{
symbol: 'YHOO',
open: 34.69,
high: 34.95,
low: 34.28,
close: 34.87,
volume: 9178900,
adjClose: 34.87,
date: testDate
}
YahooFinance.historical({symbols:['AAPL','GOOGL','YHOO'], from:'2014-06-01T22:00:00.000Z', to:'2014-06-01T22:00:00.000Z'})
yields:
{
AAPL: [{
date: testDate,
open: 633.95996,
high: 634.83002,
low: 622.5,
close: 628.64996,
volume: 92337700,
adjClose: 88.62704,
symbol: 'AAPL' } ],
GOOGL: [{
date: testDate,
open: 569.75,
high: 570.40997,
low: 556.70001,
close: 564.34003,
volume: 1660500,
adjClose: 564.34003,
symbol: 'GOOGL' } ],
YHOO: [{
date: testDate,
open: 34.69,
high: 34.95,
low: 34.28,
close: 34.87,
volume: 9178900,
adjClose: 34.87,
symbol: 'YHOO'
}]
}
YahooFinance.snapshot({symbol:'YHOO', fields:['s','n']})
yields:
{symbol: 'YHOO', name: 'Yahoo! Inc.'}
YahooFinance.snapshot({symbols:['AAPL','GOOGL','YHOO'], fields:['s','n']})
yields:
[
{name:'Apple Inc.', symbol:'AAPL'},
{name:'Google Inc.', symbol:'GOOGL'},
{name:'Yahoo! Inc.', symbol:'YHOO'}
];
See the node-yahoo-finance source for a list of available fields.