Skip to content

Market Making

QuantFin Bot implements a market-making strategy by placing grid-based limit orders around the current market price. This provides liquidity and captures profits from price movements. You can configure this feature using the frontend.

How It Works

  1. Grid Placement: The bot places buy and sell limit orders at specified price levels, creating a grid around the market price.
  2. Order Management: Orders are adjusted dynamically based on market conditions and position changes.
  3. Take-Profit: When a position is opened, a take-profit order is placed at a specified distance from the entry price.
  4. No-Position Timeout: If no position is held for a set time, the grid is recentered.

Configuring Market Making

You can adjust market-making settings in the Update Config panel: 1. Visit the Frontend: Open quantfin.dexalgo.org and connect your wallet. 2. Select a Symbol: In the Trading Symbols panel, click a symbol card (e.g., SUI-PERP). 3. Open Update Config: Scroll to the Update Config panel.

Key Settings

  • Grid Settings Tab:
  • Grid Levels: Number of buy/sell levels (e.g., 8).
  • Level Step: Percentage distance between levels (e.g., 0.01 = 1%).
  • General Tab:
  • Order Quantity: Quantity per grid order (e.g., 1).
  • TP Distance: Take-profit distance as a percentage (e.g., 0.0055 = 0.55%).
  • Mode: Choose both, longonly, or shortonly to control buy/sell orders.
  • Intervals Tab:
  • No Position Timeout (seconds): Time before recentering the grid if no position (e.g., 140).

  • Apply Changes: After adjusting settings, click Update Config to save. If the bot is running, stop it (sidebar > Stop Bot), apply changes, and restart (sidebar > Start Bot).

Example

For a symbol with a mid-price of $1.00, using the Moderate preset: - Grid Levels: 8 - Level Step: 0.008 (0.8%) - Buy orders at $0.992, $0.984, ..., down to $0.936. - Sell orders at $1.008, $1.016, ..., up to $1.064. - If a buy order fills at $0.992, a take-profit sell order is placed at $0.99745 (0.55% above entry).

Monitoring Market Making

  • Bot Status Panel: Check the Running badge to ensure the bot is active.
  • Console Logs Panel: View logs for order placements (e.g., INFO: Placed buy order at 0.992).
  • Strategy Simulator: In the sidebar, click Strategy Simulator to visualize your grid and simulate trades.

Next Steps