Fred
Ruby wrapper for the St. Louis Federal Reserve Economic Data (FRED) API
Install / Use
/learn @phuphighter/FredREADME
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
node-connect
336.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
336.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.0kCommit, push, and open a PR
