Description Usage Arguments Value Author(s) References See Also Examples
This function can be used to download all transactions occurring after a specified date from BitBay market through the public API.
1 | bitbay_trades_from_date(pair = "BTC/USD", date = Sys.time() - 60 * 60 * 24)
|
pair |
a character string with a pair. Available pairs: combinations of "BTC", "ETC", "LSK", "LTC", "GAME" "DASH" "BCC" and "PLN", "EUR", "USD", "BTC". They have to be separated by "/". |
date |
a character string or date-time object that can be converted to POSIXct date-time object. By default set to Sys.time() - 1 day. |
A data frame with following four columns:
Date
date of transaction in POSIXct format (GMT time zone)
Price
rate
Order
type of the order (sell/buy)
Volume
amount of cryptocurrency in that transaction
TID
unique transaction id
Michal Majka
BitBay: https://bitbay.net/en/home
BitBay Public API: https://bitbay.net/en/api-publiczne
bitbay_orderbook
, bitbay_ticker
,
bitbay_trades
, bitbay_profit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Not run:
# All transactions occurred within last '24 hours'
data_last24h <- bitbay_trades_from_date(pair = "BTC/EUR", date = Sys.time() - 60 * 60 * 24)
# 1 day = 60 seconds * 60 minutes * 24 hours
head(data_last24h)
tail(data_last24h)
# Additional attributes (pair and download time)
attributes(data_last24h)$pair
attributes(data_last24h)$download_time
# Transactions occurred after a specific date
date <- substring(as.character((Sys.time()) - 86400), 1, 10)
date
data_specific_day <- bitbay_trades_from_date(pair = "BTC/EUR", date = date)
head(data_specific_day)
tail(data_specific_day)
# Transactions occurred after even more specific date
date2 <- as.character((Sys.time()) - 86400)
date2
more_specific_date <- bitbay_trades_from_date(pair = "BTC/EUR", date = date2)
head(more_specific_date)
tail(more_specific_date)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.