get_orderbook_liquidity: Get liquidity sums in the order book of cryptocurrencies

View source: R/get_orderbook_liquidity.R

get_orderbook_liquidityR Documentation

Get liquidity sums in the order book of cryptocurrencies

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

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

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

## End(Not run)


lorenzbr/cryptowatchR documentation built on April 15, 2022, 4:41 a.m.