moneynet

Create Money.Net connection

Description

The moneynet function creates a moneynet object. The moneynet object represents a Money.Net connection.

After you create a moneynet object, you can use the object functions to retrieve current, intraday, historical, real-time, and news data. You retrieve data based on your credentials, which consist of a user name and password. For credentials, contact Money.Net.

Creation

Description

example

c = moneynet(username,password) creates a Money.Net connection, sets the Username property, and uses a password.

example

c = moneynet(username,password,portnumber) also sets the Port property.

Input Arguments

expand all

Password required to access Money.Net data, specified as a character vector or string scalar. To request your Money.Net password, contact Money.Net.

Data Types: char | string

Properties

expand all

User name required to access Money.Net data, specified as a character vector or string scalar. The user name is an email address. To request your Money.Net user name, contact Money.Net.

Example: 'user@company.com'

Data Types: char | string

Port number of the Money.Net data server, specified as a numeric scalar.

Data Types: double

This property is read-only.

Money.Net server name, specified as a character vector.

Example: 'NTY_JAMES_IRWIN_88 TCP'

Data Types: char

Object Functions

expand all

closeClose Money.Net connection
isconnectionDetermine if Money.Net connection is valid
getdataRetrieve Money.Net current data
getsubscriptionsRetrieve Money.Net subscribed symbols and event handler functions
newsSearch and stream Money.Net latest news stories
optionchainRetrieve Money.Net option symbols
realtimeRetrieve Money.Net real-time data
stopUnsubscribe Money.Net real-time data updates
timeseriesRetrieve Money.Net intraday and historical data

Examples

collapse all

Create a Money.Net connection, and then retrieve current data for a symbol.

Connect to Money.Net using a user name and password. c is the Money.Net connection object.

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

c = moneynet(username,pwd)
c = 

  moneynet with properties:

    Username: 'user@company.com'
        Port: 50010
      Server: 'NTY_JAMES_IRWIN_88 TCP'

Verify the Money.Net connection c using the isconnection function. This function returns 1, indicating a successful connection.

v = isconnection(c)
v =

  logical

   1

Retrieve Money.Net current data d for the symbol IBM® by using the Money.Net connection c. Specify the Money.Net data fields f for ask and bid price.

symbol = 'IBM';
f = {'Ask','Bid'};

d = getdata(c,symbol,f);

Close the Money.Net connection.

close(c)

Create a Money.Net connection, and then retrieve news stories.

Connect to Money.Net using a user name, password, and port number. c is the Money.Net connection object.

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

c = moneynet(username,pwd,portnumber)
c = 

  moneynet with properties:

    Username: 'user@company.com'
        Port: 50010
      Server: 'NTY_JAMES_IRWIN_88 TCP'

Verify the Money.Net connection c using the isconnection function. This function returns 1, indicating a successful connection.

v = isconnection(c)
v =

  logical

   1

Retrieve news data n for 10 news stories by using the Money.Net connection c.

n = news(c,'Number',10);

Close the Money.Net connection.

close(c)

Introduced in R2016b