Description Usage Arguments Value Author(s) References See Also Examples
This function can be used to download last N or all historic transactions from BitBay market through the public API.
1 | bitbay_trades(pair = "BTC/EUR", last_trades = 50)
|
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 "/". |
last_trades |
a positive integer N or a character string "all". If an integer is specified then the last N transactions are going to be downloaded. If "all" then all historic transactions are going to be downloaded. |
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_from_date
, 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 | ## Not run:
# Download last 50 trades
last_50_trades <- bitbay_trades()
head(last_50_trades)
tail(last_50_trades)
# Additional attributes (pair and download time)
attributes(last_50_trades)$pair
attributes(last_50_trades)$download_time
trades_LSK_EUR <- bitbay_trades(pair = "LSK/EUR", last_trades = 100)
head(trades_LSK_EUR)
tail(trades_LSK_EUR)
attributes(trades_LSK_EUR)[c("pair", "download_time")]
all_trades <- bitbay_trades(pair = "BTC/USD", last_trades = "all")
head(all_trades)
tail(all_trades)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.