Main Content

moneynetws

Create Money.Net web socket interface connection

Description

The moneynetws function creates a moneynetws object. The moneynetws object represents a Money.Net web socket interface connection.

After you create a moneynetws 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 = moneynetws(username,password) creates a Money.Net web socket interface connection, sets the Username property, and uses a password.

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 string scalar. The user name is an email address. To request your Money.Net user name, contact Money.Net.

You can specify the user name as a string scalar or character vector in the moneynetws function.

Example: "user@company.com"

Data Types: string

Object Functions

expand all

closeClose Money.Net connection
isconnectionDetermine if Money.Net web socket interface 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 web socket interface connection, and then retrieve current data for a symbol.

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

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

c = moneynetws(username,pwd)
c = 

  moneynetws with properties:

    Username: "user@company.com"

Verify the Money.Net web socket interface 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 web socket interface connection c. Specify the Money.Net data fields f for the highest and lowest prices of the current trading day.

symbol = "IBM";
f = ["high" "low"];
d = getdata(c,symbol,f);

Close the Money.Net web socket interface connection.

close(c)

Version History

Introduced in R2021b