Market Maker Bot

Inventory-aware bid/ask quoting

Market Maker is a continuous quoting bot. Instead of creating a fixed grid range, it keeps one or more post-only buy orders and sell orders around the current market price. When one side fills, the bot updates inventory, protects the opposite exit side, and places the next quotes according to spread, cap and risk rules.

What the bot is trying to do

The goal is to earn the spread between buys and sells while keeping inventory under control. Example: if BTC trades near $100,000 and the configured distance is 34 bps, the bot may quote buys slightly below the market and sells slightly above it. If a buy fills, the bot now holds long inventory and prioritizes selling that inventory at a profitable/reducing price while still deciding whether it can safely place more buys.

Market Maker is not passive yield

It can lose money in strong trends, thin liquidity, toxic flow, liquidation events, exchange outages or API delays. Start small, use low leverage, and choose liquid markets. A wider spread is safer but fills less often; a tighter spread fills more often but may not cover fees and adverse selection.

The basic math

The bot tries to make each closed cycle exit better than its entry after fees. For a buy that later sells:

Simple formula

Gross profit ≈ (sell_price - buy_price) × base_amount
Fee cost ≈ buy_notional × maker_fee + sell_notional × maker_fee
Estimated net profit ≈ gross_profit - fees

Illustrative example, not an exchange tariff: buy 100 LIT at 1.5000 and sell 100 LIT at 1.5030. Gross profit is (1.5030 - 1.5000) × 100 = 0.30 USDC. Assuming a combined exchange + MyLiquidBot maker fee of 0.02% per side, fees are approximately 150.00 × 0.0002 + 150.30 × 0.0002 ≈ 0.0601 USDC. Net profit is approximately 0.30 - 0.0601 = 0.2399 USDC, before funding and other costs. Replace the assumed rate with your actual total fee.

This is why the configured spread is not clean profit. It must cover entry maker fee, exit maker fee, partial fills, possible slippage if you close at market and fast price movement between entry and exit.

High-level behavior

1

Reads the market and your live inventory

Each cycle reads the current market snapshot, open bot orders and the position recorded for this bot. If venue orders and local records do not match, the bot can pause placement until reconciliation protects the account.

2

Quotes both sides when flat

When inventory is near zero, it can place both bid orders (buys below/near market) and ask orders (sells above/near market). These are normally post-only limit orders so the bot tries to be maker, not taker.

3

Skews when inventory appears

If the bot becomes long, asks become the reducing side and bids become the risk-increasing side. If the bot becomes short, bids become the reducing side and asks become the risk-increasing side. The bot makes the reducing side easier and makes the risk-increasing side smaller, farther away, delayed or blocked depending on cap usage.

4

Protects exits and recovery lots

Reducing orders are intended to close inventory at a profit floor or tranche profit target. The engine tracks fills and recovery lots so a filled entry can be paired with an appropriate reduce-only exit instead of treating every trade as a new independent bot.

5

Refreshes stale quotes

If market price moves, existing quotes can become too far away, too close, below exchange minimums or stale. The bot cancels and replaces them when the configured refresh and replace rules allow it.

Step-by-step: creating a Market Maker

1

Select exchange, name and pair

Choose a saved connection on a supported exchange, give the bot a clear name and select a liquid market. Avoid illiquid pairs for your first Market Maker.

2

Set low leverage

Market Maker can build inventory on either side. Start at 1× or 2×. Higher leverage increases liquidation risk when the market trends against accumulated inventory.

3

Choose a risk profile

Conservative is slower and uses smaller caps. Balanced is the normal default. Aggressive quotes faster and allows larger exposure, but should only be used when you understand the inventory risk.

4

Set order size and caps in USDC

Order size per buy/sell is the approximate notional of each individual order. It is not total investment. Max bot position value, Max short position and Max long position are exposure limits, also in USDC.

5

Set distance and refresh

Use Buy/Sell distance and Minimum allowed distance to control how far quotes sit from the market. Use Refresh period to control how often the bot is allowed to check and rearm quotes.

6

Review the preview and start small

The preview shows estimated bid/ask prices, per-order value and position guard. Confirm every order is above exchange minimum notional. Create the bot only after the preview makes sense.

Configuration reference

FieldWhat it meansPractical effect
Order size per buy/sell (USDC)Approximate notional for each individual quote.Bigger size earns/loses more per fill and reaches caps faster.
Max bot position value (USDC)Fallback max exposure if separate long/short caps are blank.The bot becomes defensive as usage approaches this cap.
Max short position / Max long position (USDC)Separate short-side and long-side exposure budgets.Useful when you want different risk limits for pumps vs dumps.
Buy/Sell distanceTarget total spread in bps. 34 bps = 0.34%.Wider = fewer fills but more room for fees/slippage. Tighter = more fills and more risk.
Minimum allowed distanceSmallest spread the bot may accept after automatic adjustments.Prevents quotes from becoming too tight to cover fees.
Refresh periodHow often the engine is allowed to refresh the bot.Shorter reacts faster; longer is calmer and reduces churn.
Risk profilePreset for spread, caps, refresh speed, quote levels and inventory behavior.Conservative protects first; Aggressive quotes more actively.
Reference priceMarket price used to estimate caps and preview orders at creation.Auto/live is preferred; manual is a fallback if market data is unavailable.
Cap stop modeWhat to do when inventory exceeds the configured stop zone.Default is usually to pause new entries; stronger modes can reduce or close exposure.

Position limits and blocked entries

The dollar limit is converted to a coin amount using the reference price when configuring the bot; that amount does not automatically grow when price falls. Review the displayed coin limit, including separate long/short limits. Reaching the maximum can block new entries without cancelling exits or closing the position. If the coin limit does not match your intended allocation, review the available Edit fields and contact support; do not increase risk or cancel exits to force activity.

Breakeven, average price and extra entries

The bot tracks venue average and effective breakeven for diagnostics and exits. Current Market Maker behavior can allow risk-increasing buys or sells even when that quote does not improve the average/breakeven, as long as structural protections still allow it. That means a long-side buy may still be placed even if it is not a better average, and a short-side sell may also be placed symmetrically.

What still protects the account

Ignoring breakeven for a risk-increasing quote does not disable risk controls. Exposure limits, safety stops, cooldowns, exchange minimums, quote freshness checks and exchange reconciliation can still block, shrink or cancel orders.

Why the DEX can show a negative close even when bot trades were positive

A Market Maker can show many positive closed cycles while the account or final close is negative. The usual reason is unrealized inventory: the bot may earn small spread profits, but also accumulate a long or short position that moves against it.

ConceptWhat it measuresExample
Positive closed cycleOne paired entry and exit.Buy 1.5000, sell 1.5030: positive after fees.
Unrealized PnLInventory that is still open.100 LIT remains bought at 1.5000 and mark price drops to 1.4500: there is -5 USDC unrealized.
Negative DEX closeThe exchange calculates the total position being closed.If you market-close accumulated inventory below its average, the DEX can show a loss even if earlier lots earned spread.

Full example: the bot earns 20 cycles of +0.05 USDC each, total +1.00 USDC. During the downtrend it also holds 200 USDC of long exposure and price falls 2%. That inventory is roughly -4.00 USDC unrealized. Approximate result: +1.00 - 4.00 = -3.00 USDC. The user may feel that “all trades won”, but the overall account is negative because open exposure moved against them.

Do not confuse positive cycles with a positive bot

To evaluate a Market Maker, always read three things together: realized PnL, unrealized PnL/open inventory and current long/short exposure. If you only read closed operations, you can miss the risk that is still open on the DEX.

How to read the Market Maker stats panel

The Market Maker detail page separates strategy quality from current total bot result. This is intentional: a bot can capture spread on many closed lots and still be negative overall if the remaining inventory moved against it. Read the cards in this order:

Main total now

Total Profit Estimated = Accounting realized PnL + Inventory PnL - Estimated fees. This is the best dashboard estimate of what the bot is worth now if you stop it and close the current inventory near the displayed mark price. It is still an estimate, not exchange-equity reconciliation, because final slippage, exact fees, funding, deposits/withdrawals and manual trades can change the real account result.

StatWhat it meansWhy it is shownHow to use it
Current bot positionThe current inventory attributed to this bot. Positive means long, negative means short, and near zero means flat. Avg entry is the average entry of the inventory that remains open.Market Maker risk mostly comes from inventory. Before judging profit, you need to know if the bot still holds exposure.If position is large relative to cap, the bot may be in defensive mode even if closed cycles look good.
Grid ProfitSum of the profit realized by every close executed by the Market Maker. Each close contributes its result against the entry of the inventory it reduces.It measures profit realized by the bot's spread-farming activity.It is independent from accounting and does not subtract accounting fees. Fees and accounting PnL remain separate metrics.
Inventory PnLMark-to-market PnL of the inventory still open right now. Long inventory profits if mark price is above average entry; short inventory profits if mark is below average entry.It shows the risk that has not been realized yet. This is the number that can turn a good Grid Profit into a negative current bot result.When stopping or closing the bot, this is the open part that will become realized, subject to slippage and final fees.
Total Profit EstimatedThe headline current total estimate: realized accounting PnL plus current inventory PnL minus estimated fees.It answers the user question: “approximately how much is this bot up/down now if I stop and close it?” It includes reductions or cuts already realized in loss, which no longer appear inside open Inventory PnL.Use this as the main current total. Treat it as estimated, not final/exact exchange equity.
Closed cyclesNumber of completed matched cycles/lots. W/L shows winners and losers; matched % shows how much of the close history could be paired cleanly to an entry.Profit is more trustworthy when enough cycles exist and matching coverage is high.Low matched coverage means read Grid Profit with more caution and inspect the fill ledger/history.
Closed volumeTotal notional volume of the closed cycles used for cycle profit. Net cycle return is net cycle profit divided by closed volume.It normalizes profit by traded size. A $10 profit is different on $500 volume versus $50,000 volume.Use it to compare efficiency between bots or markets.
Since last syncAccounting/cycle replay since the last inventory sync or baseline. It may be smaller than all-time history after a resync.Sync rebuilds current inventory/accounting state without deleting older closed-lot history.If this is small after a recent sync, check Grid Profit/all-time closed lots before assuming history disappeared.
Fills processedHow many fills the bot replayed, plus all fill volume. It includes entries, exits, partial fills and activity that may still be open.It is an activity/coverage signal, not a profit number.High fill count with low profit can mean tight spread, fees, churn, or inventory dragging performance.
Accounting realized PnLClosed PnL reconstructed with position-average accounting from the complete fill history.It is an accounting metric independent from Grid Profit, even though both observe the same closes under different contracts.Do not use it to replace Grid Profit; use it for accounting reconciliation.
Most important reading rule

Grid Profit tells you whether the bot is capturing spread. Total Profit Estimated tells you the current estimated total of the bot if you stop/close now. A healthy strategy should ideally have positive/consistent Grid Profit, controlled Inventory PnL, and a Total Profit Estimated that is not being destroyed by open exposure or realized loss reductions.

Profit logic and fill ledger details

The lower profit logic block and filled-order ledger explain where the headline numbers came from. They are diagnostic tools for understanding why the bot is green or red, not separate “extra profit” to add again.

DetailMeaningWhy it matters
Real breakeven priceEstimated price where the open inventory would net to zero after profit already banked.It helps decide whether the remaining inventory can be closed without giving back previous profit. Direction matters: long inventory wants price above breakeven; short inventory wants price below breakeven.
Avg captured spreadAverage gross and net edge captured per closed lot, shown in bps. 100 bps = 1%.It shows whether the configured spread is wide enough after fees. If net bps is small or negative, the bot may be churning.
Gross vs net profitGross matched-lot profit minus estimated fees.Fees can make an apparently good spread much smaller. Always prefer net when judging performance.
Avg entry: venue vs bookCompares the venue/baseline average with the bot's internal book average. Drift means they differ.Small drift can be rounding; large drift can indicate manual exposure, missing fills, exchange sync changes or accounting baseline issues.
Trade PnL (lot)PnL of a specific closed lot against its own entry.This is the closest view of “bought lower, sold higher” for that lot.
Acct. PnL (avg)PnL of the same close against the global average position.It can be negative even when the lot PnL is positive. That is normal when the bot has accumulated inventory at different prices.
Position afterInventory remaining after that fill.It explains whether a fill reduced risk or left exposure still open.

In short: Total Profit Estimated is the familiar current total estimate, Grid Profit is the closed-cycle strategy score, and Inventory PnL is the open risk that can still change before the bot is fully closed.

How to read the bot state

StateMeaning
FlatNo meaningful inventory. The bot can normally quote both bids and asks.
Long inventoryThe bot owns base asset. Asks reduce risk; bids increase risk.
Short inventoryThe bot is short base asset. Bids reduce risk; asks increase risk.
Position guard green/yellow/redHow much of the configured cap is currently used. Yellow/red means the bot should become more defensive.
PausedAutomation stops placing new quotes and cancels bot orders, but live inventory can remain open.
Close positionCancels bot orders and sends a reduce-only market close for the current bot inventory.

Repairing a Market Maker

If the bot and the exchange show different positions or orders, open the Market Maker detail page and select Repair. The panel shows what needs attention and recommends an action. Repair restores normal bot management; it does not change the strategy or recover trading losses.

When Repair is useful

Use it when an exchange order is not reflected in the bot, a completed or canceled order still appears active, the displayed position does not match the exchange, a protective ReduceOnly order is missing or incorrect, or Resume remains blocked after order changes. Negative PnL, insufficient margin, minimum order size or a quote that has not filled are not repair problems by themselves.

OptionWhat it doesWhen to use it
Repair AllApplies all recommended corrections in one step.Use it when the panel detects more than one problem.
Reconcile ordersAligns the bot's open orders with the exchange.Use it when the two order lists do not match.
Settle ordersUpdates orders that have already filled, been canceled or completed.Use it when an old order still appears active in the bot.
Sync positionAligns the position shown by the bot with the exchange position.Use it only after confirming that the exchange position belongs to this bot.
Repair ReduceOnlyRestores or adjusts protective ReduceOnly orders for the current position.Use it when the position does not have the expected exit protection.
1

Check the exchange

Confirm the real position and open orders, especially if you also trade the same symbol manually or with another bot.

2

Open Repair

Review the comparison and the recommended action before continuing.

3

Choose the recommended option

Use one option for a specific issue or Repair All when the panel finds several issues.

4

Verify the result

Refresh the bot and the exchange. If they still do not match, do not repeat the action; contact support.

Repair can modify live orders

Review the recommendation before confirming. Repair does not close the market position, pause the bot, change the strategy or guarantee a profitable exit. Always verify the exchange afterward.