Code style: black Python 3.9


Monitor cryptocurrency exchanges and alert on different platforms whenever a price discrepancy occurs.

Monitored exchanges:

  • Binance
  • FTX
  • ByBit
  • Huobi
  • KuCoin

Supported platforms for sending notification:

  • Twitter

Implemented Example

Table of contents

1)What’s that and how does it work? 2)Can i run one myself? 3)Examples 4)Troubleshooting


Arbitrage-gossip is a bot that asynchronously fetches the prices from 5(for now) centralized cryptocurrency exchanges for a certain pair pair and reports to twitter when big enough price difference Z occurs between the exchanges, given that you have twitter api access, else it only logs the information to the server.

graph LR
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex1((Binance))
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex2((FTX))
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex3((Bybit))
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex4((Huobi))
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex5((KuCoin))
Arb((Arbitrage-gossip)) -- Async Websocket connection --> Ex6((Exchange *N*))
Arb((Arbitrage-gossip)) -- Whenever price difference Z occurs, report it --> F[Twitter]


Sure. Clone the repository

git clone
cd arbitrage-gossip

Setup a virtual environment.

$ python -m venv .venv && . .venv/bin/activate

Install all the necessary packages.

pip install -r requirements.txt

If you intend to report the information to twitter, put your api keys in .env file in the program’s root directory, as shown in .env-sample.


  1. Monitor pair BTCUSDT on each exchange that offers it, and report to twitter whenever a price difference of atleast 1% occurs between any of the exchanges. Reports no more often than 180 seconds. The information is logged by default to /var/log/arbitrager/btcusdt.log.
$ python arbitrage-gossip/ --base btc --quote usdt --report-to=twitter --cooldown=180 --threshold=1


The program supports 4 levels of logging, in ascending order – debug, info, warning and error, as per the python’s logging library.

  1. Use debug if you want to drown in information.
  2. Info is the default level, outputs everything necessary(recommended).
  3. Warning and Error log only warnings and errors respectively :). Generally everything important is logged by default(info level), so that reading the log should give you a good idea of what the issue is.


View Github