Description Usage Arguments Value See Also Examples
Route a request to particular market function according to dictionary query.dict
.
1 2 3 4 5 | market.api.query(market, url, ..., antiddos = getOption("Rbitcoin.antiddos",
TRUE), query.dict = getOption("Rbitcoin.query.dict",
stop("query.dict is mandatory for redirection to market query function")),
json.debug = getOption("Rbitcoin.json.debug", FALSE),
verbose = getOption("Rbitcoin.verbose", 0))
|
market |
character which identifies market on which we want to send request, e.g. kraken. |
url |
character url on which launch api call. |
antiddos |
logical default |
query.dict |
data.table default built-in dictionary with market query functions, read |
json.debug |
logical default |
verbose |
integer. Rbitcoin processing messages, print to console if |
... |
objects to be passed to api: |
R object created by fromJSON
decoded response from markets API call.
market.api.process
, antiddos
, query.dict
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ## Not run:
# ticker
market.api.query(market = 'bitstamp',
url = 'https://www.bitstamp.net/api/ticker/')
market.api.query(market = 'btce',
url = 'https://btc-e.com/api/3/ticker/ltc_usd')
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/public/Ticker?pair=XXBTZEUR')
market.api.query(market = 'bitmarket',
url = 'https://www.bitmarket.pl/json/LTCPLN/ticker.json')
market.api.query(market = 'hitbtc',
url = 'https://api.hitbtc.com/api/1/public/BTCUSD/ticker')
market.api.query(market = 'btcchina',
url = 'https://data.btcchina.com/data/ticker?market=btccny')
# wallet
market.api.query(market = 'bitstamp',
url = 'https://www.bitstamp.net/api/balance/',
client_id = '', # bitstamp specific
key = '', secret = '')
market.api.query(market = 'btce',
url = 'https://btc-e.com/tapi',
req = list(method = 'getInfo'),
key = '', secret = '')
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/private/Balance',
key = '', secret = '')
market.api.query(market = 'bitmarket',
url = 'https://www.bitmarket.pl/api2/',
req = list(method = 'info'),
key = '', secret = '')
market.api.query(market = 'hitbtc',
url = "https://api.hitbtc.com/api/1/trading/balance",
key = '', secret = '')
market.api.query(url = 'https://api.btcc.com/api_trade_v1.php',
req = list(method = 'getAccountInfo'),
key = '', secret = '')
# order book
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/public/Depth?pair=XXBTZEUR')
# open orders
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/private/OpenOrders',
key = '', secret = '')
# place order
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/private/AddOrder',
key = '', secret = '',
req = list(pair = 'XXBTZEUR',
type = 'sell',
ordertype = 'limit',
price = 1200, # 1200 eur
volume = 0.1)) # 0.1 btc
# cancel order
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/private/CancelOrder',
key = '', secret = '',
req = list(txid = 'id_from_open_orders'))
# trades
market.api.query(market = 'kraken',
url = 'https://api.kraken.com/0/public/Trades?pair=XXBTZEUR')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.