Create Money.Net web socket interface connection
moneynetws function creates a
moneynetws object represents a Money.Net web socket interface
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.
Username — User name
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
Money.Net Data Retrieval
|Retrieve Money.Net current data|
|Retrieve Money.Net subscribed symbols and event handler functions|
|Search and stream Money.Net latest news stories|
|Retrieve Money.Net option symbols|
|Retrieve Money.Net real-time data|
|Unsubscribe Money.Net real-time data updates|
|Retrieve Money.Net intraday and historical data|
Connect to Money.Net
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
c is the Money.Net web socket interface connection
username = "email@example.com"; pwd = "999999"; c = moneynetws(username,pwd)
c = moneynetws with properties: Username: "firstname.lastname@example.org"
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.
Introduced in R2021b