Main Content

currencies

Retrieve HaverView currency information

Since R2024a

    Description

    data = currencies(c) returns all available HaverView™ currency information, where c is a haverview connection object.

    example

    data = currencies(c,ID) returns currency information for the specified ID.

    example

    data = currencies(c,ID,haverParams) returns currency information, where haverParams is an optional comma-separated list of HaverView API flags. For more information, see the Haver API documentation.

    [data,response] = currencies(___) also returns a response message.

    Examples

    collapse all

    Create a HaverView connection using a valid authentication token and database name. In this example, replace 681b61cf-dc7d-4698-a168-74c79b0c1a04 with your authentication token and replace USECON with the name of your database.

    token = "681b61cf-dc7d-4698-a168-74c79b0c1a04";
    databasename = "USECON";
    c = haverview(token,databasename)
    c = 
        
      haverview with properties:
        
        DatabaseName: "USECON"
             TimeOut: 200.00

    Return currency information corresponding to a specific ID.

    ID = "CHF";
    data = currencies(c,ID)
    data =
    
      1×5 table
    
          countryArea      index      name         iso      geography
        _______________    _____    _________    _______    _________
    
        {'Switzerland'}      6      {'Franc'}    {'CHF'}     {'146'} 

    Create a HaverView connection using a valid authentication token and database name. In this example, replace 681b61cf-dc7d-4698-a168-74c79b0c1a04 with your authentication token and replace USECON with the name of your database.

    token = "681b61cf-dc7d-4698-a168-74c79b0c1a04";
    databasename = "USECON";
    c = haverview(token,databasename)
    c = 
        
      haverview with properties:
        
        DatabaseName: "USECON"
             TimeOut: 200.00

    Retrieve currency information for a region by specifying a Haver API flag as a name-value argument. This example lists currencies for geography region number 656.

    data = currencies(c,[],geography=656)
    data =
        
      1x5 table
        
        count    pages        next            prev           data    
        _____    _____    ____________    ____________    ___________
        
        3.00     1.00     {0x0 double}    {0x0 double}    {3x5 table}

    Input Arguments

    collapse all

    HaverView connection, specified as a haverview object.

    Currency ID, specified as a character vector or string scalar.

    HaverView API arguments, specified as a comma-separated list. For more information, see the Haver API documentation.

    Output Arguments

    collapse all

    Currency data for the HaverView recession ID, returned as a table.

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

    Version History

    Introduced in R2024a