Fields

"Fields" — look up valid fields supported by Bloomberg Data License service

Market Data

"GetData" — look up information on Bloomberg Data License service

"GetQuotes" — return sale price of each trade

"GetAllQuotes" — return sale price and matching bid, and ask price for each trade

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Create a new connection:

datalicense=ServiceConnect["BloombergDataLicense"]

Look up the last available "BID" and "ASK" prices for "MSFT US Equity":

ServiceExecute[datalicense,
"GetData",
{
"Instruments"->{ "MSFT US Equity"},
"Fields"->{"PX_LAST"}
}
]

Create a request to fetch all trade prices for an instrument:

quotesReq = ServiceExecute[
ServiceRequest["BloombergDataLicense","Request",{"Request"->"GetQuotes","Instruments"->{"MSFT US Equity"},"Period"->DatePlus[Today,-1];;DatePlus[Today,-1]}]]

ServiceExecute[quotesReq]

Create a request:

getDataRequest = ServiceRequest["BloombergDataLicense","GetData",<|"Instruments"->{"AZO UN Equity"},"Fields"->{"PX_LAST","BID","ASK"}|>]

Submit the request:

ServiceSubmit[
ScheduledTask[getDataRequest,"Weekly"],
HandlerFunctions-><|"ResultReceived"->Print|>,
HandlerFunctionsKeys->{"EvaluationResult"}
]

Create a request to fetch historical data:

getHistoryRequest=ServiceExecute[ServiceRequest["BloombergDataLicense","Request",<|"Request"->"GetHistory","Instruments"->{"AZO UN Equity","MSFT US Equity"},"Fields"->{"PX_LAST"},"Period"->DateObject[{1990}];;Today|>]]

Submit the request:

ServiceSubmit[getHistoryRequest,HandlerFunctions-><|"ResultReceived"->((history=#)&)|>,HandlerFunctionsKeys->{"EvaluationResult"}]

Examine the result:

history

Create a request to query deployed tasks:

remoteTasksRequest = ServiceExecute[ServiceRequest["BloombergDataLicense","Request",{"Request"->"RemoteScheduledTasks"}]]

Query deployed tasks:

tasks = ServiceExecute[remoteTasksRequest];

Redeploy a task:

task = ServiceSubmit[
First[tasks],
HandlerFunctions-><|"ResultReceived"->Print|>,
HandlerFunctionsKeys->{"EvaluationResult"}
]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {  ▪    ▪  (RefLink[FinancialData, paclet:ref/FinancialData])  ▪  (RefLink[ServiceRequest, paclet:ref/ServiceRequest])  ▪  (RefLink[ServiceConnect, paclet:ref/ServiceConnect])  ▪  (RefLink[EntityValue, paclet:ref/EntityValue])}, {Related Service Connections:  (RefLink[BloombergTerminal, paclet:ref/service/BloombergTerminal])  ▪  (RefLink[Reuters, paclet:ref/service/Reuters])}})}})