available_wallet: Available wallet

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
8
## 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)

Rbitcoin documentation built on May 2, 2019, 3:41 p.m.