-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
30 lines (25 loc) · 1.31 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"use strict";
require('sugar');
let Arbitrager = require("./lib/arbitrager");
let config = require("./lib/common/config");
let constants = require('./lib/common/constants');
let logger = require("./lib/common/logger");
let Cryptopia = require('./lib/exchanges/cryptopia');
let Bitstamp = require('./lib/exchanges/bitstamp');
let GDax = require('./lib/exchanges/gdax');
if (config.isDebug) {
require('dotenv').load();
}
logger.initServer('Gordon-Gecko');
logger = logger.forFile(module.filename);
logger.info("logger init");
(function main(){
let exchanges = [];
exchanges.push(new Cryptopia({pairs : [{instrument : constants.instruments.ETH_BTC, symbol : "ETH/BTC"},
{instrument : constants.instruments.LTC_BTC, symbol : "LTC/BTC"}]}),
new Bitstamp({pairs : [{instrument : constants.instruments.ETH_BTC, symbol : "ethbtc"},
{instrument : constants.instruments.LTC_BTC, symbol : "ltcbtc"}]}));
new GDax({pairs : [{instrument : constants.instruments.LTC_BTC, symbol : "LTC-BTC"},
{instrument : constants.instruments.ETH_BTC, symbol : "ETH-BTC"}]});
let arb = new Arbitrager(exchanges, [constants.instruments.ETH_BTC, constants.instruments.LTC_BTC]);
})();