Orderbook

An order book is a comprehensive record maintained by a trading platform, documenting the buy and sell orders that reflect the interests of market participants.

orderbook(symbol: Optional[str], exchange: Optional[str|int]) -> [Orderbook]

Returns orderbook in Orderbook structure.

Parameters:

symbol : str, default 'base-counter'

Use token symbols in the 'symbol-symbol' format. Example: 'ETH-USDT','base-USDT',’ETH-counter. If symbol is empty - uses current symbol for bot. Shortcuts base and counter could be used.

If symbol is empty - uses current symbol for bot. (ex.: 'ETH-USDT', base-USDT,’ETH-counter)

If exchange is empty - uses current exchange for bot’s account

symbol must be specified for usage in update_balance_formula inside group

exchange must be specified for usage in update_balance_formula inside group

Example:

orderbook().bid[0].price → 0.65…

orderbook('base-counter').bid[0].price → 0.65…

orderbook().bid[0].amount → 300.51

orderbook(’base-counter’,'mexc').bid[0].amount → 300.51

orderbook(’ETH-USDT’).bid[0].amount → 3000

orderbook('BTC-ETH', exchange='gateio').bid[0].amount → 300.51

orderbook(exchange=8).ask[0].amount → 300.51

orderbook(exchange='mexc').ask[0].amount → 100.23

Last updated