crypto-exchange-arbitrage v0.1.2
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