"BloombergDataLicense" (Service Connection)
-
See Also
- FinancialData
- ServiceRequest
- ServiceConnect
- EntityValue
-
- Service Connections
- BloombergTerminal
- Reuters
-
-
See Also
- FinancialData
- ServiceRequest
- ServiceConnect
- EntityValue
-
- Service Connections
- BloombergTerminal
- Reuters
-
See Also
"BloombergDataLicense" (Service Connection)
This service connection requires Wolfram Finance Platform »
Connecting & Authenticating
ServiceConnect["BloombergDataLicense"] creates a connection to the Bloomberg Data License API. A client certificate must be installed to verify the user's identity.
Entity Lookup
Entity["BloombergDataLicense","entity"]["property"] gets the property "property" for Bloomberg Data License entity "entity".
Requests
ServiceRequest["BloombergDataLicense","request",params] creates a service request object to be sent to Bloomberg Data License service, using parameters params.
ServiceSubmit[req] submits a service request to the Bloomberg Data License API.
ServiceSubmit[ScheduledTask[req,spec]] submits a request to be run on Bloomberg Data License servers on the schedule specified by spec.
ServiceExecute[req] sends a service request to the Bloomberg Data License API.
Fields
"Fields" — look up valid fields supported by Bloomberg Data License service
Market Data
"GetData" — look up information on Bloomberg Data License service
| "Instruments" | instrument name | Bloomberg instrument name or Bloomberg Global ID (BBGID) | |
| "Fields" | list of fields | Bloomberg fields |
"GetQuotes" — return sale price of each trade
| "Instrument" | instrument name | Bloomberg instrument name or BBGID | |
| "Period" | time interval | time interval of tick events |
"GetAllQuotes" — return sale price and matching bid, and ask price for each trade
| "Instrument" | instrument name | Bloomberg instrument name or BBGID | |
| "Period" | time interval | time interval of tick events |
| "TaskStarted" | task is started | |
| "ScheduleTriggered" | scheduled task evaluation is triggered | |
| "ResponseReceived" | response received from the service | |
| "ScheduleExecuted" | scheduled task evaluation is executed | |
| "TaskStatusChanged" | task status changed | |
| "TaskFinished" | task is completely finished | |
| "TaskRemoved" | task is being removed |
With the specification HandlerFunctions-><|…,"eventi"->fi,…|>, fi[assoc] is evaluated whenever eventi is generated. The elements of assoc have keys specified by the setting for HandlerFunctionsKeys.
Possible keys specified by HandlerFunctionsKeys include:
| "Request" | request being submitted | |
| "EvaluationResult" | response received | |
| "Service" | name of the service | |
| "Instrument" | Bloomberg instrument | |
| "Property" | Bloomberg property | |
| "Value" | value for given instrument and property | |
| "EventName" | the name of the event being handled |
| "Schedule" | task schedule specification | |
| "RunInterval" | interval between task runs | |
| "PreviousRunCount" | number of times the task has already run | |
| "RemainingRunCount" | number of times the task still has to run | |
| "TotalRunCount" | total number of times the task is scheduled to run |
Examples
Basic Examples (5)
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]getDataRequest = ServiceRequest["BloombergDataLicense", "GetData", <|"Instruments" -> {"AZO UN Equity"}, "Fields" -> {"PX_LAST", "BID", "ASK"}|>]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|>]]ServiceSubmit[getHistoryRequest, HandlerFunctions -> <|"ResultReceived" -> ((history = #)&)|>, HandlerFunctionsKeys -> {"EvaluationResult"}]historyCreate a request to query deployed tasks:
remoteTasksRequest = ServiceExecute[ServiceRequest["BloombergDataLicense", "Request", {"Request" -> "RemoteScheduledTasks"}]]tasks = ServiceExecute[remoteTasksRequest];task = ServiceSubmit[
First[tasks],
HandlerFunctions -> <|"ResultReceived" -> Print|>,
HandlerFunctionsKeys -> {"EvaluationResult"}
]See Also
FinancialData ▪ ServiceRequest ▪ ServiceConnect ▪ EntityValue
Service Connections: BloombergTerminal ▪ Reuters