Fred.getSeriesObservations()

Get the observations or data values for an economic data series.

Usage

Hover over inputs/exits for more info.

var Fred = require('machinepack-fred');


// Get the observations or data values for an economic data series.

Fred.getSeriesObservations({

apiKey: 'xAmBxAmBxAmBkjbyKkjbyKkjbyK',

seriesId: 'EXCSRESNS',

fileType: 'json',

observationStart: '2014-01-01',

observationEnd: '2014-01-01',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

apiKey required

The private API key for this application.

'xAmBxAmBxAmBkjbyKkjbyKkjbyK'
seriesId required

The id for a series.

'EXCSRESNS'
fileType

A key or file extension that indicates the type of file to send (e.g. xml, json, txt, xls).

'json'
observationStart

The start of the observation period.

'2014-01-01'
observationEnd

The end of the observation period.

'2014-01-01'

Exits

error

An unexpected error occurred.

success

OK.

[ { realtime_start: '2015-02-15',
    realtime_end: '2015-02-15',
    date: '2015-01-01',
    value: '2593187' } ]