order_book
Order Book Response
This file contains the Order Book Response.
Classes:
OrderBookItem
: ATypedDict
that represents the structure of the order book item.OrderBookResponse
: ATypedDict
that represents the structure of the order book response.
OrderBookItem
Bases: TypedDict
Order Book Item.
Attributes:
Name | Type | Description |
---|---|---|
market_id |
int
|
Market ID. |
each_price |
str
|
Each price. |
available_amount |
str
|
Available amount. |
Examples:
>>> OrderBookItem(
... market_id=1, each_price="each_price", available_amount="available_amount"
... )
{
'market_id': 1,
'each_price': 'each_price',
'available_amount': 'available_amount'
}
Source code in src/bit24/types/responses/order_book.py
OrderBookResponse
Bases: TypedDict
Order Book Response.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
ID. |
market_symbol |
str
|
Market symbol. |
buy_orders |
list[OrderBookItem]
|
Buy orders. |
sell_orders |
list[OrderBookItem]
|
Sell orders. |
Examples:
>>> OrderBookResponse(
... id=1,
... market_symbol="market_symbol",
... buy_orders=[
... OrderBookItem(
... market_id=1,
... each_price="each_price",
... available_amount="available_amount",
... )
... ],
... sell_orders=[
... OrderBookItem(
... market_id=1,
... each_price="each_price",
... available_amount="available_amount",
... )
... ],
... )
{
'id': 1,
'market_symbol': 'market_symbol',
'buy_orders': [
{
'market_id': 1,
'each_price': 'each_price',
'available_amount': 'available_amount'
}
],
'sell_orders': [
{
'market_id': 1,
'each_price': 'each_price',
'available_amount': 'available_amount'
}
]
}