fieldsearch

Field search for Bloomberg connection V3

Syntax

Description

example

d = fieldsearch(c,f) returns field information on Bloomberg® V3 connection object c given a search string f.

Examples

expand all

Search for the Bloomberg Last Price Field

Create a Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server API using blpsrv or Bloomberg B-PIPE® using bpipe.

Return data for the search string 'LAST_PRICE'.

d = fieldsearch(c,'LAST_PRICE');

Display the first three rows of the returned data d.

d(1:3,:)
ans = 

    'Market Activity/...'    'PR005'    'PX_LAST'              'Last Price'             'Double'
    'Market Activity/...'    'RQ005'    'LAST_PRICE'           'Last Trade/Last ...'    'Double'
    'Market Activity/...'    'RQ134'    'LAST_ALL_SESSIONS'    'Last Price All S...'    'Double'

The columns in d contain the following:

  • Category

  • Field identifier

  • Field mnemonic

  • Field name

  • Field data type

Close the Bloomberg connection.

close(c)

Input Arguments

expand all

c — Bloomberg connectionconnection object

Bloomberg connection, specified as a connection object created using blp.

f — Search termstring

Search term, specified as a string that is used to retrieve Bloomberg field descriptive data.

Data Types: char

Output Arguments

expand all

d — Return datacell array

Return data, returned as an N-by-5 cell array containing categories, field identifiers, field mnemonics, field names, and field data types for each N row in the data set.

Was this topic helpful?