Create Money.Net connectioncusing a user name and password.
username ='user@company.com'; pwd ='999999'; c = moneynet(username,pwd);
Retrieve Money.Net current datadfor the symbol IBM®using the Money.Net connectionc. Specify the Money.Net data fieldsffor ask and bid price.
symbol ='IBM'; f = {'Ask','Bid'}; d = getdata(c,symbol,f);
Display Money.Net current data.
d
d = Symbol Ask Bid ______ ______ ______ 'IBM' 145.00 143.85
dis a table that contains the columns for symbol, ask price, and bid price. The row contains the Money.Net data values for each column.
Close the Money.Net connection.
close(c)
Retrieve Current Data for Multiple Symbols
Create Money.Net connectioncusing a user name and password.
username ='user@company.com'; pwd ='999999'; c = moneynet(username,pwd);
Retrieve Money.Net current datadfor thesymbolslist that contains IBM, Google®, and Yahoo!®using the Money.Net connectionc. Specify the Money.Net data fieldsffor ask and bid price.
symbols = {'IBM','GOOG','YHOO'}; f = {'Ask','Bid'}; d = getdata(c,symbols,f);
Display Money.Net current data.
d
d = Symbol Ask Bid ______ ______ ______ 'IBM' 145.00 143.85 'GOOG' 700.50 700.05 'YHOO' 37.50 37.41
dis a table that contains the columns for symbol, ask price, and bid price. The rows contains the Money.Net data values for each symbol in the symbol list.
Money.Net connection, specified as a connection object created usingmoneynet.
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 single character or the field definition. For example, to specify the highest price for the equity during the current trading day, use a single character"H"or the corresponding field definition"High". When using the field definition, the software ignores the case of the definition. To view the list of valid Money.Net fields and field definitions, see theMoney.Net API Documentation.
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.