Skip to content

dhensen/arbitragehelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c3fd9ea · Jan 14, 2018

History

28 Commits
Jan 14, 2018
Jan 13, 2018
Jan 14, 2018
Jan 14, 2018
Jan 14, 2018
Jan 9, 2018
Jan 14, 2018
Dec 28, 2017
Dec 28, 2017
Jan 2, 2018
Jan 11, 2018
Jan 14, 2018
Jan 14, 2018

Repository files navigation

Arbitrage Helper

Arbitrage helper lets you specify a target asset on a crypto exchange for which you want to do triangular arbitrage.

Usage

When running this code for a target asset, lets say BTC it gives you two lists:

  1. a list of all symbols that trade from or to BTC
  2. a list of all symbols that can trade between all assets from the previous list
git clone git@github.com:dhensen/arbitragehelper.git
yarn
node examples/xrp.js

Output:

There are 231 total symbols on this exchange.
Looking for all XRP symbols:
        Found 2 other assets compatible with XRP.
        - XRP/BTC
        - XRP/ETH

Looking for all compatible XRP symbols to calculate arbitrage:
        Found 1 symbols to calculate arbitrage for XRP.
        - ETH/BTC

Using CCXT

I've implemented this using CCXT. This allows you to easily use another exchange. In the example I have used Binance but you could for example just as easily use Poloniex like this:

In examples/xrp.js edit:

var helper = new arbitrageHelper.symbolFinder(new ccxt.poloniex());
helper.getCompatibleSymbols('XRP');

Save file then run it again:

node lib/arbitragehelper.js
There are 99 total symbols on this exchange.
Looking for all XRP symbols:
        Found 2 other assets compatible with XRP.
        - XRP/BTC
        - XRP/USDT

Looking for all compatible XRP symbols to calculate arbitrage:
        Found 1 symbols to calculate arbitrage for XRP.
        - BTC/USDT

Todo

  • Turn this into a proper npm package

Disclaimer: I am not a NodeJs/JS developer I know node lib/arbitragehelper.js is not the way to call use it You can help me make this into a proper npm module if you like!

Contributions

Contributions are welcome via a pull request.

About

This project is continued in a private repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published