Generated banner for Matlab Access Datafeed
Generated logo for Matlab Access Datafeed

Matlab Access Datafeed

MathWorksOfficialCreated by MathWorks

  • Skill
  • Tool integration
  • Data and AI
  • BSD-2-Clause
  • No issues found

From the author

Connect to Bloomberg, FRED, Haver Analytics, LSEG Datastream, NOAA Climate Data Online, or US government agencies (BEA, BLS, Census, EIA) from MATLAB and retrieve data. Covers market data (bloomberg/blp/bloombergHypermedia), economic data (fredrs, haver/haverdirect/haverview), historical financial data (datastreamws), weather/climate data (@noaa from GitHub), and government data (usbea/usbls/uscensus/useia from GitHub).
— the description by MathWorks

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Datafeed Toolbox provides a unified interface for MATLAB users to retrieve data from various external providers, including Bloomberg, FRED, Haver Analytics, LSEG Datastream, NOAA, and US government agencies like the BEA, BLS, Census, and EIA. This skill covers the necessary connection patterns, interface selection, and data retrieval methods for these services, enabling seamless integration of external time-series and market data into MATLAB workflows.

What it does

  • Connects to Bloomberg for market and reference data using C++ or REST APIs.
  • Retrieves economic time series from the St. Louis Fed (FRED) via the fredrs interface.
  • Fetches global economic and financial data from Haver Analytics.
  • Accesses historical financial data from LSEG Datastream.
  • Retrieves historical climate and weather data from NOAA Climate Data Online.
  • Provides interfaces for US government agency data including BEA, BLS, Census, and EIA.

When to use it

  • When you need to integrate real-time or historical market data into your MATLAB analysis.
  • When performing economic research requiring time series from FRED or Haver Analytics.
  • When working with historical financial data from LSEG Datastream.
  • When your research requires climate or weather data from NOAA.
  • When you need to pull public economic indicators from US government agencies.

Advantages

  • Unified access to diverse data sources within the MATLAB environment.
  • Supports both local terminal-based connections and platform-independent cloud/REST APIs.
  • Provides specific interfaces optimized for different license types and environments.
  • Enables programmatic data retrieval for automated research and modeling pipelines.

Usage examples

“How do I connect to Bloomberg using the recommended C++ interface?”
Use the bloomberg constructor to initialize the connection, then call getdata to retrieve security information.
“How can I fetch historical data from LSEG Datastream?”
Initialize a datastreamws connection object with your credentials and use the history method to retrieve time series data.
“What is the correct way to get FRED data in MATLAB?”
Use the fredrs interface, which is the current standard for accessing FRED economic data in MATLAB R2026a and later.
“How do I access US government data like BLS employment statistics?”
Use the usbls interface from the GitHub-based collection to query specific employment data series.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/matlab/matlab-access-datafeed/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip matlab-access-datafeed.zip -d .agents/skills

Documentation by MathWorks

Datafeed Toolbox — Bloomberg, FRED, Haver Analytics, LSEG Datastream, NOAA, and US Government Data

Access financial, economic, climate, and government data from multiple providers through the MATLAB Datafeed Toolbox and related GitHub interfaces.

When to Use

  • User wants to connect to Bloomberg, FRED, Haver Analytics, LSEG Datastream, NOAA, or US government agencies (BEA, BLS, Census, EIA) from MATLAB

  • User needs to retrieve market data (prices, history, real-time, reference data) via Bloomberg

  • User needs to retrieve economic time series from the St. Louis Fed (FRED)

  • User needs to fetch economic/financial time series from Haver Analytics databases

  • User needs to retrieve historical financial data from LSEG Datastream

  • User needs help choosing between interfaces within a provider (e.g., bloomberg vs blp vs bloombergHypermedia, haver vs haverview)

  • User needs to retrieve historical climate or weather data from NOAA Climate Data Online

  • User needs to retrieve GDP, employment, population, or energy data from US government agencies

  • User is writing MATLAB code involving securities, economic indicators, climate data, government data, or data provider connectivity

When NOT to Use

  • General financial modeling or portfolio optimization that doesn't involve data provider connectivity

  • Bloomberg Terminal keyboard shortcuts or Excel add-in questions (not MATLAB)

  • Datastream Excel add-in (not MATLAB)

  • Real-time streaming from LSEG (datastreamws is historical only)

  • NOAA forecast API (weather.gov) or NOAA CO-OPS tidal data (different services from CDO)

  • Direct REST/HTTP calls to US government agency APIs without MATLAB

  • Agency-specific data interpretation (what BLS series IDs mean, Census variable codes, etc.)

  • Data sources not covered here (e.g., Yahoo Finance)

  • Installing MATLAB, Datafeed Toolbox, or toolbox products → use matlab-install-products

  • Querying relational databases via SQL, JDBC, or ODBC → use matlab-use-database

  • Debugging generic MATLAB runtime errors not specific to a data provider → use matlab-debug-code

Provider Overview

ProviderData TypeInterfacesReference
BloombergMarket data (equities, fixed income, derivatives, indices)bloomberg, blp, bloombergHypermedia, bloombergEMSXreferences/bloomberg.md
FREDU.S. economic data (GDP, unemployment, CPI, interest rates)fredrs (replaces obsolete fred)references/fred.md
Haver AnalyticsGlobal economic & financial data (macro, industry, surveys)haver, haverdirect, haverviewreferences/haver.md
LSEG DatastreamHistorical financial data (equities, indices, economics, expressions)datastreamwsreferences/datastreamws.md
NOAA CDOHistorical climate/weather data (temperature, precipitation, snowfall)noaa (GitHub)references/noaa.md
US Government DataGDP, employment, population, energy (BEA, BLS, Census, EIA)usbea, usbls, uscensus, useia (GitHub)references/us-govt-data.md

Quick Interface Selection

Bloomberg — see references/bloomberg.md for full API patterns
  • Windows Desktop/Terminal user → bloomberg (C++)

  • Need platform independence (Data License) → bloombergHypermedia

  • Server/cloud, no Terminal (BPIPE) → bloombergBPIPE

  • Existing blp users → migrate to bloomberg (same API, no Java needed)

FRED — see references/fred.md for full API patterns
  • Any platform → fredrs (requires R2026a+, API key)

  • fred is obsolete — do NOT use it

Haver Analytics — see references/haver.md for full API patterns
  • Windows with local data files → haver

  • Windows needing remote access → haverdirect

  • Non-Windows / server / cloud → haverview (REST API)

LSEG Datastream — see references/datastreamws.md for full API patterns
  • Any platform → datastreamws (REST API, requires Datastream credentials)

NOAA Climate Data Online — see references/noaa.md for full API patterns
  • Any platform → noaa (GitHub interface, requires free CDO API token)

  • Clone from github.com/mathworks/noaa and addpath — not part of Datafeed Toolbox

US Government Data — see references/us-govt-data.md for full API patterns
  • BEA → usbea (GDP, national/regional/international economic accounts)

  • BLS → usbls (employment, unemployment, CPI, wages)

  • Census Bureau → uscensus (population, ACS, economic census)

  • EIA → useia (electricity, petroleum, natural gas, coal)

  • Clone from github.com/mathworks/Access-Public-US-Government-Data-from-MATLAB and addpath — not part of Datafeed Toolbox

How to Use References

Before generating code for a specific provider, read the corresponding reference file for detailed API patterns, function signatures, gotchas, and examples:

  • Working with Bloomberg data → read references/bloomberg.md

  • Working with FRED economic data → read references/fred.md

  • Working with Haver Analytics data → read references/haver.md

  • Working with LSEG Datastream data → read references/datastreamws.md

  • Working with NOAA climate/weather data → read references/noaa.md

  • Working with BEA, BLS, Census, or EIA data → read references/us-govt-data.md

Common Rules

  • Always use getSecret() for credentials and API keys — never hardcode secrets

  • Bloomberg, FRED, Haver, and Datastream require the Datafeed Toolbox.

  • fredrs additionally requires R2026a or later

  • datastreamws available since R2018b

  • NOAA is a standalone GitHub interface requiring MATLAB only.

  • US government data interfaces (usbea, usbls, uscensus, useia) are available on GitHub only and require MATLAB R2026b+ and Datafeed Toolbox R2026b+

  • Bloomberg and Haver local interfaces (bloomberg, blp, haver, haverdirect) are Windows-only; cloud/REST variants (bloombergHypermedia, bpipe, haverview, fredrs, datastreamws) are platform-independent


Copyright 2026 The MathWorks, Inc.


Files

references/us-govt-data.md

US Government Data Interfaces

Four MATLAB interfaces for accessing data from US government agencies: Bureau of Economic Analysis (BEA), Bureau of Labor Statistics (BLS), Census Bureau, and Energy Information Administration (EIA). These are GitHub-hosted community interfaces — not shipped with the Datafeed Toolbox.

Installation

Download from GitHub (mathworks/Access-Public-US-Government-Data-from-MATLAB) and add to the MATLAB path:

addpath("path/to/us-government-data")

Requires MATLAB R2026b+ and Datafeed Toolbox R2026b+.

API Key Registration

Each agency requires a free API key:

AgencyClassRegistration
Bureau of Economic Analysisusbeahttps://apps.bea.gov/api/signup/
Bureau of Labor Statisticsusblshttps://data.bls.gov/registrationEngine/
Census Bureauuscensushttps://api.census.gov/data/key_signup.html
Energy Information Administrationuseiahttps://www.eia.gov/opendata/register.php

Class names are usbea, usbls, uscensus, useia — NOT bea, bls, census, eia.

BEA (usbea)

Connection
c = usbea(getSecret("usbeacreds"));
Discovery Methods

BEA has four dedicated discovery methods that wrap getData with the appropriate BEA API method parameter:

% List all available datasets
dsList = getDatasetList(c);

% Get parameters for a specific dataset
params = getParameterList(c, "Regional");

% Get valid values for a parameter
values = getParameterValues(c, "IntlServTrade", "TradeDirection");

% Get filtered values based on other parameter constraints
values = getParameterValuesFiltered(c, "Regional", "LineCode", "TableName", "SAINC1");
values = getParameterValuesFiltered(c, "Regional", "Year", "TableName", "CAINC5N", "GeoFips", "01001");

All discovery methods return tables.

Data Retrieval

getData uses a method-dispatch pattern — the BEA API method is passed as a name-value pair:

data = getData(c, "GET", "data", "method", "GETDATA", ...
               "DatasetName", "NIPA", ...
               "TableName", "T10101", ...
               "Frequency", "A,Q", ...
               "Year", "ALL");
Return Types

getData returns a table via struct2table. For NIPA and similar datasets, the actual data rows are in a nested field:

data = getData(c, "GET", "data", "method", "GETDATA", ...
               "DatasetName", "NIPA", "TableName", "T10101", ...
               "Frequency", "A", "Year", "ALL");
GDP = struct2table(data.Data{:});    % extract the nested data rows

BLS (usbls)

Connection
c = usbls(getSecret("usblscreds"));

An API key is optional but recommended (registered users get higher rate limits and access to additional features like calculations and catalog data).

Time Series Retrieval

Use timeseries — NOT fetch or getData:

% Single series
data = timeseries(c, "LAUCN040010000000005");

% Multiple series with date range and additional features
data = timeseries(c, ["LAUCN040010000000005", "LAUCN040010000000006"], ...
                  "startyear", "2020", ...
                  "endyear", "2023", ...
                  "catalog", "true", ...
                  "calculations", "true");

Parameter conventions — all lowercase strings:

  • "startyear" and "endyear" — NOT "StartYear" or "startYear"

  • Year values as strings: "2020" — NOT numeric 2020

  • Boolean values as strings: "true" — NOT logical true

  • "catalog", "calculations", "annualaverage", "aspects" — all lowercase

Browsing Methods
% List all surveys
s = surveys(c);

% Specific survey metadata
s = surveys(c, "TU");

% 25 most popular series overall
p = popular(c);

% Popular series for a specific survey
p = popular(c, "LA");

surveys and popular return tables (converted from struct via struct2table).

Return Types

timeseries returns a table via struct2table. The table contains series results, metadata, and (if requested) calculations.

Census Bureau (uscensus)

Connection
c = uscensus(getSecret("uscensuscreds"));
Data Retrieval

getData uses path-based endpoint routing. The endpoint path specifies the dataset and year:

% Population estimates by state (2021)
data = getData(c, "GET", "2021/pep/population", ...
               "get", "POP_2021,NAME", ...
               "for", "state:*");

% American Community Survey: median household income by state
data = getData(c, "GET", "2021/acs/acs1", ...
               "get", "B19013_001E,NAME", ...
               "for", "state:*");

% ACS data with nested geography (counties in a state)
data = getData(c, "GET", "2021/acs/acs5", ...
               "get", "B01001_001E,NAME", ...
               "for", "county:*", ...
               "in", "state:06");

Census-specific query parameters:

  • "get" — comma-separated list of variables to retrieve

  • "for" — target geography (e.g., "state:*", "county:*", "state:06")

  • "in" — parent geography for nested filtering (e.g., "state:06" to filter counties within California)

The endpoint path (e.g., "2021/pep/population", "2021/acs/acs1") determines which Census dataset to query. Browse available endpoints at https://www.census.gov/data/developers.html.

Return Types

Census API returns JSON arrays. The getData method converts the response depending on its type:

  • Cell arrays (most common): converted via cell2table using the first row as variable names

  • Structs: converted via struct2table

  • Tables/strings: returned directly

EIA (useia)

Connection
c = useia(getSecret("useiacreds"));

The constructor validates the API key by making a test request.

Route Browsing

The EIA API is hierarchical. Browse by calling getData with progressively deeper paths:

% Top-level routes
data = getData(c, "GET");

% Explore a category
data = getData(c, "GET", "petroleum");

% Drill deeper
data = getData(c, "GET", "petroleum/pri/spt");

Route responses include a routes field containing a table of available sub-routes.

Data Retrieval

Retrieve data by navigating to a /data endpoint and specifying columns and filters:

% Crude oil prices, annual
data = getData(c, "GET", "petroleum/pri/spt/data", ...
               "frequency", "annual");

% Electricity generation filtered by location
data = getData(c, "GET", "electricity/electric-power-operational-data/data", ...
               "frequency", "annual", ...
               "Data", ["generation"], ...
               "Facets", struct("location", ["90"]));

EIA-specific parameters:

  • "Data" — string array of data columns to retrieve (e.g., ["generation"], ["price", "sales"])

  • "Facets" — struct whose fields are facet names and values are string arrays of filter values (e.g., struct("location", ["90"]), struct("stateid", ["CA", "TX"]))

  • "frequency" — data frequency (e.g., "annual", "monthly", "quarterly")

The expandParams method internally converts "Data" and "Facets" into bracket-encoded URL parameters:

  • "Data", ["price", "sales"] → data[]=price&data[]=sales

  • "Facets", struct("stateid", ["CA", "TX"]) → facets[stateid][]=CA&facets[stateid][]=TX

Return Types

getData returns a table. For data responses, the table includes a data field containing a nested table with the actual data rows:

result = getData(c, "GET", "petroleum/pri/spt/data", "frequency", "annual");
priceData = result.data{1};    % nested table with the data rows

Route responses include a routes field with a nested table of sub-routes, and optionally a facets field with available filter dimensions.

Notes

  • Class names are usbea, usbls, uscensus, useia — not abbreviated forms like bea or eia

  • The API key is automatically included in requests by each class

  • BEA uses a method-dispatch pattern ("method", "GETDATA") unique among these interfaces

  • BLS uses POST requests for timeseries and requires all-lowercase string parameters

  • Census uses path-based endpoint routing and geographic query parameters ("get", "for", "in")

  • EIA uses "Data" and "Facets" parameters with automatic bracket encoding


Copyright 2026 The MathWorks, Inc.


Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
MathWorks
Publisher
MathWorks (Official)
Source
matlab/matlab-agentic-toolkit · skills-catalog/computational-finance/matlab-access-datafeed · commit 2a7f215
Licence
BSD 2-Clause License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE.md)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by MathWorks or MathWorks.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-access-datafeed.zip