Main Content

getdata

Retrieve Money.Net current data

Description

example

d = getdata(c,symbols) returns Money.Net data d using the Money.Net web socket interface connection c for the symbols.

example

d = getdata(c,symbols,f) returns Money.Net data for the specified Money.Net fields f.

Examples

collapse all

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

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

c = moneynetws(username,pwd);

Retrieve Money.Net current data d for the symbol IBM® using the Money.Net web socket interface connection c. The table d contains the variables for all Money.Net fields.

symbol = "IBM";
d = getdata(c,symbol);

Close the Money.Net web socket interface connection.

close(c)

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

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

c = moneynetws(username,pwd);

Retrieve Money.Net current data d for the symbol IBM 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. d is a table that contains the variables for high and low prices.

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

Close the Money.Net web socket interface connection.

close(c)

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

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

c = moneynetws(username,pwd);

Retrieve Money.Net current data d for the symbols list that contains IBM and Google® 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.

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

d is a table that contains the variables for high and low prices. The rows contains the Money.Net data values for each symbol in the symbol list.

Close the Money.Net web socket interface connection.

close(c)

Input Arguments

collapse all

Money.Net web socket interface connection, specified as a moneynetws object created using the moneynetws function.

Money.Net symbol list, specified as a character vector, cell array of character vectors, string scalar, or a string array. To specify one symbol, use a character vector or string scalar. To specify multiple symbols, use a cell array of character vectors or a string array.

Example: "IBM"

Example: ["IBM" "GOOG"]

Data Types: char | cell | string

Money.Net data field list, specified as a character vector, cell array of character vectors, string scalar, or a string array. To specify one field, use a character vector or string scalar. To specify multiple fields, use a cell array of character vectors or a string array.

Specify the field by using the field definition. For example, to specify the highest price for the equity during the current trading day, use the field definition "high". The software ignores the case of the definition.

Example: "high"

Example: ["high" "low"]

Data Types: char | cell | string

Output Arguments

collapse all

Money.Net data, returned as a table. Each row corresponds to the symbols list. Each variable corresponds to the field list f. The name of the rows in the table are the names of symbols.

Version History

Introduced in R2021b