getdata
Description
Examples
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
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
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)