Main Content

getData

Intercontinental Exchange (ICE) data request

Since R2025a

    Description

    [data,response] = getData(c,"POST","fetch-data",jsonParameters) retrieves ICE® data, where c is an ice connection object, "POST" represents the HTTP request type, "fetch-data" represents the API stub for the ICE endpoint, and jsonParameters contains the HTTP body for POST requests. For more information about the ICE API, see the API documentation on the ICE website.

    example

    Examples

    collapse all

    Create an ICE connection with the ice function by specifying your username and password.

    username="usernameICE";
    password="passwordICE";
    c = ice(username,password)

    Retrieve all available data for a POST HTTP request by specifying JSON parameters for a given security identifier.

    jsonParameters = '{"inputList": [{"identifier": {"securityIdentifierValue": "699566AA3","securityIdentifierType": "CUSIP"}}],"outputSpec": {"securityMaster": ["all"]}}'
    [data,response] = getData(c,"POST","fetch-data",jsonParameters)
    data =
    
       1×2 table
    
         identifier securityMaster
      _____________ ______________
    
       {'699566AA3'} 1×1 struct
    
    
    response =
    
       ResponseMessage with properties:
    
        StatusLine: 'HTTP/1.1 200 OK'
        StatusCode: OK
            Header: [1×8 matlab.net.http.HeaderField]
              Body: [1×1 matlab.net.http.MessageBody]
         Completed: 0

    Input Arguments

    collapse all

    ICE connection, specified as an ice object.

    HTTP body for POST requests, specified as a string scalar or a JSON formatted character vector.

    Output Arguments

    collapse all

    ICE information for your security, returned as a table.

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

    Version History

    Introduced in R2025a

    See Also