Description Usage Arguments Value References See Also Examples
View source: R/get_orderbook_calculator.R
Get a live quote from the order book for a given buy and sell amount. The route is orderbook/calculator and returns two data.frames containing buy and sell projections. See https://docs.cryptowat.ch/rest-api/markets/order-book for further information.
1 2 | get_orderbook_calculator(pair, amount = NULL, exchange = "kraken",
api_key = NULL, allowance = FALSE)
|
pair |
A string containing a pair symbol, e.g. btcusd (required argument). Run |
amount |
A number: Amount to buy or sell (required). |
exchange |
A character string containing the exchange. Default is kraken. Run |
api_key |
A character string containing the API key. See https://docs.cryptowat.ch/rest-api/rate-limit to learn how to create an account and how to generate an API key. |
allowance |
A logical (default is |
A list containing projections for the buy and sell side for a given amount. Reach indicates the farthest your reach would fill. Avg indicates the volume-weighted average. If allowance is TRUE
, get_orderbook_calculator()
returns a list which additionally includes allowance information.
See https://docs.cryptowat.ch/rest-api for further information.
get_markets
, get_orderbook
, get_orderbook_liquidity
, get_exchanges
, get_pairs
1 2 3 4 5 | ## Not run:
# Live quote for 50 Bitcoins
calculator <- get_orderbook_calculator("btcusd", amount = 50)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.