Main Content

getUniverses

Retrieve Bloomberg Hypermedia universe information

Since R2023b

Description

[universes,response] = getUniverses(c,userCatalog) retrieves Bloomberg® Hypermedia universe information for all universes, where c is the Bloomberg Hypermedia connection object and userCatalog is your catalog ID from Bloomberg.

example

[universes,response] = getUniverses(c,userCatalog,universeID) retrieves Bloomberg Hypermedia universe information for a specified universe contained in the universe identifier universeID.

example

Examples

collapse all

Retrieve information about all available universes using the getUniverses function.

Create a Bloomberg Hypermedia connection object by using the API key provided by Bloomberg.

credentialsString = '{"client_id":"89beaeab724bbdf5e186b733c58af2","client_secret":"77050429aee81eb31793fb10fa4301c54911db545de8b2990252ffe2b56b11","name":"BloombergHAIDevelopment","scopes":["eap","beapData","reportingapi"],"expiration_date":1699198358934,"created_date":1651764758934}'
c = bloombergHypermedia(credentialsString)
c = 
 
  bloombergHypermedia with properties:

      TimeOut: 200.00

Specify your catalog ID and use the getUniverses function to retrieve information about all available universes. Replace "123" with your login credentials for the catalog you want to access.

userCatalog = "123";
[universes,response] = getUniverses(c,userCatalog)
universes =

  6×7 table

               x_id                  x_type                  description                      identifier                        issued                            modified                      title      
    __________________________    ____________    _________________________________    _________________________    _______________________________    _______________________________    _________________

    {'u2022052413354920f366/'}    {'Universe'}    {'Test historical data universe'}    {'u2022052413354920f366'}    {'2022-05-24T17:35:49.834498Z'}    {'2022-05-24T17:35:49.834498Z'}    {'Test Universe'}
    {'u20220126162804d2b7dd/'}    {'Universe'}    {'Test historical data universe'}    {'u20220126162804d2b7dd'}    {'2022-01-26T21:28:05.792105Z'}    {'2022-01-26T21:28:05.792105Z'}    {'Test Universe'}
    {'u2022011216495890bb9f/'}    {'Universe'}    {'Test historical data universe'}    {'u2022011216495890bb9f'}    {'2022-01-12T21:49:58.969075Z'}    {'2022-01-12T21:49:58.969075Z'}    {'Test Universe'}
    {'u20220112162601cafaac/'}    {'Universe'}    {'Test historical data universe'}    {'u20220112162601cafaac'}    {'2022-01-12T21:26:02.528188Z'}    {'2022-01-12T21:26:02.528188Z'}    {'Test Universe'}
    {'u2022011213151324d8a9/'}    {'Universe'}    {'Test historical data universe'}    {'u2022011213151324d8a9'}    {'2022-01-12T18:15:17.387246Z'}    {'2022-01-12T18:15:17.387246Z'}    {'Test Universe'}
    {'u20220112093027c3fa76/'}    {'Universe'}    {'Test historical data universe'}    {'u20220112093027c3fa76'}    {'2022-01-12T14:30:31.103420Z'}    {'2022-01-12T14:30:31.103420Z'}    {'Test Universe'}


response = 

  ResponseMessage with properties:

    StatusLine: 'HTTP/1.1 303 SEE OTHER'
    StatusCode: SeeOther
        Header: [1×14 matlab.net.http.HeaderField]
          Body: [1×1 matlab.net.http.MessageBody]
     Completed: 1

You can also retrieve information about a specific universe. Use the getUniverses function, specifying the universeID input argument.

universeID = "u2022052413354920f366";
universe = getUniverses(c,userCatalog,universeID)

universeID =

  1×3 table

      x_type      identifierType    identifierValue
    __________    ______________    _______________

    Identifier        TICKER        XYZ US Equity 

Input Arguments

collapse all

Bloomberg Hypermedia connection, specified as a Bloomberg Hypermedia object.

User catalog identifier, specified as a character vector or string scalar.

Universe identifier, specified as a character vector or string scalar.

Output Arguments

collapse all

List of available universes or information about a specific universe, returned as a table.

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

Version History

Introduced in R2023b