This script can be used with Hummingbot to:
1- Download latest books from specified exchange,
2- Subtrct/add delta from latest buy/sell,
3- Sell back based on order amount,
The aim is to see if this is a zero-sum game.
You need API keys and stuf like that, but basically, let's say we wish to test this on Gate.io:
1- wget the scipt:
wget -qO- https://gist.githubusercontent.com/Chubek/11bdda35674af82cc3e9bc381bf9e465/raw/ab04056b1d8d2cd367beeed8f6eb1092622cf049/generate-volume.py > volume_generate.py
then:
from volume_generate import VolumeGenerateStrategy
from hummingbot.connector.exchange.gate_io.gate_io_exchange import GateIoExchange
gate_io = GateIoExchange(api_key="your_gateio_api_key", secret_key="your_gateio_secret_key")
exchanges = {"gate_io": gate_io}
trading_pair = "CHER-USDT"
delta = 0.01
order_amount = 10
volume_generate_strategy = VolumeGenerateStrategy(exchanges=exchanges, trading_pair=trading_pair, delta=delta, order_amount=order_amount)
volume_generate_strategy.start()
This scripts fills in the discrepencies in the market. If a limit sell order is smaller than the price paid, it will fill it. Basically an arbitrage simulator.
You need API keys and stuf like that, but basically, let's say we wish to test this on Gate.io:
1- wget the scipt:
wget -qO- h[ttps://gist.githubusercontent.com/Chubek/11bdda35674af82cc3e9bc381bf9e465/raw/ab04056b1d8d2cd367beeed8f6eb1092622cf049/generate-volume.py](https://gist.githubusercontent.com/Chubek/11bdda35674af82cc3e9bc381bf9e465/raw/d0ba87a2df09a18d281180ac49e11dcfca16be48/fix-discrepencies.py) > fix-discrepencies.py
2- Identical to the last one. Except you need two exchanges.
It's an extension of check-discrepencies.py
.