Documentation Center

  • Trial Software
  • Product Updates

realtime

IQFEED asynchronous level 1 data

Syntax

realtime(Q, S)
realtime(Q, S, F)
realtime(Q, S, elistener, ecallback)

Description

realtime(Q, S) returns asynchronous level 1 data using the current update field list, default socket listener, and event handler.

realtime(Q, S, F) returns asynchronous level 1 data for a specified field list using the default socket listener and event handler.

realtime(Q, S, elistener, ecallback) returns asynchronous level 1 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.

F

F is the field list. If no field list is specified or it is input as empty, the default IQFEED level 1 field will be updated with each tick.

elistener

Function handle that specifies the function used to listen for data on the IQFEED Lookup port.

ecallback

Function handle that specifies the function that processes data event.

Examples

Set the data precision. Setting the connection handle property Protocol determines the date format for the return data based on the IQFEED version specified by the protocol.

q.Protocol = 5.1

q = 

  iqf with properties: 

        User: 'username' 
    Password: 'password' 
        Port: {[1x1 System.Net.Sockets.Socket]} 
    PortName: {'Admin'} 
    Protocol: 5.1000
 

Return level 1 data for security ABC using the default socket listener and event handler. Display the results in the MATLAB® workspace in the variable IQFeedLevelOneData.

realtime(q,'ABC')
openvar('IQFeedLevelOneData')
 

Return level 1 data for security ABC using a field list and the defaults for the socket listener and event handler. Display the results in the MATLAB workspace in the variable IQFeedLevelOneData.

realtime(q,'ABC',...
{'Symbol','Exchange ID','Last','Change','Incremental Volume'})
openvar('IQFeedLevelOneData')
 

Return level 1 data for security ABC using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedLevelOneData.

realtime(q,'ABC',...
      {'Symbol','Exchange ID','Last','Change','Incremental Volume'},...
      @iqfeedlistener,@iqfeedeventhandler)
    openvar('IQFeedLevelOneData')

See Also

| | | |

Was this topic helpful?