Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

news

IQFEED asynchronous news data

Syntax

news(Q,S)
news(Q,S,elistener,ecallback)

Description

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

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

The syntax news(Q,true) turns on news updates for the list of currently subscribed level 1 securities and news(Q,false) turns off news updates for the list of currently subscribed level 1 securities.

Arguments

Q

IQFEED® connection handle created using iqf.

S

S is specified as a character vector for a single security or a cell array of character vectors for multiple securities.

elistener

Function handle that specifies the function used to listen for data on the news lookup port.

ecallback

Function handle that specifies the function that processes data events.

Examples

Return news data using the defaults for socket listener and event handler and display the results in the MATLAB® workspace in the variable IQFeedNewsData.

news(q,'ABC')
openvar('IQFeedNewsData')

Return news data for the security ABC using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedNewsData.

news(q,'ABC',@iqfeednewslistener,@iqfeednewseventhandler)
openvar('IQFeedNewsData')

Related Examples

Was this topic helpful?