Main Content

orders

获得彭博EMSX order subscription

Description

例子

[[事件,,,,潜艇] =订单(C,,,,字段潜艇Cribes to Bloomberg®EMSX fields字段使用彭博EMSX连接Corders返回现有事件数据事件从活动队列和彭博社EMSX订阅列表中潜艇

例子

[[事件,,,,潜艇] =订单(C,,,,字段,,,,名称,价值uses additional options specified by one or more姓名,,,,Valuepair arguments to specify a custom event handler or timeout value for the event handler.

例子

[[事件,,,,潜艇] =订单(C,,,,字段,,,,选项使用选项结构ure to customize the output, which is useful to preconfigure and save your options for repeated use. The选项结构字段和值分别对应于名称值对参数的名称和值。

Examples

Collapse all

Create the Bloomberg EMSX connectionC

C= emsx('//blp/emapisvc_beta');

订阅彭博EMSX订单的事件,使用彭博EMSX连接Cand Bloomberg EMSX field list字段

字段= {'emsx_broker',,,,'emsx_amount',,,,'emsx_fill'};[Events,subs] =订单(C,字段)
events = msg_type:{'e'} msg_sub_type:{'o'} event_status:4 ... subs = com.bloomberglp.blpapi.subscriptionlist@4bc3dc78

事件包含事件队列中当前事件的字段。潜艇Contains the Bloomberg EMSX subscription list object.

使用彭博社EMSX订阅列表对象退订订单事件潜艇

c.session.unsubscribe(subs)

关闭彭博社EMSX连接。

关闭(c)

Create the Bloomberg EMSX connectionC

C= emsx('//blp/emapisvc_beta');

编写一个定制事件处理程序名称的功能eventhandler。使用自定义事件处理程序使用timer。启动计时器运行eventhandler立即使用开始。For details, seeWriting and Running Custom Event Handler Functions

t= timer('timerfcn',,,,{@c.eventhandler},'时期',,,,1,...'executionMode',,,,'固定利率'); start(t)

tis the timer object.

订阅彭博EMSX订单的事件,使用彭博EMSX连接Cand Bloomberg EMSX field list字段。通过设置名称值对参数来使用自定义事件处理程序'useDefaultEventHandler'错误的

字段= {'emsx_broker',,,,'emsx_amount',,,,'emsx_fill'};[[事件,,,,潜艇] =订单(C,,,,字段,,,,'useDefaultEventHandler',,,,错误的)
events = [] subs = com.bloomberglp.blpapi.subscriptionlist@2c5b1c7e

事件Contains an empty double. The custom event handler processes the event queue.潜艇Contains the Bloomberg EMSX subscription list object.

使用彭博社EMSX订阅列表对象退订订单事件潜艇。Stop the timer to stop data updates using停止

C.Session.unsubscribe(subs)Stop(t)

如果您完成了处理数据更新,请使用delete

删除(t)

关闭彭博社EMSX连接。

关闭(c)

Create the Bloomberg EMSX connectionC

C= emsx('//blp/emapisvc_beta');

订阅彭博EMSX订单的事件,使用彭博EMSX连接Cand Bloomberg EMSX field list字段。指定名称值对参数超时并将其设置为200毫秒。

字段= {'emsx_broker',,,,'emsx_amount',,,,'emsx_fill'};[[事件,,,,潜艇] =订单(C,,,,字段,,,,'超时',200)
events = msg_type:{'e'} msg_sub_type:{'o'} event_status:4 ... subs = com.bloomberglp.blpapi.subscriptionlist@4bc3dc78

事件包含事件队列中当前事件的字段。潜艇Contains the Bloomberg EMSX subscription list object.

使用彭博社EMSX订阅列表对象退订订单事件潜艇

c.session.unsubscribe(subs)

关闭彭博社EMSX连接。

关闭(c)

Create the Bloomberg EMSX connectionC

C= emsx('//blp/emapisvc_beta');

创建一个结构选项。To use the default event handler, set the fielduseDefaultEventHandlertrue。设置字段超时到200毫秒。订阅彭博EMSX订单的事件,使用彭博EMSX连接C,彭博社EMSX现场列表字段,,,,and options structure选项

options.timeout = 200;options.usedefaulteventhandler = true;字段= {'emsx_broker',,,,'emsx_amount',,,,'emsx_fill'};[Events,subs] =订单(C,字段,选项)
events = msg_type:{'e'} msg_sub_type:{'o'} event_status:4 ... subs = com.bloomberglp.blpapi.subscriptionlist@4bc3dc78

事件包含事件队列中当前事件的字段。潜艇Contains the Bloomberg EMSX subscription list object.

使用彭博社EMSX订阅列表对象退订订单事件潜艇

c.session.unsubscribe(subs)

关闭彭博社EMSX连接。

关闭(c)

输入参数

Collapse all

彭博社EMSX服务连接,指定为创建的连接对象emsx

彭博社EMSX现场信息,,,,specified using a cell array. UsegetAllFieldMetaData要查看彭博EMSX服务的可用现场信息。

Example:'EMSX_TICKER'
'emsx_amount'
'EMSX_ORDER_TYPE'

数据类型:Cell

定制事件处理程序或超时值的选项,指定为结构。使用选项结构而不是名称值对参数来重复使用可选的名称值对参数,以指定事件处理程序的自定义事件处理程序或超时值。

选项结构字段和值分别对应于名称值对参数的名称和值。

Specify using a custom event handler and a timeout value of 500 milliseconds.

Example:options.usedefaulteventhandler = false;
选项。timeOut = 500;

数据类型:结构

名称值参数

Specify optional pairs of arguments asname1 = value1,...,namen = valuen, 在哪里姓名是参数名称和Valueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

Example:“useDefaultEventHandler”,假的

事件处理程序偏好的标志,表明是使用默认事件处理程序处理订单事件,该事件指定为逗号分隔对'useDefaultEventHandler'和逻辑值trueor错误的

要指定默认事件处理程序,请将此标志设置为true

Otherwise, set this flag to错误的指定自定义事件处理程序。

数据类型:逻辑

活动处理程序的超时值for the Bloomberg EMSX service, specified as the comma-separated pair consisting of'超时'以及一个毫秒单位的非负整数。

Example:'超时',,,,200

数据类型:double

输出参数

Collapse all

事件队列内容,作为双重或结构返回。

如果事件队列包含事件,事件is a structure containing the current contents of the event queue. Otherwise,事件是一个空的双人。

当名称值对参数'useDefaultEventHandler'或结构相同的字段选项is set to错误的,,,,事件是一个空的双人。

彭博社EMSX订阅列表,返回为彭博社EMSX订阅列表对象。

版本历史记录

Introduced in R2013a