TWAZI

Quote Slippage

Calculates potential slippage for trading operations based on order size and market depth.

Inputs

  • Quote required: Current price quote data
  • Order Size required: Size of the intended order
  • Market Depth: Order book depth data
  • Direction: Trade direction ("buy" or "sell", default: "buy")

Example

{
  "Quote": {
    "price": 45000,
    "timestamp": 1687021200000
  },
  "Order Size": 1.5,
  "Market Depth": {
    "bids": [
      [44990, 2.5],
      [44980, 3.0]
    ],
    "asks": [
      [45010, 1.8],
      [45020, 2.2]
    ]
  },
  "Direction": "buy"
}

Outputs

  • Expected Slippage: Calculated slippage percentage
  • Execution Price: Expected execution price after slippage
  • Impact Analysis: Detailed market impact analysis
Quote slippage workflow example

On this page

Edit on GitHub