-
Notifications
You must be signed in to change notification settings - Fork 3
/
ccxt.pro.js
66 lines (56 loc) · 2.77 KB
/
ccxt.pro.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"use strict";
//-----------------------------------------------------------------------------
const ccxt = require ('ccxt')
, { deepExtend } = ccxt
, Exchange = require ('./js/base/Exchange')
, { unique } = require ('ccxt/js/base/functions')
// , errors = require ('ccxt/js/base/errors')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building
const version = '0.5.23'
// Exchange.ccxtVersion = version
//-----------------------------------------------------------------------------
const exchanges = {
'bequant': require ('./js/bequant.js'),
'binance': require ('./js/binance.js'),
'binanceus': require ('./js/binanceus.js'),
'bitcoincom': require ('./js/bitcoincom.js'),
'bitfinex': require ('./js/bitfinex.js'),
'bitmex': require ('./js/bitmex.js'),
'bitstamp': require ('./js/bitstamp.js'),
'bittrex': require ('./js/bittrex.js'),
'bitvavo': require ('./js/bitvavo.js'),
'cdax': require ('./js/cdax.js'),
'coinbaseprime': require ('./js/coinbaseprime.js'),
'coinbasepro': require ('./js/coinbasepro.js'),
'currencycom': require ('./js/currencycom.js'),
'ftx': require ('./js/ftx.js'),
'gateio': require ('./js/gateio.js'),
'gopax': require ('./js/gopax.js'),
'hitbtc': require ('./js/hitbtc.js'),
'huobijp': require ('./js/huobijp.js'),
'huobipro': require ('./js/huobipro.js'),
'idex': require ('./js/idex.js'),
'kraken': require ('./js/kraken.js'),
'kucoin': require ('./js/kucoin.js'),
'okcoin': require ('./js/okcoin.js'),
'okex': require ('./js/okex.js'),
'phemex': require ('./js/phemex.js'),
'poloniex': require ('./js/poloniex.js'),
'ripio': require ('./js/ripio.js'),
'upbit': require ('./js/upbit.js'),
}
// ----------------------------------------------------------------------------
for (const exchange in exchanges) {
const ccxtExchange = ccxt[exchange]
const baseExchange = Object.getPrototypeOf (ccxtExchange)
if (baseExchange === ccxt.Exchange) {
Object.setPrototypeOf (ccxtExchange, Exchange)
Object.setPrototypeOf (ccxtExchange.prototype, Exchange.prototype)
}
}
module.exports = deepExtend (ccxt, {
version,
Exchange,
exchanges: unique (ccxt.exchanges.concat (Object.keys (exchanges))).sort (),
}, exchanges)