Main Content

getsubscriptions

Retrieve Money.Net subscribed symbols and event handler functions

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.

Version History

Introduced in R2016b