Market Making
Spread calculation, inventory management, Hummingbot configuration, and concentrated liquidity strategies for market makers.
Market Making is a skill from the CLI Trader project that gives trading agents the analytical framework and operational knowledge to provide liquidity across centralized crypto exchanges and DeFi protocols. Developed by the CLI Trader team, this skill covers the full spectrum of market making activities from traditional order book quoting to concentrated liquidity provision on automated market makers. It teaches your agent how to calculate spreads, manage inventory exposure, configure market making bots, and evaluate performance — transforming market making from an opaque activity into a systematic process with clearly defined parameters and risk controls.
The skill begins with spread calculation methodology, including volatility-based spread formulas and the Avellaneda-Stoikov model that dynamically adjusts quotes based on inventory position and time horizon. Inventory management is central to sustained market making — the agent learns to apply quote skewing that widens spreads on the side where inventory is accumulating and tightens on the side that reduces exposure, preventing the dangerous buildup of one-sided risk. For execution, the skill provides complete Hummingbot configuration guidance covering pure market making on a single exchange and cross-exchange strategies that quote on one venue while hedging fills on another with tighter spreads. On the DeFi side, concentrated liquidity provision on Uniswap v3 and v4 is covered in depth: range selection based on historical price distribution, the mechanics of impermanent loss amplification in narrow ranges, range utilization monitoring, and the economics of rebalancing frequency versus gas costs. Market microstructure concepts including order book dynamics, queue priority, adverse selection from informed flow, and toxicity metrics give the agent the vocabulary to analyze why certain strategies succeed or fail on specific venues. Performance measurement tracks spread capture, inventory P&L, total return, and Sharpe ratio to provide an honest assessment of strategy viability.
Within a trading workflow, market making operates as a continuous activity rather than a discrete trade decision. The agent monitors open orders, inventory levels, and market conditions in real time, recommending parameter adjustments when volatility shifts or when performance metrics deteriorate below acceptable thresholds. It also maintains awareness of regulatory considerations around market making activity on different venues, flagging situations where quoting behavior might raise compliance concerns. This skill pairs naturally with the risk management skill, which enforces portfolio-level exposure limits that prevent market making inventory from growing beyond acceptable bounds relative to total account equity.
For the complete methodology — including formulas, decision trees, worked examples, and validation checklists — see the full Market Making skill guide.