get_orderbook_liquidity: Get liquidity sums in the order book of cryptocurrencies

Description Usage Arguments Value References See Also Examples

View source: R/get_orderbook_liquidity.R

Description

Get liquidity sums in the order book of cryptocurrencies using the REST API of cryptowat.ch. The route is orderbook/liquidity. See https://docs.cryptowat.ch/rest-api/markets/order-book for further information.

Usage

1
get_orderbook_liquidity(pair, exchange = "kraken", api_key = NULL, allowance = FALSE)

Arguments

pair

A character string containing a pair symbol, e.g. btcusd (required argument). Run get_pairs() to find other available pairs.

exchange

A character string containing the exchange. Default is kraken. Run get_exchanges() to find other available exchanges.

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 FALSE). If TRUE the function returns a list which includes allowance information, i.e. cost of the request, remaining credits and your account name.

Value

A list containing liquidity sums at several basis point levels in the order book. If allowance is TRUE, get_orderbook() returns a list which additionally includes allowance information.

References

See https://docs.cryptowat.ch/rest-api for further information.

See Also

get_markets, get_orderbook, get_exchanges, get_pairs

Examples

1
2
3
4
5
## Not run: 
# Get liquidity sums in the order book of Bitcoin in USD
liquidity <- get_orderbook_liquidity("btcusd")

## End(Not run)

cryptowatchR documentation built on June 10, 2021, 1:05 a.m.