All Projects → mammuth → Bitcoin Arbitrage Trading Bot

mammuth / Bitcoin Arbitrage Trading Bot

Licence: mit
Trading bot which exploits price-spreads between cryptocurrency exchanges 🔍💸

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bitcoin Arbitrage Trading Bot

Socktrader
🚀 Websocket based trading bot for 💰cryptocurrencies 📈
Stars: ✭ 152 (+17.83%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Gnome Feeder
Profit Trailer Feeder Full Build with Settings
Stars: ✭ 122 (-5.43%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Binance grid trader
A grid trading strategy and trading-bot for Binance Exchange. 币安交易所的网格交易
Stars: ✭ 132 (+2.33%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Jesse
An advanced crypto trading bot written in Python
Stars: ✭ 1,038 (+704.65%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Gekko
A bitcoin trading bot written in node - https://gekko.wizb.it/
Stars: ✭ 9,839 (+7527.13%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Gekko Backtesttool
Batch backtest, import and strategy params optimalization for Gekko Trading Bot. With one command you will run any number of backtests.
Stars: ✭ 203 (+57.36%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+1906.98%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Techan
Technical Analysis Library for Golang
Stars: ✭ 404 (+213.18%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Crypto Signal
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 3,100+ stars, 900+ forks
Stars: ✭ 3,690 (+2760.47%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Machine Learning And Ai In Trading
Applying Machine Learning and AI Algorithms applied to Trading for better performance and low Std.
Stars: ✭ 258 (+100%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+159.69%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Freqtrade Strategies
Free trading strategies for Freqtrade bot
Stars: ✭ 697 (+440.31%)
Mutual labels:  trading-bot, bitcoin, trading-strategies
Arbitrader
A market neutral cryptocurrency trading bot.
Stars: ✭ 66 (-48.84%)
Mutual labels:  trading-bot, bitcoin
Crypto Trading Bot
Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, FTX, Bybit ... (public edition)
Stars: ✭ 1,089 (+744.19%)
Mutual labels:  trading-bot, trading-strategies
Gtrader
a trading strategy trainer, back-tester and bot
Stars: ✭ 71 (-44.96%)
Mutual labels:  trading-bot, bitcoin
Cointrol
฿ Bitcoin trading bot with a real-time dashboard for Bitstamp.
Stars: ✭ 1,351 (+947.29%)
Mutual labels:  trading-bot, bitcoin
Cated
CATEd - Cryptocurrency Analytics and Trading Engine for Django
Stars: ✭ 84 (-34.88%)
Mutual labels:  trading-bot, bitcoin
Tradingview Alert Binance Trader
This trading bot listens to the TradingView alert emails on your inbox and executes trades on Binance based on the parameters set on the TD alerts.
Stars: ✭ 100 (-22.48%)
Mutual labels:  trading-bot, trading-strategies
Influx Crypto Trader
Node js trading bot, let you create trading strategy and run it (backtest/simulation/live)
Stars: ✭ 49 (-62.02%)
Mutual labels:  trading-bot, trading-strategies
Bitmex Simple Trading Robot
Simple BitMEX trading robot.
Stars: ✭ 100 (-22.48%)
Mutual labels:  bitcoin, trading-strategies

Bitcoin Arbitrage Trading Bot

Buy Me A Coffee

A python monitoring and trading bot which exploits price-spreads between different cryptocurrency exchanges.

bitcoin-arbitrage-trading-bot

Capabilities

  • Monitoring of spreads between exchanges (eg. Gdax, Bitfinex, Bitstamp, ...)
  • Multiple currency pairs configurable (eg. BTC/EUR, ETH/USD, ...)
  • Notifications on spread thresholds (eg. spreads of > 200€) via different notification channels (eg. Pushbullet, Mail, ...)
  • Automated trading for configured spread thresholds (partly implemented)
  • Storing of historical spreads and making them available via a web UI
  • Highly configurable (currency pairs, thresholds for each notification channel or trading, historical data, ...)

Trading Strategy

The following example explains spreads between exchanges:

Exchange BTC/EUR price
Gdax 5000€
Bitfinex 5600€

This results in a spread of 600€ for the price of 1 BTC in EUR between Gdax and Bitfinex (this example is not based on ask and bid prices for simplicity reasons, the bot itself uses those correct prices).

How to exploit this spread?

(example based on above table)

Strategy 1 (common "arbitrage trading")

Preparation:

  • Store 5000€ on Gdax

Spread exploitation:

  • Buy BTC on Gdax for 5000€
  • Send BTC from Gdax to Bitfinex
  • Pay fees for transaction and wait until it's confirmed
  • Sell BTC on Bitfinex for 5600€

Postprocessing (steps needed to be able to repeat exploit):

  • Transfer 5600€ from Bitfinex to Gdax to repeat
Advantages Disadvantages
Capital needed: 5000€ Risk of price fluctuation until transaction is confirmed
Postprocessing partly done manually (SEPA transfer of the euro amount)
Postprocessing is time-consuming (couple of days for international SEPA transfer)

Strategy 2 (used by this trading bot)

Preparation:

  • Store 5000€ on Gdax account
  • Store 1 BTC on Bitfinex account

Spread exploitation:

  • Buy 1 BTC on Gdax
  • Simultaneously sell 1 BTC on Bitfinex

Postprocessing (steps needed to be able to repeat exploit):

  • Transfer 5600€ from Bitfinex to Gdax
  • Transfer 1 BTC from Gdax to Bitfinex
Advantages Disadvantages
No real risk of price fluctuation (whole spread exploitation only takes a couple of seconds) Same disadvantages as strategy 1 (except the risk of price fluctation)
Capital needed: ~ 2x5000€ (fiat currency: 5000€ + BTC worth ~5000€)

The following table demonstrates the amount of BTC and fiat stored on the exchanges during the different phases of the execution of the strategy:

Preparation

Exchange Amount of BTC Amount of €
Gdax 0 5000
Bitfinex 1 0

After Spread exploitation

Exchange Amount of BTC Amount of €
Gdax 1 0
Bitfinex 0 5600

Profit: 600€ (excluding fees for simplicity)

Status of project

The strategy worked during the crypto boom at the end of 2017 (with spreads of > 700€ several times a week). As of now, spreads are pretty low (< 100€) which renders using the bot risky and less attractive (change of prices during order executions, fees, ...).

  • Monitoring works
  • Automated trading is partly implemented, but never tested with real accounts
  • Reliability isn't as good as it should be when using the bot with real accounts

Developer Information

The bot itself is placed at bitcoin_arbitrage/monitor with its entry point / main class being bitcoin_arbitrage/monitor/monitor.py.

The code within bitcoin_arbitrage/ is a Flask app which is just a fancy wrapper for the monitor/bot with a web UI.

Configuration of the bot is done by copying the settings.py file.

Running locally

Requirements:

  • python >= 3.6
  • pipenv (install via pip install pipenv)

Run the monitor:

  • pipenv install - Install requirements
  • scripts/copy-config - Copy config file (some dummy settings are set by default)
  • scripts/run - Run the monitor

Running on server

You can use the following systemd service entry:

[Unit]
Description=Bitcoin Arbitrage Monitor
After=network-online.target

[Service]
Type=simple
User=bitcoin
Restart=always
WorkingDirectory=/home/bitcoin/bitcoin-arbitrage
ExecStart=/home/bitcoin/bitcoin-arbitrage/scripts/run

[Install]
WantedBy=multi-user.target

Running the tests

Manually:

  • scripts/test

With PyCharm: image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].