d = getdata(c,s,f,Name,Value)
specifies additional options using one or more name-value pair arguments. For
example, 'TradeDate',datetime('today') returns market data for
the current day.
[d,e] = getdata(___)
also returns the WDS error identifier using any of the input argument combinations
in the previous syntaxes. For troubleshooting, contact Wind Information Co.,
Ltd.
Using a WDS connection, retrieve current data for a single security for the day and display the data.
Create a WDS connection.
c = wind;
Format output data for currency.
format bank
For the 0001.HK security, retrieve the high and low prices for the day using the WDS connection. Use the name-value pair argument 'Cycle' to specify the period.
s = {'0001.HK'};
f = ["high","low"];
d = getdata(c,s,f,'Cycle','D')
d=1×2 table
99.50 98.00
d is a table with a row for the security. The variables in the table correspond to the specified fields.
WDS connection, specified as a connection object created with the wind function.
Securities, specified as a character vector, string scalar, cell array of character vectors,
or string array. For a single security, use a character vector or string scalar. For
multiple securities, use a cell array of character vectors or string array.
Example: '0001.HK'
Data Types: char | string | cell
Fields, specified as a character vector, string scalar, cell array of character vectors, or
string array. For a single field, use a character vector or string scalar. For multiple
fields, use a cell array of character vectors or string array.
For details about valid fields, contact Wind Information Co., Ltd.
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and encloseNamein quotes.
Example: getdata(c,s,f,'TradeDate',datetime('yesterday'))
retrieves current WDS market data for yesterday.
Trade date, specified as the comma-separated pair consisting of
'TradeDate' and a datetime
scalar, numeric scalar, character vector, or string scalar.
If you do not specify a date, the getdata
function sets the trade date to the current day.
Example: 731878
Example: datetime('yesterday')
Data Types: datetime | double | char | string
Price adjustment, specified as the comma-separated pair consisting of
'PriceAdj' and one of these values.
Value
Description
'N'
No
'F'
Forward
'B'
Backward
'T'
As per selected ex-rights time
For details about these values, contact Wind Information Co.,
Ltd.
Cycle, specified as the comma-separated pair consisting of
'Cycle' and one of these values.
Value
Description
'D'
Daily
'W'
Weekly
'M'
Monthly
'Q'
Quarterly
'S'
Semi-annually
'Y'
Annually
For details about these values, contact Wind Information Co.,
Ltd.
Current WDS market data, returned as a table. The rows in the table
correspond to the securities specified in the s input
argument. The variables in the table correspond to the fields specified in
the f input argument.
WDS error identifier, returned as a numeric scalar. The value 0 indicates a
successful execution of the getdata function. Otherwise, for
details about the error, contact Wind Information Co., Ltd.
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.