Origami Documentation
User GuideFunction
  • User Guide
    • Create Project
    • Add accounts
    • API Key Creation
      • Hyperliquid
      • Binance
      • Bybit
      • OKX
      • Gate io
      • Mexc
      • HTX
      • Kucoin
      • BingX
      • Bitget
      • BitMart
    • Create Spot Bot
    • Create Futures Bot
    • Create Grid
  • Function
    • Required parameters
      • Buy Orders Count
      • Sell Orders Count
      • Execute Price
      • Execute Volume
    • Base logic
    • Optional parameters
      • Time Between Orders
      • Sleep After Seconds
      • Is Buy First
    • Functions
      • Ticker
      • Orderbook
      • Candles
      • VWAP
      • Amount Before Price
      • Amount Threshold Index
      • Symbol
      • Balance
      • Saved Balance
      • Group Balance
      • Mean
      • Median
      • Max
      • Min
      • Exp
      • Abs
      • Logn
      • Count
      • Random
      • Sum
      • Cached
      • Remove NaN
      • Is NaN
      • Var
    • Technical analysis
      • Relative Strenght Index
      • RSI to price
      • Average True Range
      • Bollinger Bands
      • Donchian Channel
      • Exponential Moving Average
      • Kaufman Efficiency Indicator
      • Kaufman's Adaptive Moving Average
      • Keltner Channels
      • Momentum Breakout Bands
      • Pivot Points
      • Percentage Price Oscillator
      • Percent B
      • Stop-and-Reverse
      • Stochastic Oscillator %K
      • Stochastic RSI
      • True Range
      • Triple Exponential Moving Average Oscillator
      • Volume Adjusted Moving Average
    • Structures
      • Balance
      • GroupBalance
      • Orderbook
      • OrderBookUnit
      • Symbol
      • Candle
    • Shortcuts
      • Base
      • Counter
    • Exchanges list
    • Pre-defined parameters
      • Order Pos
      • Side
Powered by GitBook
On this page
  1. Function
  2. Functions

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.

PreviousTickerNextCandles

Last updated 5 months ago

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

Returns orderbook in structure.

Parameters:

symbol : str, default 'base-counter'

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

exchange : int|str, default bot's exchange

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

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('-').bid[0].price → 0.65…

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

orderbook(’-’,'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

Orderbook
Orderbook
base
counter
base
counter
base
counter
base
counter
base
counter