SkillAgentSearch skills...

Fred

Ruby wrapper for the St. Louis Federal Reserve Economic Data (FRED) API

Install / Use

/learn @phuphighter/Fred
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Fred

This is a Ruby wrapper for the St. Louis Federal Reserve Economic Data FRED API.

Installation

As a gem:

gem install fred

Get a FRED API key

Sign up for a FRED API key: https://api.stlouisfed.org/api_key.html

Usage

Instantiate a client

fred = Fred::Client.new(api_key: 'your_api_key')

or set FRED_API_KEY in your environment

export FRED_API_KEY=your_api_key
fred = Fred::Client.new

or configure once

Fred.configure do |config|
  config.api_key = 'your_api_key'
end
fred = Fred::Client.new

Examples

fred.category(nil, category_id: '125')
=> #<Fred::Mash categories=#<Fred::Mash category=#<Fred::Mash id="125" name="Trade Balance" parent_id="13">>>

fred.series(nil, series_id: 'GNPA')
=> #<Fred::Mash seriess=#<Fred::Mash series=#<Fred::Mash id="GNPA" title="Gross National Product" frequency="Annual" ...>>>

fred.series('observations', series_id: 'GNPA')
=> #<Fred::Mash observations=#<Fred::Mash count="96" observation=[#<Fred::Mash date="1929-01-01" value="105.3">, ...]>>

Copyright

Contact me if you have any suggestions and feel free to fork it!

Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license

Related Skills

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated1mo ago
Forks9

Languages

Ruby

Security Score

90/100

Audited on Feb 9, 2026

No findings