Simple market making bot for experimentation.
- limit orders are evenly distributed in a grid
- only responsible for execution
- strategy and risk comes from strategy_config.toml
- not recommended without a proven strategy component updating the strategy
- adjust ranges to introduce directional bias
- adjust frequency for aggressiveness
- adjust risk limits based on market conditions
- only binance futures testnet and btcusdt is implemented
- min_spread
- minimum range to quote on both sides
- distance from mid price in USD value
- (should be switched to % in later versions)
- max buy(sell) spread
- the depth of limit orders can be adjusted separately for each side
- distance from mid price in USD value
- bias examples:
- sideways + low volatility: symmetric ranges narrowly quoted
- sideways + high volatility: symmetric ranges widely quoted
- bullish bias: shallow buy range, deep sell range
- bearish bias: shallow sell range, deep buy range
- granularity
- defines how many limit orders should be placed evenly between min spread and max spread
- max buy(sell) side
- value in btc
- maximum total sum of limit orders for each side
- if you just want to execute trades in one direction, set this to zero for the other side
- max position size
- value in btc
- maximum amount of risk the bot can take in either direction
- currently this applies for both sell and buy sides
- update interval
- update frequency in seconds, this is how frequently the bot refreshes the range it quotes
- short interval means more aggressive execution, the bot will "chase" if it has directional bias
- large update interval means more patience (e.g. because signal is weaker)
- update interval amplifies or dampens the effect of volatility
- high volatility with frequent update means price levels are both revisited and filled more frequently
- low volatility and rare updates means the orders might not even get visited and filled.
- update frequency in seconds, this is how frequently the bot refreshes the range it quotes
- averaging out from a large short position
- set max_buy_side & max_sell_side to zero, set max position size to zero (to make sure no new trades are made)
- BINANCE_API_KEY=your_key
- BINANCE_API_SECRET=your_secret
- make range definitions % based
- allow more sophisticated input for execution
- separate min range for both sides
- non-linear grid (e.g. denser towards current price, sparser outwards)
- introduce risk management features
- make other markets configurable
- integration with strategy and risk modules