Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getsubscriptions

Retrieve Money.Net subscribed symbols and event handler functions

Syntax

subs = getsubscriptions(c)

Description

example

subs = getsubscriptions(c) returns the subscription list subs that contains open subscriptions for the Money.Net connection c.

Examples

collapse all

Create Money.Net connection c using a user name and password.

username = 'user@company.com';
pwd = '999999';

c = moneynet(username,pwd);

Subscribe to the symbols IBM® and Yahoo!® for real-time data updates using the Money.Net connection c.

symbols = {'IBM','YHOO'};

realtime(c,symbols)

The default event handler function processes real-time data updates.

Retrieve the subscribed symbols and the corresponding event handler function for each symbol using the Money.Net connection c.

subs = getsubscriptions(c)
subs = 

    Symbols         EventHandlers     
    _______    _______________________

    'IBM'      @mnRealTimeEventHandler
    'YHOO'     @mnRealTimeEventHandler

subs returns a table with a row for each symbol and the corresponding event handler function.

Unsubscribe from all symbols using the Money.Net connection c.

stop(c)

Close the Money.Net connection.

close(c)

Input Arguments

collapse all

Money.Net connection, specified as a connection object created using moneynet.

Output Arguments

collapse all

Subscription list, returned as a table. The list contains all currently subscribed symbols and the corresponding event handler function that is processing real-time updates for each symbol. Each row in the table represents one unique subscription.

If there are no subscribed symbols, subs is an empty table.

Introduced in R2016b

Was this topic helpful?