ExKucoin.Market.OrderBook (ExKucoin v0.0.5) View Source

Retrieves order books API Docs

Link to this section Summary

Functions

Retrieve Level 2 order book data

Link to this section Types

Specs

depth() :: 20 | 100 | nil

Specs

pair() :: String.t()

Link to this section Functions

Link to this function

level2(pair, depth \\ nil, config \\ nil)

View Source

Retrieve Level 2 order book data

Aggregation support is only for 20 and 100

Examples

Full Order Book

iex> ExKucoin.Market.OrderBook.level2("BTC-USDT") %{

"sequence" => "3262786978",
"time" => 1_550_653_727_731,
"bids" => [["6500.12", "0.45054140"], ["6500.11", "0.45054140"]],
"asks" => [["6500.16", "0.57753524"], ["6500.15", "0.57753524"]]

}

Aggregated Order Book (20)

iex> ExKucoin.Market.OrderBook.level2("BTC-USDT", 20) %{

"sequence" => "3262786978",
"time" => 1_550_653_727_731,
"bids" => [["6500.12", "0.45054140"], ["6500.11", "0.45054140"]],
"asks" => [["6500.16", "0.57753524"], ["6500.15", "0.57753524"]]

}

Aggregated Order Book (100)

iex> ExKucoin.Market.OrderBook.level2("BTC-USDT", 100) %{

"sequence" => "3262786978",
"time" => 1_550_653_727_731,
"bids" => [["6500.12", "0.45054140"], ["6500.11", "0.45054140"]],
"asks" => [["6500.16", "0.57753524"], ["6500.15", "0.57753524"]]

}