bitbay_trades: Download transactions from the BitBay crypto-currency exhange

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function can be used to download last N or all historic transactions from BitBay market through the public API.

Usage

1
bitbay_trades(pair = "BTC/EUR", last_trades = 50)

Arguments

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.

Value

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

Author(s)

Michal Majka

References

BitBay: https://bitbay.net/en/home

BitBay Public API: https://bitbay.net/en/api-publiczne

See Also

bitbay_orderbook, bitbay_ticker, bitbay_trades_from_date, bitbay_profit

Examples

 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)

majkamichal/BitBayR documentation built on May 29, 2019, 3:43 a.m.