matriksData: matriksData

Description Usage Arguments Details Value Note See Also Examples

Description

Fetches various price data from Matriks Historical Data Service

Usage

1
2
3
matriksData(ticker, dataType = c("trade", "bestbidoffer", "depth",
  "openinterest", "bar"), startDate, endDate = Sys.Date(), period = NULL,
  isLocal = NULL)

Arguments

ticker

A character variable for ticker symbol.

dataType

A character type variable. One of the followings: "trade","bestbidoffer","depth", "openinterest", or "bar".

startDate

A character object as "YYYY-MM-DD"

endDate

A character object as "YYYY-MM-DD"

period

A character variable. Valid only when datatype arguement is set to "bar", otherwise ignored. One of the following character variables: "1min","5min","1hour" , or "1day".

Details

A matriksData object is a data frame that contains trade, bestbidoffer, depth, openinterest and bar.

If dataType is trade, data frame contains seven column: timestamp, symbol, bid_or_ask, trade_no, price, quantity and signal_time. timestamp column includes transaction time.bid_or_ask column delineates whether the trade occured on the b(id) or on the a(sk) side. signal_time shows the number of seconds elapsed since 01/01/1970.

By setting dataType to bestbidoffer one has the following columns: six columns:timestamp,symbol,best_bid_price,best_bid_size,best_ask_price,best_ask_size.

If dataType is set to openinterest, total amount of nominal positions on options or futures are returned.

If dataType is set to bar, the function fetches aggregated prices (open, high, close, low) and total volume information for the chosen period level of aggregation.

Value

A data.frame object is is returned. See details above.

Note

Although, as of now, Matriks Data Services can provide with historical data since the year 2013, the data coverage is more likely to expand in time.

See Also

trade, bestbidoffer, depth, openinterest, bar

Examples

1
2
3
4
##NOT RUN
# matriksData("GARAN","bar","2016-01-22","2016-01-23","1hour")
# matriksData("GARAN","trade","2016-01-22","2016-01-23")
##NOT RUN

martingale/Rmatriksdata documentation built on May 21, 2019, 12:38 p.m.