getdata
Description
Examples
Retrieve Money.Net Current Data
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)
Retrieve Current Data for One Symbol
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)
Retrieve Current Data for Multiple Symbols
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
c
— Money.Net web socket interface connection
moneynetws
object
Money.Net web socket interface connection, specified as a moneynetws
object created using the moneynetws
function.
symbols
— Money.Net symbol list
character vector | cell array of character vectors | string scalar | string array
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
f
— Money.Net data field list
character vector | cell array of character vectors | string scalar | string array
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
Version History
Introduced in R2021b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)