crypto-exchange-arbitrage

0.1.2 • Public • Published

Crypto-Exchange-Arbitrage

Crypto Exchange Arbitrage uses the ccxt library to gather ticker data from multiple exchanges and calculates the arbitrage opportunites between them.

Quick start

$npm install crypto-exchange-arbitrage
const arbitrage = require('crypto-exchange-arbitrage');
 
arbitrage({exchanges: ['binance', 'bittrex']}, function(err, result) {
  if (err) {
    return console.log(err);
  };
  console.log(result);
});

Usage

const arbitrage = require('crypto-exchange-arbitrage');
 
let options = {
  exchanges: ['kraken', 'bitfinex2', 'bittrex', 'binance', 'liqui', 'kucoin', 'hitbtc2'],
  percent: 2.5,
  usdIsUsdt: false,
};
 
arbitrage(options, function(err, result) {
  if (err) {
    return console.log(err);
  };
  console.log(result);
});

exchanges

Type: Array<String>

Exchanges is an array of exchange id's from the ccxt library. Each exchange looks for any arbitrage opportunities from all of the exchanges in the arrray. For a list of usable exchange id's check out the supported exchanges on the ccxt github(some exchanges will not work due to there being no fetchTickers support for that particular api).

percent

Type: Number Default: 1

Percent sets what percentage an arbitrage opportunity has to be greater than or equal to, in order to be returned.

usdIsUsdt

Type: Boolean Default: True

usdIsUsdt sets whether or not USD and USDT pairs are considered equal and therefore compared.

License

MIT

Package Sidebar

Install

npm i crypto-exchange-arbitrage

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

7.1 kB

Total Files

4

Last publish

Collaborators

  • zachricha