Contenido principal

releases

Retrieve information for all available FRED releases

Since R2026a

    Description

    d = releases(c) returns a table that contains metadata for all available Federal Reserve Economic Data (FRED®) releases, where c is a fredrs connection object.

    example

    d = releases(c,"dates") returns a table of release dates for all available FRED releases.

    d = releases(c,"dates",fredParams) additionally specifies a comma-separated list of FRED REST API parameters. For example, releases(c,"dates","limit","20") returns a table with a limit of twenty release dates, while releases(c,[],"limit","20") returns a table with a limit of twenty releases. For more information about specifying FRED parameters, see the FRED REST API documentation.

    [d,response] = releases(___) also returns a response message for any of the previous syntaxes.

    Examples

    collapse all

    This example assumes that you have obtained your API user token from the Federal Reserve Bank of St. Louis website and you stored it in the MATLAB® vault by using the setSecret function.

    Use the getSecret function to retrieve your API user token from the MATLAB vault. Then, create a connection to the FRED server by using the fredrs function.

    APIkey = getSecret("MyAPIkeyFREDRS");
    c = fredrs(APIkey);

    Retrieve metadata for all available FRED releases.

    d = releases(c)
    d =
    
      1×8 table
    
        realtime_start     realtime_end        order_by       sort_order    count    offset    limit      releases  
        ______________    ______________    ______________    __________    _____    ______    _____    ____________
    
        {'2025-10-09'}    {'2025-10-09'}    {'release_id'}     {'asc'}       319       0       1000     {319×1 cell}

    Limit the number of releases to display.

    [d,response] = releases(c,"dates","limit","12")
    d =
    
      1×8 table
    
        realtime_start     realtime_end         order_by        sort_order    count    offset    limit    release_dates
        ______________    ______________    ________________    __________    _____    ______    _____    _____________
    
        {'2025-01-01'}    {'9999-12-31'}    {'release_date'}     {'desc'}     6829       0        12      {12×3 table} 
    
    
    response = 
    
      ResponseMessage with properties:
    
        StatusLine: 'HTTP/1.1 200 OK'
        StatusCode: OK
            Header: [1×13 matlab.net.http.HeaderField]
              Body: [1×1 matlab.net.http.MessageBody]
         Completed: 0

    Input Arguments

    collapse all

    FRED REST connection, specified as a fredrs object.

    FRED REST API arguments, specified as a comma-separated list. For example, releases(c,"dates","limit","10","order_by","asc") returns a table with a limit of 10 release dates sorted in ascending order. For more information about specifying FRED parameters, see the FRED REST API documentation.

    Output Arguments

    collapse all

    FRED release information, returned as a table.

    HTTP request response, returned as a ResponseMessage object. For details, see matlab.net.http.ResponseMessage.

    Version History

    Introduced in R2026a