Skip to content

Arbitrage Bot: a long/short market-neutral strategy

License

Notifications You must be signed in to change notification settings

jamlazevedo/arbitrage.js

 
 

Repository files navigation

version license Supported Exchanges Join the chat at https://gitter.im/vectree-chat/Lobby

Blackbird Bitcoin Arbitrage

Introduction

Arbitrage.js is a NodeJS trading system that does automatic long/short arbitrage between Bitcoin and altcoins exchanges. This project is a NodeJS copy of C++ blackbird library with some improvements:

  • arbitrage.js support much more exchanges (see ccxt docs),
  • this project includes telegram bot for notifications,
  • arbitrage.js working with all types of coins supported by ccxt.

Thanks Julien Hamilton for blackbird project!

How It Works

Bitcoin and altcoins is still a new and inefficient market. Several exchanges exist around the world and the bid/ask prices they propose can be briefly different from an exchange to another. The purpose of arbitrage.js is to automatically profit from these temporary price differences while being market-neutral.

Here is a real example where an arbitrage opportunity exists between Bitstamp (long) and Bitfinex (short):

Spread Example

At the first vertical line, the spread between the exchanges is high so Blackbird buys Bitstamp and short sells Bitfinex. Then, when the spread closes (second vertical line), arbitrage.js exits the market by selling Bitstamp and buying Bitfinex back.

Main part of the text was taken from blackbird docs

Advantages

Unlike other arbitrage systems, arbitrage.js doesn't sell but actually short sells Bitcoin or altcoins on the short exchange. This feature offers two important advantages:

  1. The strategy is always market-neutral: the Bitcoin or altcoins market's moves (up or down) don't impact the strategy returns. This removes a huge risk from the strategy. The Bitcoin or altcoins market could suddenly lose half its value that this won't make any difference in the strategy returns.

  2. The strategy doesn't need to transfer funds (USD or BTC, altcoins) between exchanges. The buy/sell and sell/buy trading activities are done in parallel on two different exchanges, independently. Advantage: no need to deal with transfer latency issues.

More details about short selling and market neutrality can be found on issue #100.

Main part of the text was taken from blackbird docs

Disclaimer

USE THE SOFTWARE AT YOUR OWN RISK. YOU ARE RESPONSIBLE FOR YOUR OWN MONEY. PAST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS.

THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.

Potential Exchanges

Arbitrage.js using ccxt cryptocurrency trading library for working with exchanges.

About

Arbitrage Bot: a long/short market-neutral strategy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.7%
  • Dockerfile 0.3%