Author | |
---|---|
Po Wen Perng | powen@injectiveprotocol.com |
go 1.16+
This demo is a single exchange market making bot by using go-sdk.
The simple demo of go-sdk you can check here.
To set up the environment, you can check file .env.example.
Once setting up the environment, change the file name from .env.example to .env
Also, you will need private key from your wallet to fill up TRADING_COSMOS_PK in .env file
Then
$ cd /path/to/injective-api-demo/go
$ make install
$ ./go-bot-demo.sh
This market making bot based on Avellaneda & Stoikov’s market-making strategy.
It will place orders on both buy and sell side based on your inventory conditions.
The reference price is from Binance partial book data.
You can find out all the detail from /path/to/injective-api-demo/go/trading.
The main loop logic is in singleExchangeMM.go
The strategy logic is in mm_strategy.go
Orders managing logic is in inj_orders_engine.go
Injective stream data handling logic is in inj_stream.go
Injective stream position handling logic is in inj_position.go
Feel free to do adjustments to fit your own needs.