Uses the ccxt library to calculate arbitrage opportunites between multiple exchanges.
npm install crypto-exchange-arbitrage
Quick start
----
``sh`
$npm install crypto-exchange-arbitrage
`javascript
const arbitrage = require('crypto-exchange-arbitrage');
arbitrage({exchanges: ['binance', 'bittrex']}, function(err, result) {
if (err) {
return console.log(err);
};
console.log(result);
});
`
Usage
----
`javascript
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
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