View source: R/closest_market_price.R
closest_market_price | R Documentation |
Find the market price closest to a certain datetime and for specific assets.
closest_market_price( asset, datetime, market_prices, price_only = FALSE, exact = FALSE, substitute_datetime = FALSE )
asset |
Character vector of assets' names to look for. |
datetime |
POSIXct of the datetime at which looking for the asset's price. |
market_prices |
Data frame containing the market prices. |
price_only |
Logical. If TRUE then only the price is returned. |
exact |
Logical. If TRUE then it looks for market prices at the same datetime only, otherwise it looks for the nearest before the datetime. |
substitute_datetime |
Logical. If TRUE the datetime is substituted with the datetime argument. |
The data frame of closest market prices.
evaluate
,
lubridate::round_date
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.