realtime
实时数据彭博连接v3
描述
例子
检索一个安全性的数据
检索一个安全性的数据Using the Event Handlerv3stockticker
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
。
v3stockticker
requires the input argumentF
ofrealtime
成为'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 ...
realtime
returns the Bloomberg subscription list object潜艇
和matlab®计时器对象具有其属性。然后,realtime
返回IBM安全性的股票滴答数据,并以销量和最后的交易价格返回。
实时数据继续显示,直到您执行停止
or关
功能。
关the Bloomberg connection.
关闭(c)
Retrieve Data for Multiple Securities Using the Event Handlerv3stockticker
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的最后一次交易和数量®证券。
v3stockticker
requires the input argumentF
of 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 ...
realtime
returns the Bloomberg subscription list object潜艇
以及具有其属性的MATLAB计时器对象。然后,realtime
returns 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)
检索一个安全性的数据Using the Event Handlerv3showtrades
You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3showtrades
that 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
。
v3showtrades
requires the input argumentF
ofrealtime
成为任何组合:'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: ''
realtime
returns the Bloomberg subscription list object潜艇
以及具有其属性的MATLAB计时器对象。然后,v3showtrades
显示一个图表,显示IBM的数量,最后交易,出价,询问和音量重量调整价格(VWAP)数据。
实时数据继续显示,直到您执行停止
or关
功能。
关the Bloomberg connection.
关闭(c)
检索一个安全性的数据Using the Event Handlerv3pricevol
You can create your own event handler function to process Bloomberg data. For this example, use the event handlerv3pricevol
that 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
。
v3pricevol
requires the input argumentF
ofrealtime
成为'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: ''
realtime
returns the Bloomberg subscription list object潜艇
以及具有其属性的MATLAB计时器对象。然后,v3pricevol
显示一个图形显示IBM的最后价格和数量数据。
实时数据继续显示,直到您执行停止
or关
功能。
关the Bloomberg connection.
关闭(c)
输入参数
s
-Security list
角色向量|字符串标量|字符向量的单元格数|字符串数组
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
|细绳
F
-彭博data fields
角色向量|字符串标量|字符向量的单元格数|字符串数组
彭博数据字段,指定为字符向量,字符串标量,字符矢量的单元格数量或字符串数组。字符向量或字符串表示一个彭博数据字段名称。字符向量或字符串数组的单元格数组表示多个彭博数据字段名称。有关您可以指定的字段的详细信息,请参阅彭博API开发人员指南使用theWAPI
Example:{'LAST_PRICE';'OPEN'}
数据类型:Char
|Cell
|细绳
eventhandler
-活动处理程序
角色向量|字符串标量
活动处理程序,,,,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
|细绳
输出参数
d
-彭博data
结构(默认)|表|时间表
彭博数据作为结构,表格或时间表返回。彭博数据的数据类型取决于DataReturnFormatand数据电视properties of the connection object. For details about the data, see the彭博API开发人员指南使用theWAPI
潜艇
- 彭博社订阅
目的
彭博社订阅,返回为彭博对象。有关此对象的详细信息,请参阅彭博API开发人员指南使用theWAPI
t
- MATLAB计时器
目的
MATLAB计时器,作为MATLAB对象返回。有关此对象的详细信息,请参阅timer
。
版本历史记录
matlab命令
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。万博1manbetx
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
美洲
- América Latina(Español)
- 加拿大(英语)
- 曼联States(英语)