SlideShare a Scribd company logo
Bloomberg API
POINT PERFECT TECHNOLOGY SOLUTIONS
WWW.PPTSSOLUTIONS.COM
Overview of the Bloomberg API
 The Bloomberg API provides developers with 24x7 programmatic access to data
from the Bloomberg Data Centre for use in customer applications.
 The established service provides free, unrestricted access to raw data for customers
for its financial market information.
 The Bloomberg API lets you integrate streaming real-time and delayed data,
reference data, historical data, intraday data, and Bloomberg derived data into
your own custom and third-party applications.
What kind of data?
 Infrastructure for high-performance worldwide delivery of arbitrary structured data
from multiple distributed sources
 Many different services, with "market data" most heavily used
 Prices, trades, volumes, etc. delivered directly from exchanges
 Real-time subscriptions to live data
 Query interface to database of historical data
Features of the Bloomberg API
 Interfaces in C, C++, Java, .NET, Perl, and Python
 Linux, Windows, Solaris, Mac OS X
 Full set of example applications—easy starting point
http://openbloomberg.com/open-api/
 Lightweight Interfaces
 32- and 64-bit Programming Support
 Pure Java Implementation: The Java API is implemented entirely in Java. Bloomberg
did not use JNI to wrap either our existing C library or the new C++ library.
Real-time prices in Python
session = blpapi.Session()
session.start()
subscriptions = blpapi.SubscriptionList()
subscriptions.add("IBM US Equity", "LAST_PRICE,BID,ASK", "", blpapi::CorrelationId(1))
session.subscribe(subscriptions)
while (True):
event = session.nextEvent()
for msg in event:
print("IBM: ", msg)
Application Structure
 The Bloomberg API object model contains a small number of key objects which
applications use to request, receive and interpret data.
 Session: An application creates a Session object to manage its connection with the
Bloomberg infrastructure.
 Service: Using the Session object, an application creates a Service object and then
‘opens’ each Bloomberg service that it will use.
 Request: The client can make individual requests for data.
 Subscription: the client can start a subscription with the service for on-going data
updates.
 Event: Programmatically, the customer application obtains Event objects for the
Session and then extracts from those Event objects one or more Message objects
containing the Bloomberg data.
Bloomberg API - Two Paradigms
Using the Request/Response
Paradigm - 1
public static void main(String[] args) throws Exception {
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.setServerHost("localhost"); // default value
sessionOptions.setServerPort(8194); // default value
Session session = new Session(sessionOptions);
if (!session.start()) {
System.out.println("Could not start session.");
System.exit(1);
}
if (!session.openService("//blp/refdata")) {
System.out.println("Could not open service " +
"//blp/refdata");
System.exit(1);
}
Using the Request/Response
Paradigm - 2
CorrelationID requestID = new CorrelationID(1);
Service refDataSvc = session.getService("//blp/refdata");
Request request =
refDataSvc.createRequest("ReferenceDataRequest");
request.append("securities", "IBM US Equity");
request.append("fields", "PX_LAST");
session.sendRequest(request, requestID);
boolean continueToLoop = true;
Using the Request/Response
Paradigm - 3
while (continueToLoop) {
Event event = session.nextEvent();
switch (event.eventType().intValue()) {
case Event.EventType.Constants.RESPONSE: // final event
continueToLoop = false; // fall through
case Event.EventType.Constants.PARTIAL_RESPONSE:
handleResponseEvent(event);
break;
default:
handleOtherEvent(event);
break;
}
}
}
Services
Core: Reference Data Service "//blp/refdata"
Market Data Service "//blp/mktdata"
Additional: Custom VWAP Service "//blp/mktvwap"
Market Bar Subscription Service "//blp/mktbar"
API Field Information Service "//blp/apiflds"
Page Data Service "//blp/pagedata"
Technical Analysis Service "//blp/tasvc"
API Authorization "//blp/apiauth"
Authorization and Permissioning
Systems
 Authentication: Who is the consumer?
 Authorization: What data is the consumer entitled to see?
Publishing
 The Bloomberg API allows customer applications to publish data as well as consume
it. Customer data can be published for distribution within the customer’s enterprise,
contributed to the Bloomberg infrastructure, distributed to others, or used for
warehousing.
 Publishing applications might simply broadcast data or they can be “interactive”,
responding to feedback from the infrastructure about the currently active
subscriptions from data consumers.
Simple Broadcast
 Creating a session.
 Obtaining authorization.
 Creating the topic.
 Publishing events for the topic to the designated service.
Interactive Publication
 Creating a session.
 Obtaining authorization.
 Registering for subscription start and stop messages.
 Handling subscription start and stop events, which add and remove topics to the
active publication set.
 Creating a topic.
 Publishing events for the active topics of the designated service.
Questions?

More Related Content

Similar to Bloomberg API Open Source Development and Solution Providers India

Events, Picos, and Microservices
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and Microservices
Phil Windley
 
Streaming Visualisation
Streaming VisualisationStreaming Visualisation
Streaming Visualisation
Guido Schmutz
 
Understanding Business APIs through statistics
Understanding Business APIs through statisticsUnderstanding Business APIs through statistics
Understanding Business APIs through statistics
WSO2
 
Platform Events by Tim Taylor
Platform Events by Tim TaylorPlatform Events by Tim Taylor
Platform Events by Tim Taylor
Christine Smith
 
What's New in the Winter '16 Release (4.2)
What's New in the Winter '16 Release (4.2)What's New in the Winter '16 Release (4.2)
What's New in the Winter '16 Release (4.2)
AppDynamics
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
Apigee | Google Cloud
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming Visualization
Guido Schmutz
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData Seattle
Jim Dowling
 
Scaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at GrabScaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at Grab
Roman
 
Notification Service 2005
Notification Service 2005Notification Service 2005
Notification Service 2005
shram2k
 
Building event-driven Microservices with Kafka Ecosystem
Building event-driven Microservices with Kafka EcosystemBuilding event-driven Microservices with Kafka Ecosystem
Building event-driven Microservices with Kafka Ecosystem
Guido Schmutz
 
Building Event-Driven (Micro)Services with Apache Kafka
Building Event-Driven (Micro)Services with Apache KafkaBuilding Event-Driven (Micro)Services with Apache Kafka
Building Event-Driven (Micro)Services with Apache Kafka
Guido Schmutz
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robots
dbpublications
 
Async
AsyncAsync
Picos, CloudOS, and Connecting Things
Picos, CloudOS, and Connecting ThingsPicos, CloudOS, and Connecting Things
Picos, CloudOS, and Connecting Things
Phil Windley
 
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInventPros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Sudhir Tonse
 
Connecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in BluemixConnecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in Bluemix
IBM
 
[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0
camunda services GmbH
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
Guido Schmutz
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming Visualization
Guido Schmutz
 

Similar to Bloomberg API Open Source Development and Solution Providers India (20)

Events, Picos, and Microservices
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and Microservices
 
Streaming Visualisation
Streaming VisualisationStreaming Visualisation
Streaming Visualisation
 
Understanding Business APIs through statistics
Understanding Business APIs through statisticsUnderstanding Business APIs through statistics
Understanding Business APIs through statistics
 
Platform Events by Tim Taylor
Platform Events by Tim TaylorPlatform Events by Tim Taylor
Platform Events by Tim Taylor
 
What's New in the Winter '16 Release (4.2)
What's New in the Winter '16 Release (4.2)What's New in the Winter '16 Release (4.2)
What's New in the Winter '16 Release (4.2)
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming Visualization
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData Seattle
 
Scaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at GrabScaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at Grab
 
Notification Service 2005
Notification Service 2005Notification Service 2005
Notification Service 2005
 
Building event-driven Microservices with Kafka Ecosystem
Building event-driven Microservices with Kafka EcosystemBuilding event-driven Microservices with Kafka Ecosystem
Building event-driven Microservices with Kafka Ecosystem
 
Building Event-Driven (Micro)Services with Apache Kafka
Building Event-Driven (Micro)Services with Apache KafkaBuilding Event-Driven (Micro)Services with Apache Kafka
Building Event-Driven (Micro)Services with Apache Kafka
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robots
 
Async
AsyncAsync
Async
 
Picos, CloudOS, and Connecting Things
Picos, CloudOS, and Connecting ThingsPicos, CloudOS, and Connecting Things
Picos, CloudOS, and Connecting Things
 
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInventPros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
 
Connecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in BluemixConnecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
 
Streaming Visualization
Streaming VisualizationStreaming Visualization
Streaming Visualization
 

More from Point Perfect Technology Solutions

Importance of goal
Importance of goalImportance of goal
CRM solution provider India
CRM solution provider IndiaCRM solution provider India
CRM solution provider India
Point Perfect Technology Solutions
 
Android app development India
Android app development IndiaAndroid app development India
Android app development India
Point Perfect Technology Solutions
 
Simple Marketing Tips for Small Business
Simple Marketing Tips for Small BusinessSimple Marketing Tips for Small Business
Simple Marketing Tips for Small Business
Point Perfect Technology Solutions
 
How to boost your creativity
How to boost your creativityHow to boost your creativity
How to boost your creativity
Point Perfect Technology Solutions
 
SEO / Internet Marketing Process Tips
SEO / Internet Marketing Process TipsSEO / Internet Marketing Process Tips
SEO / Internet Marketing Process Tips
Point Perfect Technology Solutions
 
Branding-SEO, SMO, SEM, Internet Marketing
Branding-SEO, SMO, SEM, Internet MarketingBranding-SEO, SMO, SEM, Internet Marketing
Branding-SEO, SMO, SEM, Internet Marketing
Point Perfect Technology Solutions
 

More from Point Perfect Technology Solutions (7)

Importance of goal
Importance of goalImportance of goal
Importance of goal
 
CRM solution provider India
CRM solution provider IndiaCRM solution provider India
CRM solution provider India
 
Android app development India
Android app development IndiaAndroid app development India
Android app development India
 
Simple Marketing Tips for Small Business
Simple Marketing Tips for Small BusinessSimple Marketing Tips for Small Business
Simple Marketing Tips for Small Business
 
How to boost your creativity
How to boost your creativityHow to boost your creativity
How to boost your creativity
 
SEO / Internet Marketing Process Tips
SEO / Internet Marketing Process TipsSEO / Internet Marketing Process Tips
SEO / Internet Marketing Process Tips
 
Branding-SEO, SMO, SEM, Internet Marketing
Branding-SEO, SMO, SEM, Internet MarketingBranding-SEO, SMO, SEM, Internet Marketing
Branding-SEO, SMO, SEM, Internet Marketing
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 

Bloomberg API Open Source Development and Solution Providers India

  • 1. Bloomberg API POINT PERFECT TECHNOLOGY SOLUTIONS WWW.PPTSSOLUTIONS.COM
  • 2. Overview of the Bloomberg API  The Bloomberg API provides developers with 24x7 programmatic access to data from the Bloomberg Data Centre for use in customer applications.  The established service provides free, unrestricted access to raw data for customers for its financial market information.  The Bloomberg API lets you integrate streaming real-time and delayed data, reference data, historical data, intraday data, and Bloomberg derived data into your own custom and third-party applications.
  • 3. What kind of data?  Infrastructure for high-performance worldwide delivery of arbitrary structured data from multiple distributed sources  Many different services, with "market data" most heavily used  Prices, trades, volumes, etc. delivered directly from exchanges  Real-time subscriptions to live data  Query interface to database of historical data
  • 4. Features of the Bloomberg API  Interfaces in C, C++, Java, .NET, Perl, and Python  Linux, Windows, Solaris, Mac OS X  Full set of example applications—easy starting point http://openbloomberg.com/open-api/  Lightweight Interfaces  32- and 64-bit Programming Support  Pure Java Implementation: The Java API is implemented entirely in Java. Bloomberg did not use JNI to wrap either our existing C library or the new C++ library.
  • 5. Real-time prices in Python session = blpapi.Session() session.start() subscriptions = blpapi.SubscriptionList() subscriptions.add("IBM US Equity", "LAST_PRICE,BID,ASK", "", blpapi::CorrelationId(1)) session.subscribe(subscriptions) while (True): event = session.nextEvent() for msg in event: print("IBM: ", msg)
  • 6. Application Structure  The Bloomberg API object model contains a small number of key objects which applications use to request, receive and interpret data.  Session: An application creates a Session object to manage its connection with the Bloomberg infrastructure.  Service: Using the Session object, an application creates a Service object and then ‘opens’ each Bloomberg service that it will use.  Request: The client can make individual requests for data.  Subscription: the client can start a subscription with the service for on-going data updates.  Event: Programmatically, the customer application obtains Event objects for the Session and then extracts from those Event objects one or more Message objects containing the Bloomberg data.
  • 7. Bloomberg API - Two Paradigms
  • 8. Using the Request/Response Paradigm - 1 public static void main(String[] args) throws Exception { SessionOptions sessionOptions = new SessionOptions(); sessionOptions.setServerHost("localhost"); // default value sessionOptions.setServerPort(8194); // default value Session session = new Session(sessionOptions); if (!session.start()) { System.out.println("Could not start session."); System.exit(1); } if (!session.openService("//blp/refdata")) { System.out.println("Could not open service " + "//blp/refdata"); System.exit(1); }
  • 9. Using the Request/Response Paradigm - 2 CorrelationID requestID = new CorrelationID(1); Service refDataSvc = session.getService("//blp/refdata"); Request request = refDataSvc.createRequest("ReferenceDataRequest"); request.append("securities", "IBM US Equity"); request.append("fields", "PX_LAST"); session.sendRequest(request, requestID); boolean continueToLoop = true;
  • 10. Using the Request/Response Paradigm - 3 while (continueToLoop) { Event event = session.nextEvent(); switch (event.eventType().intValue()) { case Event.EventType.Constants.RESPONSE: // final event continueToLoop = false; // fall through case Event.EventType.Constants.PARTIAL_RESPONSE: handleResponseEvent(event); break; default: handleOtherEvent(event); break; } } }
  • 11. Services Core: Reference Data Service "//blp/refdata" Market Data Service "//blp/mktdata" Additional: Custom VWAP Service "//blp/mktvwap" Market Bar Subscription Service "//blp/mktbar" API Field Information Service "//blp/apiflds" Page Data Service "//blp/pagedata" Technical Analysis Service "//blp/tasvc" API Authorization "//blp/apiauth"
  • 12. Authorization and Permissioning Systems  Authentication: Who is the consumer?  Authorization: What data is the consumer entitled to see?
  • 13. Publishing  The Bloomberg API allows customer applications to publish data as well as consume it. Customer data can be published for distribution within the customer’s enterprise, contributed to the Bloomberg infrastructure, distributed to others, or used for warehousing.  Publishing applications might simply broadcast data or they can be “interactive”, responding to feedback from the infrastructure about the currently active subscriptions from data consumers.
  • 14. Simple Broadcast  Creating a session.  Obtaining authorization.  Creating the topic.  Publishing events for the topic to the designated service.
  • 15. Interactive Publication  Creating a session.  Obtaining authorization.  Registering for subscription start and stop messages.  Handling subscription start and stop events, which add and remove topics to the active publication set.  Creating a topic.  Publishing events for the active topics of the designated service.