Main Content

getFields

Retrieve Bloomberg Hypermedia field information

Since R2023b

Description

[fieldList,response] = getFields(c,userCatalog) retrieves Bloomberg® Hypermedia field information for all available fields, where c is the Bloomberg Hypermedia connection object, and userCatalog is your catalog ID from Bloomberg.

[fieldList,response] = getFields(c,userCatalog,field) retrieves Bloomberg Hypermedia field information for a specified field contained in field identifier field.

example

Examples

collapse all

Retrieve information about a specified field.

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 the name of the field. Use the getFields function to get the information about the field of interest. Replace "123" with your login credentials for the catalog you want to access.

userCatalog = "123";
field = "pxLast";
[fieldList,response] = getFields(c,userCatalog,field)
fieldList =

  1×49 table

   
 x_context        x_id         x_type                   Created                       DLCategory          DLCommercialModelCategory    DL_ExtendedBulk    DL_Bulk    DataLicense     Description       FieldId     FieldType                                IRI                                 IsAbstract    LoadingSpeed     Mnemonic         OldMnemonic        Platform_Static  Platform_Streaming    Platform_TerminalRequired       Range        SAPINewSecuritySetup    StandardDecimalPlaces    StandardWidth                           SuperPropertyIRI                           YK_Commodity    YK_Corporate    YK_Currency    YK_Equity    YK_Index    YK_MoneyMarket    YK_Mortgage    YK_Municipal    YK_Preferred    YK_USGovernment           description           identifier    rdf_langString        title         xsd_fractionDigits     xsd_length     xsd_maxExclusive    xsd_maxInclusive    xsd_maxLength    xsd_minExclusive    xsd_minInclusive    xsd_minLength    xsd_pattern        xsd_type

__________    __________    __________    _________________________________    ______________________    _________________________    _______________    _______    ___________    ______________    _________    _________    ____________________________________________________________    __________    ____________    ___________    __________________    _______________   __________________    _________________________    ____________    ____________________    _____________________    _____________    ______________________________________________________________    ____________    ____________    ___________    _________    ________    ______________    ___________    ____________    ____________    _______________    _________________________    __________    ______________    ______________    __________________    ____________    ________________    ________________    _____________    ________________    ________________    _____________    ____________    _______________


1×1 struct    {0×0 char}    {3×1 cell}    {'Mon, 01 Jan 1996 00:00:00 GMT'}    {'End of Day Pricing'}     {'Pricing - Intraday'}           false          true         true        {'Last Price'}    {'PR005'}    {'Price'}    {'https://api.bloomberg.com/eap/catalogs/bbg/fields/pxLast'}      false         {'Hare'}      {'PX_LAST'}    {'EQY_LAST_TRADE'}         true               false                     true               {0×0 double}           true                 {0×0 double}         {0×0 double}     {'https://api.bloomberg.com/eap/catalogs/bbg/fields/snapshot'}       true            true            true          true        true           true             true           true            true              true          {'Test data field list'}     {'pxLast'}     {0×0 double}     {'LastPrice'}            8.00           {0×0 double}      {0×0 double}        {0×0 double}      {0×0 double}       {0×0 double}        {0×0 double}      {0×0 double}     {0×0 double}    {'xsd:decimal'}

 


response = 

  ResponseMessage with properties:

    StatusLine: ''
    StatusCode: OK
        Header: [1×13 matlab.net.http.HeaderField]
          Body: [1×1 matlab.net.http.MessageBody]
     Completed: 0

Input Arguments

collapse all

Bloomberg Hypermedia connection, specified as a Bloomberg Hypermedia object.

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

Field specified as a character vector or string scalar.

Output Arguments

collapse all

Field list identifier, returned as a string scalar.

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

Version History

Introduced in R2023b