Naive Market Maker Bot for Binance.
Solution contains two console projects:
- The
BinanceBot.MarketViewer.Console
project demonstrates Order Book updating in near-real time (via Binance WebSocket API). - The
BinanceBot.MarketBot.Console
project demonstrates how BinanceBot create and cancel orders (via Binance REST API) depends on current Market Depth.
Most of the BinanceDotNet.BinanceExchange.API
project was taken from BinanceDotNet project [2], but BinanceBot solution is not a branch of BinanceDotNet project.
In picture below BinanceBot create order to Order Book only if price spread by ETH/BTC greater than 0.2%.
Warn: BinanceBot uses test order create API by default (without real order creation).
Turn off TEST_ORDER_CREATION_MODE
compilation symbol in MarketMakerBot.cs
to create real order in order book.
Binance has numerous limits to requests, orders count, min/max volume of order, etc. The networks restrictions should be taken into BinanceBot working as part of BinanceClientConfiguration
,
and the orders restrictions - as part of MarkerStrategyConfiguration
.
Binance API keys should be stored in secured storage (such as Azure Key Vault
service) instead of plain text such it is now.
Any configuration (of connectors or bot) should be placed in separate configuration storage (such as JSON files
in local file system).
This will allow you to reconfigure the bot without the need for recompilation.
BinanceBot doesn’t processed network connection errors.
It would be to implement Retry Policies
for the broken connections and handling other network errors.
The solution doesn’t contain any Unit Tests
/Integration Tests
, which is a bad practice.
- .NET Core 3.1.