Learn R Programming

Rbitcoin (version 0.9.2)

available_wallet: Available wallet

Description

Calculates assets available to trade, not on hold by current open orders.

Usage

available_wallet(wallet, open_orders, verbose = getOption("Rbitcoin.verbose", 0))

Arguments

wallet
data.table object returned by market.api.process with action="wallet" param.
open_orders
data.table object returned by market.api.process with action="open_orders" param.
verbose
integer. Rbitcoin processing messages, print to console if verbose > 0, each subfunction reduce verbose by 1. If missing then getOption("Rbitcoin.verbose",0) is used, by default 0.

Value

data.table object, the same as wallet but with the appropriate amounts after subtracting the open orders amounts.

See Also

market.api.process

Examples

Run this code
## Not run: 
# wallet <- market.api.process('kraken',c('BTC','EUR'),'wallet', key = '', secret = '')
# Sys.sleep(10)
# open_orders <- market.api.process('kraken',c('BTC','EUR'),'open_orders', key = '', secret = '')
# aw <- available_wallet(wallet, open_orders, verbose = 1)
# print(aw)
# ## End(Not run)

Run the code above in your browser using DataLab