Main Content

realtime

实时数据彭博连接v3

描述

例子

d= realtime(C,,,,s,,,,Freturns the data for the given connectionC,,,,security lists,并要求字段Frealtime访问彭博社®市场数据服务。

例子

[[潜艇,,,,t] = realtime(C,,,,s,,,,F,,,,eventhandler返回订阅列表潜艇和计时器t与订阅列表的实时事件处理程序相关联。给定连接C, 这realtimeFunction subscribes to a security or securitiess和请求字段F,在运行事件处理程序时实时更新eventhandler

例子

全部收缩

仅检索数据的快照,仅用于一个安全性。

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博b-pipe®使用bpipe

检索IBM的最后交易和数量®security.

d =实时(c,'IBM我们的权益',,,,{'Last_Trade',,,,'体积'})
d= LAST_TRADE: '181.76' VOLUME: '7277793'

关the Bloomberg connection.

关闭(c)

You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3stockticker这返回彭博股票数据。

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博b-pipe使用bpipe

使用事件处理程序检索IBM安全的最后交易和数量v3stockticker

v3stocktickerrequires the input argumentFofrealtime成为'Last_Trade',,,,'体积', 或者both.

[[subs,t] = realtime(c,'IBM我们的权益',,,,{'Last_Trade',,,,'体积'},...'v3stockticker'
subs = com.bloomberglp.blpapi.SubscriptionList@79f07684 Timer Object: timer-2 Timer Settings ExecutionMode: fixedRate Period: 0.05 BusyMode: drop Running: on Callbacks TimerFcn: 1x4 cell array ErrorFcn: '' StartFcn: '' StopFcn: '' ** IBM US Equity ** 100 @ 181.81 29-OCT-2013 15:48:50 ** IBM US Equity ** 100 @ 181.795 29-OCT-2013 15:48:48:50 ** IBM US Equity ** ibm US Equity ** 100 @ 181.8065 29 29-oct-2013 15:48:51 ...

realtimereturns the Bloomberg subscription list object潜艇和matlab®计时器对象具有其属性。然后,realtime返回IBM安全性的股票滴答数据,并以销量和最后的交易价格返回。

实时数据继续显示,直到您执行停止or功能。

关the Bloomberg connection.

关闭(c)

You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3stockticker这返回彭博股票数据。

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博b-pipe使用bpipe

检索IBM和Ford Motor Company的最后一次交易和数量®证券。

v3stocktickerrequires the input argumentFof therealtime功能是'Last_Trade',,,,'体积', 或者both.

[subs,t] =实时(c,{'IBM我们的权益',,,,'F US Equity'},...{'Last_Trade',,,,'体积'},'v3stockticker'
潜艇= com.bloomberglp.blpapi.SubscriptionList@6c1066f6 Timer Object: timer-3 Timer Settings ExecutionMode: fixedRate Period: 0.05 BusyMode: drop Running: on Callbacks TimerFcn: 1x4 cell array ErrorFcn: '' StartFcn: '' StopFcn: '' ** IBM US Equity ** 32433 @ 181.85 29-Oct-2013 15:50:05 ** IBM US Equity ** 200 @ 181.85 29-Oct-2013 15:50:05 ** IBM US Equity ** 100 @ 181.86 29-Oct-2013 15:50:05 ** F US Equity ** 300 @ 17.575 30-Oct-2013 10:14:06 ** F US Equity ** 100 @ 17.57 30-Oct-2013 10:14:06 ** F US Equity ** 100 @ 17.5725 30-Oct-2013 10:14:06 ...

realtimereturns the Bloomberg subscription list object潜艇以及具有其属性的MATLAB计时器对象。然后,realtimereturns the stock tick data for the IBM and Ford Motor Company securities with the last trade price and volume.

Real-time data continues to display until you use the停止or功能。

关the Bloomberg connection.

关闭(c)

You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3showtradesthat creates a figure showing requested data for a security.

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博b-pipe使用bpipe

使用事件处理程序检索IBM安全性的IBM安全性,从v3showtrades

v3showtradesrequires the input argumentFofrealtime成为任何组合:'Last_Trade',,,,'Bid',,,,'Ask',,,,'体积',,,,and'vwap'

[[subs,t] = realtime(c,'IBM我们的权益',,,,...{'Last_Trade',,,,'Bid',,,,'Ask',,,,'体积',,,,'vwap'},...“ V3showtrades”
潜艇= com.bloomberglp.blpapi.SubscriptionList@5c17dcdb Timer Object: timer-4 Timer Settings ExecutionMode: fixedRate Period: 0.05 BusyMode: drop Running: on Callbacks TimerFcn: 1x4 cell array ErrorFcn: '' StartFcn: '' StopFcn: ''

realtimereturns the Bloomberg subscription list object潜艇以及具有其属性的MATLAB计时器对象。然后,v3showtrades显示一个图表,显示IBM的数量,最后交易,出价,询问和音量重量调整价格(VWAP)数据。

V3 Show Trades Demo figure displays real-time price data for IBM stock.

实时数据继续显示,直到您执行停止or功能。

关the Bloomberg connection.

关闭(c)

You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3pricevolthat creates a figure showing last price and volume data for a security.

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博b-pipe使用bpipe

使用事件处理程序检索IBM安全性的最后价格和音量数据v3pricevol

v3pricevolrequires the input argumentFofrealtime成为'Last_Price',,,,'体积', 或者both.

[[subs,t] = realtime(c,'IBM我们的权益',,,,{'Last_Price',,,,'体积'},...'v3pricevol'
潜艇= com.bloomberglp.blpapi.SubscriptionList@16f66676 Timer Object: timer-5 Timer Settings ExecutionMode: fixedRate Period: 0.05 BusyMode: drop Running: on Callbacks TimerFcn: 1x4 cell array ErrorFcn: '' StartFcn: '' StopFcn: ''

realtimereturns the Bloomberg subscription list object潜艇以及具有其属性的MATLAB计时器对象。然后,v3pricevol显示一个图形显示IBM的最后价格和数量数据。

V3价格量演示图显示了两个带有实时数据的图。第一个图显示了IBM股票的最后价格数据。第二个图显示了IBM库存的音量数据。

实时数据继续显示,直到您执行停止or功能。

关the Bloomberg connection.

关闭(c)

输入参数

全部收缩

彭博连接,指定为使用的连接对象blp,,,,blpsrv, 或者bpipe

Security list, specified as a character vector or string scalar for one security or a cell array of character vectors or string array for multiple securities. You can specify the security by name or by CUSIP, and with or without the pricing source.

数据类型:Char|Cell|细绳

彭博数据字段,指定为字符向量,字符串标量,字符矢量的单元格数量或字符串数​​组。字符向量或字符串表示一个彭博数据字段名称。字符向量或字符串数​​组的单元格数组表示多个彭博数据字段名称。有关您可以指定的字段的详细信息,请参阅彭博API开发人员指南使用theWAPI option from the Bloomberg terminal.

Example:{'LAST_PRICE';'OPEN'}

数据类型:Char|Cell|细绳

活动处理程序,,,,specified as a character vector or string scalar that denotes the name of an event handler function that you define. You can define an event handler function to process any type of real-time Bloomberg events. The specified event handler function runs every time the timer fires.

数据类型:Char|细绳

输出参数

全部收缩

彭博数据作为结构,表格或时间表返回。彭博数据的数据类型取决于DataReturnFormatand数据电视properties of the connection object. For details about the data, see the彭博API开发人员指南使用theWAPI option from the Bloomberg terminal.

彭博社订阅,返回为彭博对象。有关此对象的详细信息,请参阅彭博API开发人员指南使用theWAPI option from the Bloomberg terminal.

MATLAB计时器,作为MATLAB对象返回。有关此对象的详细信息,请参阅timer

版本历史记录

介绍了R2010a