Using Binance's Api, a market maker bot is implemented to provide bid ask algorithmically on the Binance testnet, which uses dummy currencies and trades. The library binance-connector-python is used to interface with Binance's API.
The implementation is encompassed in binanceMM.py and the market maker strategy is as follows:
- Get the latest trade price
- set up symmetric bid ask orders around the price given a spread and constant quantity
- if an order is filled, cancel all remaining orders and set a new bid ask again
The strategy is very naive and as expected the average profit is negative for this. The point of this exercise, for me, is to explore Binance's API and implementation more so than the actual market making strategy. More sophisticated strategies can be explored in the future.
You require a BInance Exchange API key and Secret key in a readable file format within the directory.
pip install -r requirements.txt
python binanceMM.py