Main Content

timeseries

Retrieve Money.Net intraday and historical data

Since R2021b

Description

example

d = timeseries(c,s,date,interval) returns Money.Net intraday and historical data using the Money.Net web socket interface connection c for all available fields. Specify the Money.Net symbol s and the current or historical date. To specify the amount of data to return, use the bar interval.

example

d = timeseries(c,s,date,interval,f) returns Money.Net intraday and historical 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 intraday data for yesterday in 5-minute bars for the symbol Google® using the Money.Net web socket interface connection c. Specify the date as 1 hour ago using datetime. To retrieve data in 5-minute bars, specify the interval as "5M".

s = "GOOG";
date = [datetime("now")-hours(1) datetime("now")];
interval = "5M";
d = timeseries(c,s,date,interval);

d is a table that contains these variables:

  • Date timestamp

  • High price

  • Close price

  • Low price

  • Open price

  • Trading volume

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 historical data in daily bars for the symbol IBM® using the Money.Net web socket interface connection c. Specify the date range from June 1, 2015, through June 5, 2015, using datetime. To retrieve daily data, specify the interval as "1D". Retrieve only the high and low price fields f from Money.Net.

s = "IBM";
date = [datetime("1-Jun-2015") datetime("5-Jun-2015")];
interval = "1D";
f = ["high" "low"];
d = timeseries(c,s,date,interval,f);

d is a table that contains these variables:

  • Date timestamp

  • High price

  • Low price

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, specified as a character vector, cell array of a character vector, or string scalar to denote one symbol.

Example: "IBM"

Data Types: char | cell | string

Date, specified as a datetime array, character vector, cell array of character vectors, double, string scalar, or string array. If date contains one date, this date is the start date. The software determines the end date to be the last second of the same day. If date contains two dates, the first date is the start date and the second date is the end date.

Example: datetime("yesterday")

Data Types: datetime | char | cell | double | string

Interval between bars, specified as a character vector or string scalar. Specify the interval as a number followed by one of these letters: S, M, or D. These letters indicate seconds, minutes, and days, respectively. For example, 30M is 30-minute bars and 1D is daily end-of-day data.

Data Types: char | 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 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.

Example: "high"

Example: ["high" "low"]

Data Types: char | cell | string

Output Arguments

collapse all

Money.Net data, returned as a timetable. Each row in the table represents data at different times. The first variable bar is the timestamp. The remaining variables contain one variable of data for each Money.Net field f.

To return data for all available historical fields, use this syntax:

d = timeseries(c,s,date,interval);

Money.Net returns data only for business days with trading activity.

Version History

Introduced in R2021b