Skip to content

Pure Market Making Mode

In pure market making mode, the bot runs a continuous ping-pong cycle on one or both sides of the market, using a single entry and a corresponding take-profit.

Available Modes

  • market_making_long: only long-side ping-pong (buy then sell)
  • market_making_short: only short-side ping-pong (sell then buy)
  • market_making_both: simultaneous ping-pong on both sides

How It Works

  1. Place Entry Order

    • Long entry at:
      entry_price = mid_price * (1 - first_entry_offset)
    • Short entry at:
      entry_price = mid_price * (1 + first_entry_offset)
  2. Place Take-Profit Order
    As soon as the entry fills, post a TP on the opposite side:
    tp_price = entry_price * (1 ± tp_distance)
    – use + for longs, - for shorts

  3. Repeat Cycle
    When the TP fills, flip back into the entry order and continue indefinitely.

Key Configuration Parameters

Parameter Description
mode One of market_making_long, market_making_short, or market_making_both.
first_entry_offset Decimal fraction from mid-price for entry (e.g. 0.001 = 0.1%).
tp_distance Decimal fraction beyond entry for take-profit (e.g. 0.0055 = 0.55%).
order_qty Size of each ping or pong order.
chase_offset_bps Basis points to chase the entry if it doesn’t fill immediately (e.g. 0.5 = 0.05%).

Note: All grid-related settings (e.g. grid_levels, level_step, dynamic_distribution, always_full_grid, continued_grid_mode) are completely ignored in pure market making mode.

When to Use

Use pure-market-making-mode for tight, single-level ping-pong strategies where you want exactly one entry and one take-profit per cycle, rather than a multi-level grid.