Skip to content

AZdv/meteor-yahoo-finance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azdev:yahoo-finance

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.

Usage:

Historical Quotes

Single Quote

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
}

Multiple Quotes

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'
    }]
}

Snapshot Quotes

Single Quote

YahooFinance.snapshot({symbol:'YHOO', fields:['s','n']})

yields:

{symbol: 'YHOO', name: 'Yahoo! Inc.'}

Multiple Quotes

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.

About

Synchronous Yahoo-Finance Meteor Package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%