Capital Markets Adapters 10.3.1 | Apama Capital Markets Adapters Documentation 10.3.1 | Bloomberg B-PIPE Adapter | Reference data service
 
Reference data service
Note:
The reference data service will be deprecated in a future release.
This service is an EP service but supports BBA (Best Bid Ask) for ReferenceDataRequests. To support this service, you must enable the transport parameter property SupportAdditionalServices.
Example for enabling the service:
<property name="SupportAdditionalServices" value="Y" />
This service supports six types of requests. All are EP (Extra Parameter) Data except for ReferenceDataRequests that supports BBA. List of available requests are as follows:
*ReferenceDataRequest
*HistoricalDataRequest
*IntradayTickRequest
*IntradayBarRequest
*PortfolioDataRequest
*BeqsRequest
Note:
Refer to BPIPE_support.mon for event definitions.
1. ReferenceDataRequest
Field Types
Values and Description
Streams Supported
BBA, EP
Fields
Fields the user wants. fields can be specified using Fields Parameter or through MODELS. See Configurability.
Overrides
Overrides event passed through controlParams. A sequence of overrideInfo events.
For example:
Overrides = com.apama.bpipe.overrides([com.apama.bpipe.overrideInfo(\"PX_BID\",\"13\")])
Fields = BID,ASK,BID_SIZE,ASK_SIZE or MODELS = BBAFields
Note:
For BBA stream type, default model should be BBAFields. Edit the BLOOMBERG.xml file to change default model.
Example Response:
Keys
Values
Fields
ASK,PX_BID,ASK_SIZE,BID,BID_SIZE
Symbol
TT314347@UKRB
Yellow Key
Corp
Adding above field to response parameters:
com.apama.bpipe.overrides overrides := new com.apama.bpipe.overrides;

com.apama.bpipe.overrideInfo ft := new com.apama.bpipe.overrideInfo;
ft.fieldId:="PX_BID";
ft.value := "13";
overrides.overrideInfo.append(ft);

com.apama.session.CtrlParams ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("overrides",overrides.toString());
ctrlParams.addParam("Fields","BID,ASK,BID_SIZE,ASK_SIZE"); or
ctrlParams.addParam("MODELS","BBAFields");
The response will be a referenceDataResponse event.
ReferenceDataResponse :
com.apama.bpipe.ReferenceDataResponse("TT314347@UKRB corp",
com.apama.bpipe.fieldData({"ASK":"140.100000","PX_BID":
"13.000000","ASK_SIZE":"25000","BID":"13.000000","BID_SIZE":"25000"}))
2. HistoricalDataRequest
Field Types
Variable Name
Description
Streams supported
EP
Fields required
Fields
Fields the user wants. fields can be specified using Fields Parameter or through MODELS. See Configurability.
startDate
The start date in a year/month/day format.
endDate
The end date in a year/month/day format. This will default to the current day if not specified.
OptionalFields
calendarOverridesInfo
Consists of two fields , calendarOverrides and calendareOverridesOperation
calendarOverridesInfo must be passed as an calendarOverridesInfo event through control params.
calendarOverrides
A sequence of two character calendar code.
calendareOverridesOperation
Can be CDR_AND (Returns the intersection of trading days) or CDR_OR (Returns the union of trading days)
For more optional fields, look into BPIPE Developers Guide.
Examples
Keys
Values
Fields
BID, ASK
startDate
20150401
endDate
20150403
calendarOverridesInfo
com.apama.bpipe.calendarOverridesInfo(\"CDR_AND\",[com.apama.bpipe.calendarOverrides([\"UN\",\"JN\"])])
Adding the above fields to control parameters:

com.apama.bpipe.calendarOverridesInfo
calenderOverridesInfo := new com.apama.bpipe.calendarOverridesInfo;
com.apama.bpipe.calendarOverrides
caloverrides := new com.apama.bpipe.calendarOverrides;
caloverrides.exchange:=["UN","JN"];
calenderOverridesInfo.calendarOverrides.append(caloverrides);
calenderOverridesInfo.Operation:="CDR_AND";
com.apama.session.CtrlParams ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("calendarOverridesInfo",calenderOverridesInfo.toString());
ctrlParams.addParam("Fields","BID,ASK");
ctrlParams.addParam("startDate","20150401");
ctrlParams.addParam("endDate","20150403");
HistoricalDataResponse. The response will be an HistoricalDataResponse event.
3. IntradayTickRequest
Field Types
Variable Name
Description
Streams supported
EP
Fields required
Fields
Fields the user wants. fields can be specified using Fields Parameter or through MODELS. See Configurability.
startDateTime
The start date and time.
endDateTime
The end date and time.
eventType
Can be one or more of the TRADE, BID, ASK, BID_BEST, ASK_BEST, MID_PRICE, AT_TRADE, BEST_BID, BEST_ASK
OptionalFields
For more optional fields look into BPIPE Developers Guide.
Examples
Keys
Values
Fields
BID, ASK
startDateTime
2010-04-27T15:55:00
endDateTime
2010-04-27T16:00:00
calendarOverridesInfo
cTRADE, BID, ASK
Adding the above fields to control parameters:
com.apama.session.CtrlParams ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("Fields","BID,ASK");
ctrlParams.addParam("endDateTime","2010-04-27T15:55:00");
ctrlParams.addParam("endDateTime","2010-04-27T16:00:00");
ctrlParams.addParam("eventType","TRADE,BID,ASK");
The response will be an IntradayTickResponse event.
4. IntradayBarRequest
Field Types
Variable Name
Description
Streams supported
EP
Fields required
Fields
Fields the user wants. fields can be specified using Fields Parameter or through MODELS. See Configurability.
startDateTime
The start date and time.
endDateTime
The end date and time.
eventType
Can be one of the TRADE, BID, ASK, BID_BEST, ASK_BEST, MID_PRICE, AT_TRADE, BEST_BID, BEST_ASK
OptionalFields
For more optional fields look into BPIPE Developers Guide.
Examples
Keys
Values
Fields
BID, ASK
startDateTime
2010-04-27T15:55:00
endDateTime
2010-04-27T16:00:00
calendarOverridesInfo
TRADE
Adding the above fields to control parameters:

com.apama.session.CtrlParams
ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("Fields","BID,ASK");
ctrlParams.addParam("endDateTime","2010-04-27T15:55:00");
ctrlParams.addParam("endDateTime","2010-04-27T16:00:00");
ctrlParams.addParam("eventType","TRADE");
The response will be an IntradayBarResponse event.
5. PortfolioDataRequest
Field Types
Variable Name
Description
Streams supported
EP
Symbol
UXXXXXXX-X ( use PRTU<GO> in BPS )
YELLOW_KEY
Client
Fields required
Fields
Fields can be one or more of PORTFOLIO_MEMBER, PORTFOLIO_MPOSITION, PORTFOLIO_MWEIGHT & PORTFOLIO_DATA
OptionalFields
For more optional fields look into BPIPE Developers Guide.
Examples
Keys
Values
Fields
PORTFOLIO_MEMBER,PORTFOLIO_MPOSITION
Adding the above fields to control parameters:

com.apama.session.CtrlParams
ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("Fields","PORTFOLIO_MWEIGHT");
The response will be an PortfolioDataResponse event.
6. BeqsRequest
Field Types
Variable Name
Description
Streams supported
EP
Fields required
UXXXXXXX-X ( use PRTU<GO> in BPS )
screenName
The name of the screen to execute. It can be a user defined EQS screen or one of the Bloomberg Example screens on EQS <GO> on the BPS
ScreenType
Use PRIVATE for user-defined EQS screen.
Use GLOBAL for Bloomberg EQS screen.
OptionalFields
For more optional fields look into BPIPE Developers Guide.
Examples
Keys
Values
ScreenName
Global Volume Surges
ScreenType
GLOBAL

com.apama.session.CtrlParams
ctrlParams := new com.apama.session.CtrlParams;
ctrlParams.addParam("ScreenName","Global Volume Surges");
ctrlParams.addParam("ScreenType","Global");
Response will be a BeqsResponse event.