ExKucoin v0.0.1 ExKucoin.Market.OrderBook View Source
Retrieves order books API Docs
Link to this section Summary
Functions
Retrieve Level 2 order book data
Link to this section Types
Link to this type
depth()
View Source
depth()
View Source
depth() :: 20 | 100 | nil
depth() :: 20 | 100 | nil
Link to this type
pair()
View Source
pair()
View Source
pair() :: String.t()
pair() :: String.t()
Link to this section Functions
Link to this function
level2(pair, depth \\ 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"]]
}