Giter VIP home page Giter VIP logo

arbitragehelper's Introduction

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 [email protected]: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.

arbitragehelper's People

Contributors

dhensen avatar joeywisse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.