Documentation Center

  • Trial Software
  • Product Updates

marketdepth

IQFEED asynchronous level 2 data

Syntax

marketdepth(Q, S)
marketdepth(Q, S, elistener, ecallback)

Description

marketdepth(Q, S) returns asynchronous level 2 data using the default socket listener and event handler.

marketdepth(Q, S, elistener, ecallback) returns asynchronous level 2 data using an explicitly defined socket listener and event handler.

Arguments

Q

IQFEED® connection handle created using iqf.

S

S is specified as a string for a single security or a cell array of strings for multiple securities.

elistener

Function handle that specifies the function used to listen for data on the level 2 port.

ecallback

Function handle that specifies the function that processes data event.

Examples

Return level 2 data using the default socket listener and event handler and display the results in the MATLAB® workspace in the variable IQFeedLevelTwoData.

marketdepth(q,'ABC')
openvar('IQFeedLevelTwoData')
 

Initiate a watch on the security ABC for level 2 data using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedLevelTwoData.

marketdepth(q,'ABC',@iqfeedmarketdepthlistener,@iqfeedmarketdeptheventhandler)
openvar('IQFeedLevelTwoData')

See Also

| | | |

Was this topic helpful?