ReturnOrderBook-PoloniexPublicAPI-method: Returns the order book for a given market, as well as a...

Description Usage Arguments Value Examples

Description

Returns the order book for a given market, as well as a sequence number for use with the Push API and an indicator specifying whether the market is frozen.

Usage

1
2
3
## S4 method for signature 'PoloniexPublicAPI'
ReturnOrderBook(theObject, pair = "all",
  depth = 10)

Arguments

theObject

The public client API object on which the function should be called.

pair

length one-character vector - The currencypair for which orderbook information should be fetched. You may set pair to "all" to fetch the order books of all markets.

depth

numeric - depth of the orderbook.

Value

A list containing orderbook information.

if pair == "all": a list containing orderbook information for all available markets. Each list entry contains information for one specific market. if !pair == "all": a list containing orderbook information for the requested markets.

Each market list contains following fields: - ask: Orderbook sell side, Dataframe containing ask prices and corresponding amounts. - bid: Orderbook buy side. Dataframe containing bid prices and corresponding amounts. - frozen: indicator specifying wheather market is frozen or not. - seq: Sequence number for Push API.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
poloniex.public <- PoloniexPublicAPI()

pair <- "BTC_NXT"
depth <- 2
order.book <- ReturnOrderBook(poloniex.public,
                              pair  = pair,
                              depth = depth)
order.book$bid
order.book$ask
order.book$frozen
order.book$seq

pair <- "all"
depth <- 2
order.book <- ReturnOrderBook(poloniex.public,
                              pair  = pair,
                              depth = depth)

names(order.book)
order.book$BTC_ETH$ask

PoloniexR documentation built on July 11, 2017, 1:02 a.m.