order_book
Get the resting depth of a Deribit instrument, one row per level.
Examples
from openbb import obb
# The resting depth of the BTC perpetual.
obb.deribit.market.order_book(symbol='BTC-PERPETUAL', provider='deribit')
# A book read by its numeric instrument identifier.
obb.deribit.market.order_book(instrument_id=210838, provider='deribit')
Parameters
- standard
- deribit
symbol: str | None | list[str | None]
One or more instrument names. A perpetual can also be given by its shortened root, such as 'SOLUSDC'. Multiple items allowed.
instrument_id: int | None
The numeric identifier of one instrument, used in place of its name.
depth: int | None
Default: 10
The number of levels to return on each side: 1, 5, 10, 20, 50, 100, 1000, or 10000.
Returns
results: DeribitOrderBook
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- deribit
symbol: str
The name of the instrument.
timestamp: datetime | None
When the book was published.
side: str
Whether the level is a bid or an ask.
level: int
How far the level sits from the top of the book.
price: float
The price of the level.
size: float
The size resting at the level.
mark_price: float | None
The price the exchange marks positions at.
index_price: float | None
The price of the index the instrument is priced against.
change_id: int | None
The revision of the book the level came from.