diff --git a/js/_1broker.js b/js/_1broker.js index ef5632f36cb5..c314d2bf4959 100644 --- a/js/_1broker.js +++ b/js/_1broker.js @@ -60,7 +60,7 @@ module.exports = class _1broker extends Exchange { ], }, }, - }) + }); } async fetchCategories () { diff --git a/js/_1btcxe.js b/js/_1btcxe.js index 0c350992353b..22931c2fed51 100644 --- a/js/_1btcxe.js +++ b/js/_1btcxe.js @@ -52,6 +52,6 @@ module.exports = class _1btcxe extends cryptocapital { 'BTC/TRY': { 'id': 'TRY', 'symbol': 'BTC/TRY', 'base': 'BTC', 'quote': 'TRY' }, 'BTC/ZAR': { 'id': 'ZAR', 'symbol': 'BTC/ZAR', 'base': 'BTC', 'quote': 'ZAR' }, }, - }) + }); } } diff --git a/js/acx.js b/js/acx.js index 8a290055b28a..25eca9f8ce85 100644 --- a/js/acx.js +++ b/js/acx.js @@ -75,7 +75,7 @@ module.exports = class acx extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/allcoin.js b/js/allcoin.js index acfff1e2be2b..60b405f78f8e 100644 --- a/js/allcoin.js +++ b/js/allcoin.js @@ -53,7 +53,7 @@ module.exports = class allcoin extends okcoin { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/anxpro.js b/js/anxpro.js index 082f58d8855a..c64e1b9c50af 100644 --- a/js/anxpro.js +++ b/js/anxpro.js @@ -66,7 +66,7 @@ module.exports = class anxpro extends Exchange { 'STR/BTC': { 'id': 'STRBTC', 'symbol': 'STR/BTC', 'base': 'STR', 'quote': 'BTC' }, 'XRP/BTC': { 'id': 'XRPBTC', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/asia.js b/js/asia.js index 515321df407d..b25e142b9f51 100644 --- a/js/asia.js +++ b/js/asia.js @@ -39,7 +39,7 @@ module.exports = class asia extends Exchange { ], }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/binance.js b/js/binance.js index f0a777f0f16f..f1226246925e 100644 --- a/js/binance.js +++ b/js/binance.js @@ -182,7 +182,7 @@ module.exports = class binance extends Exchange { 'STRAT/BTC': { 'id': 'STRATBTC', 'symbol': 'STRAT/BTC', 'base': 'STRAT', 'quote': 'BTC', 'lot': 0.01, 'limits': { 'amount': { 'min': 0.01, 'max': undefined }, 'price': { 'min': 0.000001, 'max': undefined }, 'cost': { 'min': 0.001, 'max': undefined }}}, 'SNGLS/BTC': { 'id': 'SNGLSBTC', 'symbol': 'SNGLS/BTC', 'base': 'SNGLS', 'quote': 'BTC', 'lot': 1, 'limits': { 'amount': { 'min': 1, 'max': undefined }, 'price': { 'min': 0.00000001, 'max': undefined }, 'cost': { 'min': 0.001, 'max': undefined }}}, }, - }) + }); } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { diff --git a/js/bit2c.js b/js/bit2c.js index 3b49969331b6..bb9cb9a2f15a 100644 --- a/js/bit2c.js +++ b/js/bit2c.js @@ -56,7 +56,7 @@ module.exports = class bit2c extends Exchange { 'BCH/NIS': { 'id': 'BchNis', 'symbol': 'BCH/NIS', 'base': 'BCH', 'quote': 'NIS' }, 'LTC/NIS': { 'id': 'LtcNis', 'symbol': 'LTC/NIS', 'base': 'LTC', 'quote': 'NIS' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bitbay.js b/js/bitbay.js index 2476c011c45f..a79f1d68a6a7 100644 --- a/js/bitbay.js +++ b/js/bitbay.js @@ -71,7 +71,7 @@ module.exports = class bitbay extends Exchange { 'LSK/PLN': { 'id': 'LSKPLN', 'symbol': 'LSK/PLN', 'base': 'LSK', 'quote': 'PLN' }, 'LSK/BTC': { 'id': 'LSKBTC', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bitcoincoid.js b/js/bitcoincoid.js index af33eb490948..ce95a4ed03a0 100644 --- a/js/bitcoincoid.js +++ b/js/bitcoincoid.js @@ -63,7 +63,7 @@ module.exports = class bitcoincoid extends Exchange { 'XEM/BTC': { 'id': 'nem_btc', 'symbol': 'XEM/BTC', 'base': 'XEM', 'quote': 'BTC', 'baseId': 'nem', 'quoteId': 'btc' }, 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bitfinex.js b/js/bitfinex.js index 6113a7ecd28d..aad6e7c746e8 100644 --- a/js/bitfinex.js +++ b/js/bitfinex.js @@ -106,7 +106,7 @@ module.exports = class bitfinex extends Exchange { ], }, }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/bitfinex2.js b/js/bitfinex2.js index 0225c2e6db18..4500c26982b0 100644 --- a/js/bitfinex2.js +++ b/js/bitfinex2.js @@ -132,7 +132,7 @@ module.exports = class bitfinex2 extends bitfinex { 'ZEC/BTC': { 'id': 'tZECBTC', 'symbol': 'ZEC/BTC', 'base': 'ZEC', 'quote': 'BTC' }, 'ZEC/USD': { 'id': 'tZECUSD', 'symbol': 'ZEC/USD', 'base': 'ZEC', 'quote': 'USD' }, }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/bitflyer.js b/js/bitflyer.js index e64118396268..408a2fbd518c 100644 --- a/js/bitflyer.js +++ b/js/bitflyer.js @@ -65,7 +65,7 @@ module.exports = class bitflyer extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/bithumb.js b/js/bithumb.js index c67c014af0d3..17e894a971b1 100644 --- a/js/bithumb.js +++ b/js/bithumb.js @@ -68,7 +68,7 @@ module.exports = class bithumb extends Exchange { 'DASH/KRW': { 'id': 'DASH', 'symbol': 'DASH/KRW', 'base': 'DASH', 'quote': 'KRW' }, 'QTUM/KRW': { 'id': 'QTUM', 'symbol': 'QTUM/KRW', 'base': 'QTUM', 'quote': 'KRW' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bitlish.js b/js/bitlish.js index 4f5065cc3a6b..fe3de5b842c9 100644 --- a/js/bitlish.js +++ b/js/bitlish.js @@ -75,7 +75,7 @@ module.exports = class bitlish extends Exchange { ], }, }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/bitmarket.js b/js/bitmarket.js index 0ea2cdaff98c..151def418f0e 100644 --- a/js/bitmarket.js +++ b/js/bitmarket.js @@ -104,7 +104,7 @@ module.exports = class bitmarket extends Exchange { 'LiteMineX/BTC': { 'id': 'LiteMineXBTC', 'symbol': 'LiteMineX/BTC', 'base': 'LiteMineX', 'quote': 'BTC' }, 'PlnX/BTC': { 'id': 'PlnxBTC', 'symbol': 'PlnX/BTC', 'base': 'PlnX', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bitmex.js b/js/bitmex.js index 8c14f5a7a75e..92d7b536d5cf 100644 --- a/js/bitmex.js +++ b/js/bitmex.js @@ -120,7 +120,7 @@ module.exports = class bitmex extends Exchange { ], } }, - }) + }); } async fetchMarkets () { diff --git a/js/bitso.js b/js/bitso.js index 980bbb80562d..cef453870a5f 100644 --- a/js/bitso.js +++ b/js/bitso.js @@ -71,7 +71,7 @@ module.exports = class bitso extends Exchange { ], } }, - }) + }); } async fetchMarkets () { diff --git a/js/bitstamp.js b/js/bitstamp.js index 7c66b8c8cc8d..f85945d6cf65 100644 --- a/js/bitstamp.js +++ b/js/bitstamp.js @@ -84,7 +84,7 @@ module.exports = class bitstamp extends Exchange { 'ETH/EUR': { 'id': 'etheur', 'symbol': 'ETH/EUR', 'base': 'ETH', 'quote': 'EUR' }, 'ETH/BTC': { 'id': 'ethbtc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC' }, }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/bitstamp1.js b/js/bitstamp1.js index b2c9067da117..64c42a5361cd 100644 --- a/js/bitstamp1.js +++ b/js/bitstamp1.js @@ -66,7 +66,7 @@ module.exports = class bitstamp1 extends Exchange { 'ETH/EUR': { 'id': 'etheur', 'symbol': 'ETH/EUR', 'base': 'ETH', 'quote': 'EUR' }, 'ETH/BTC': { 'id': 'ethbtc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC' }, }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/bittrex.js b/js/bittrex.js index b961e7f661e0..cf685e7eeea5 100644 --- a/js/bittrex.js +++ b/js/bittrex.js @@ -99,7 +99,7 @@ module.exports = class bittrex extends Exchange { 'taker': 0.0025, }, }, - }) + }); } costToPrecision (symbol, cost) { diff --git a/js/bl3p.js b/js/bl3p.js index 0b567cf20fbe..4297698ce950 100644 --- a/js/bl3p.js +++ b/js/bl3p.js @@ -60,7 +60,7 @@ module.exports = class bl3p extends Exchange { 'BTC/EUR': { 'id': 'BTCEUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR' }, // 'LTC/EUR': { 'id': 'LTCEUR', 'symbol': 'LTC/EUR', 'base': 'LTC', 'quote': 'EUR' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bleutrade.js b/js/bleutrade.js index ceb3d3dc1d18..e92946f6e419 100644 --- a/js/bleutrade.js +++ b/js/bleutrade.js @@ -28,7 +28,7 @@ module.exports = class bleutrade extends bittrex { 'www': 'https://bleutrade.com', 'doc': 'https://bleutrade.com/help/API', }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/blinktrade.js b/js/blinktrade.js index 8ef738f38a24..8705825fe7f6 100644 --- a/js/blinktrade.js +++ b/js/blinktrade.js @@ -56,7 +56,7 @@ module.exports = class blinktrade extends Exchange { 'BTC/PKR': { 'id': 'BTCPKR', 'symbol': 'BTC/PKR', 'base': 'BTC', 'quote': 'PKR', 'brokerId': 8, 'broker': 'UrduBit' }, 'BTC/CLP': { 'id': 'BTCCLP', 'symbol': 'BTC/CLP', 'base': 'BTC', 'quote': 'CLP', 'brokerId': 9, 'broker': 'ChileBit' }, }, - }) + }); } fetchBalance (params = {}) { diff --git a/js/btcbox.js b/js/btcbox.js index 1ceede005165..d08083550838 100644 --- a/js/btcbox.js +++ b/js/btcbox.js @@ -26,6 +26,6 @@ module.exports = class btcbox extends asia { 'markets': { 'BTC/JPY': { 'id': 'BTC/JPY', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY' }, }, - }) + }); } } diff --git a/js/btcchina.js b/js/btcchina.js index e92715981bda..7d7db1d92f45 100644 --- a/js/btcchina.js +++ b/js/btcchina.js @@ -82,7 +82,7 @@ module.exports = class btcchina extends Exchange { 'BCH/CNY': { 'id': 'bcccny', 'symbol': 'BCH/CNY', 'base': 'BCH', 'quote': 'CNY', 'api': 'plus', 'plus': true }, 'ETH/CNY': { 'id': 'ethcny', 'symbol': 'ETH/CNY', 'base': 'ETH', 'quote': 'CNY', 'api': 'plus', 'plus': true }, }, - }) + }); } async fetchMarkets () { diff --git a/js/btce.js b/js/btce.js index 07a59a01b8eb..0ecbcb015254 100644 --- a/js/btce.js +++ b/js/btce.js @@ -46,7 +46,7 @@ module.exports = class btce extends Exchange { ], }, } - }) + }); } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { diff --git a/js/btcexchange.js b/js/btcexchange.js index 8dbc94fcde5f..16853dc94cee 100644 --- a/js/btcexchange.js +++ b/js/btcexchange.js @@ -24,6 +24,6 @@ module.exports = class btcexchange extends btctrader { 'markets': { 'BTC/PHP': { 'id': 'BTC/PHP', 'symbol': 'BTC/PHP', 'base': 'BTC', 'quote': 'PHP' }, }, - } - }) + }); + } } diff --git a/js/btcmarkets.js b/js/btcmarkets.js index 4f4e91adfc02..4558337598d6 100644 --- a/js/btcmarkets.js +++ b/js/btcmarkets.js @@ -61,7 +61,7 @@ module.exports = class btcmarkets extends Exchange { 'XRP/BTC': { 'id': 'XRP/BTC', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC' }, 'BCH/BTC': { 'id': 'BCH/BTC', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/btctrader.js b/js/btctrader.js index 21fcbb27dc19..961a1be0a576 100644 --- a/js/btctrader.js +++ b/js/btctrader.js @@ -48,7 +48,7 @@ module.exports = class btctrader extends Exchange { ], }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/btctradeua.js b/js/btctradeua.js index 82989156d875..2782651b65bc 100644 --- a/js/btctradeua.js +++ b/js/btctradeua.js @@ -66,7 +66,7 @@ module.exports = class btctradeua extends Exchange { 'taker': 0.1 / 100, }, }, - }) + }); } signIn () { diff --git a/js/btcturk.js b/js/btcturk.js index 2fe06c51c00e..79e4cb5cdda5 100644 --- a/js/btcturk.js +++ b/js/btcturk.js @@ -26,6 +26,6 @@ module.exports = class btcturk extends btctrader { 'ETH/TRY': { 'id': 'ETHTRY', 'symbol': 'ETH/TRY', 'base': 'ETH', 'quote': 'TRY' }, 'ETH/BTC': { 'id': 'ETHBTC', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC' }, }, - }) + }); } } diff --git a/js/btcx.js b/js/btcx.js index ea0a10d69caa..ba9090aa2727 100644 --- a/js/btcx.js +++ b/js/btcx.js @@ -47,7 +47,7 @@ module.exports = class btcx extends Exchange { 'BTC/USD': { 'id': 'btc/usd', 'symbol': 'BTC/USD', 'base': 'BTC', 'quote': 'USD' }, 'BTC/EUR': { 'id': 'btc/eur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/bter.js b/js/bter.js index f1be46802572..078349b9c851 100644 --- a/js/bter.js +++ b/js/bter.js @@ -58,7 +58,7 @@ module.exports = class bter extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/bxinth.js b/js/bxinth.js index f836fbef9dd4..0e72d87264af 100644 --- a/js/bxinth.js +++ b/js/bxinth.js @@ -60,7 +60,7 @@ module.exports = class bxinth extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/ccex.js b/js/ccex.js index 1c3c6c44f637..d66e02594a71 100644 --- a/js/ccex.js +++ b/js/ccex.js @@ -60,7 +60,7 @@ module.exports = class ccex extends Exchange { ], }, }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/cex.js b/js/cex.js index 8c5981ee20a3..6a1d824c2e9a 100644 --- a/js/cex.js +++ b/js/cex.js @@ -72,7 +72,7 @@ module.exports = class cex extends Exchange { 'taker': 0.2 / 100, }, }, - }) + }); } async fetchMarkets () { diff --git a/js/chbtc.js b/js/chbtc.js index 488dab7664f6..93cf28e83fe3 100644 --- a/js/chbtc.js +++ b/js/chbtc.js @@ -67,7 +67,7 @@ module.exports = class chbtc extends Exchange { 'HSR/CNY': { 'id': 'hsr_cny', 'symbol': 'HSR/CNY', 'base': 'HSR', 'quote': 'CNY' }, 'QTUM/CNY': { 'id': 'qtum_cny', 'symbol': 'QTUM/CNY', 'base': 'QTUM', 'quote': 'CNY' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/chilebit.js b/js/chilebit.js index e2fe36b0b810..0b64399d71f3 100644 --- a/js/chilebit.js +++ b/js/chilebit.js @@ -27,6 +27,6 @@ module.exports = class chilebit extends blinktrade { 'markets': { 'BTC/CLP': { 'id': 'BTCCLP', 'symbol': 'BTC/CLP', 'base': 'BTC', 'quote': 'CLP', 'brokerId': 9, 'broker': 'ChileBit' }, }, - }) + }); } } diff --git a/js/coincheck.js b/js/coincheck.js index 316764ecfeb4..25d49c869f1b 100644 --- a/js/coincheck.js +++ b/js/coincheck.js @@ -91,7 +91,7 @@ module.exports = class coincheck extends Exchange { // 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC' }, // 'DASH/BTC': { 'id': 'dash_btc', 'symbol': 'DASH/BTC', 'base': 'DASH', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/coinfloor.js b/js/coinfloor.js index 28ccc30c43de..93059e5cb81c 100644 --- a/js/coinfloor.js +++ b/js/coinfloor.js @@ -55,7 +55,7 @@ module.exports = class coinfloor extends Exchange { 'BTC/PLN': { 'id': 'XBT/PLN', 'symbol': 'BTC/PLN', 'base': 'BTC', 'quote': 'PLN' }, 'BCH/GBP': { 'id': 'BCH/GBP', 'symbol': 'BCH/GBP', 'base': 'BCH', 'quote': 'GBP' }, }, - }) + }); } fetchBalance (params = {}) { diff --git a/js/coingi.js b/js/coingi.js index 005b5e638782..8fcf4fd2fdf0 100644 --- a/js/coingi.js +++ b/js/coingi.js @@ -51,7 +51,7 @@ module.exports = class coingi extends Exchange { 'NMC/BTC': { 'id': 'nmc-btc', 'symbol': 'NMC/BTC', 'base': 'NMC', 'quote': 'BTC' }, 'DASH/BTC': { 'id': 'dash-btc', 'symbol': 'DASH/BTC', 'base': 'DASH', 'quote': 'BTC' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/coinmarketcap.js b/js/coinmarketcap.js index 64403462b294..4a8aa35f9b31 100644 --- a/js/coinmarketcap.js +++ b/js/coinmarketcap.js @@ -56,7 +56,7 @@ module.exports = class coinmarketcap extends Exchange { 'RUB', 'USD', ], - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/coinmate.js b/js/coinmate.js index 5e31025e98c0..3e6fe0c3d51a 100644 --- a/js/coinmate.js +++ b/js/coinmate.js @@ -56,7 +56,7 @@ module.exports = class coinmate extends Exchange { 'BTC/EUR': { 'id': 'BTC_EUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR' }, 'BTC/CZK': { 'id': 'BTC_CZK', 'symbol': 'BTC/CZK', 'base': 'BTC', 'quote': 'CZK' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/coinsecure.js b/js/coinsecure.js index f9ef9d19f990..5a8648eef873 100644 --- a/js/coinsecure.js +++ b/js/coinsecure.js @@ -157,7 +157,7 @@ module.exports = class coinsecure extends Exchange { 'markets': { 'BTC/INR': { 'id': 'BTC/INR', 'symbol': 'BTC/INR', 'base': 'BTC', 'quote': 'INR' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/coinspot.js b/js/coinspot.js index 81b390abc136..abfb2223b313 100644 --- a/js/coinspot.js +++ b/js/coinspot.js @@ -53,7 +53,7 @@ module.exports = class coinspot extends Exchange { 'LTC/AUD': { 'id': 'LTC', 'symbol': 'LTC/AUD', 'base': 'LTC', 'quote': 'AUD' }, 'DOGE/AUD': { 'id': 'DOGE', 'symbol': 'DOGE/AUD', 'base': 'DOGE', 'quote': 'AUD' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/cryptocapital.js b/js/cryptocapital.js index 641ea10b3053..d1830408c89d 100644 --- a/js/cryptocapital.js +++ b/js/cryptocapital.js @@ -51,7 +51,7 @@ module.exports = class cryptocapital extends Exchange { ], }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/cryptopia.js b/js/cryptopia.js index c5dd8daf5cc1..0579507d2409 100644 --- a/js/cryptopia.js +++ b/js/cryptopia.js @@ -66,7 +66,7 @@ module.exports = class cryptopia extends Exchange { ], }, }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/dsx.js b/js/dsx.js index 5905f164e7bb..2820638dd3af 100644 --- a/js/dsx.js +++ b/js/dsx.js @@ -72,7 +72,7 @@ module.exports = class dsx extends btce { ], }, }, - }) + }); } getBaseQuoteFromMarketId (id) { diff --git a/js/exmo.js b/js/exmo.js index 62c3f66a5af5..ecc7d5aed086 100644 --- a/js/exmo.js +++ b/js/exmo.js @@ -57,7 +57,7 @@ module.exports = class exmo extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/flowbtc.js b/js/flowbtc.js index fddf82e7ae23..3eacb97a1c37 100644 --- a/js/flowbtc.js +++ b/js/flowbtc.js @@ -52,7 +52,7 @@ module.exports = class flowbtc extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/foxbit.js b/js/foxbit.js index 11e927820cd5..79c5e647fa11 100644 --- a/js/foxbit.js +++ b/js/foxbit.js @@ -27,6 +27,6 @@ module.exports = class foxbit extends blinktrade { 'markets': { 'BTC/BRL': { 'id': 'BTCBRL', 'symbol': 'BTC/BRL', 'base': 'BTC', 'quote': 'BRL', 'brokerId': 4, 'broker': 'FoxBit' }, } - }) + }); } } diff --git a/js/fyb.js b/js/fyb.js index 415813417f62..56aa03ede564 100644 --- a/js/fyb.js +++ b/js/fyb.js @@ -33,7 +33,7 @@ module.exports = class fyb extends Exchange { ], }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/fybse.js b/js/fybse.js index 535ffa1f5149..610843e6b4d1 100644 --- a/js/fybse.js +++ b/js/fybse.js @@ -23,6 +23,6 @@ module.exports = class fybse extends fyb { 'markets': { 'BTC/SEK': { 'id': 'SEK', 'symbol': 'BTC/SEK', 'base': 'BTC', 'quote': 'SEK' }, } - }) + }); } } diff --git a/js/fybsg.js b/js/fybsg.js index 3dd0d58166f7..ce738281271e 100644 --- a/js/fybsg.js +++ b/js/fybsg.js @@ -23,6 +23,6 @@ module.exports = class fybsg extends fyb { 'markets': { 'BTC/SGD': { 'id': 'SGD', 'symbol': 'BTC/SGD', 'base': 'BTC', 'quote': 'SGD' }, }, - }) + }); } } diff --git a/js/gatecoin.js b/js/gatecoin.js index 87b8dcfe01cf..83ea3c72f8f4 100644 --- a/js/gatecoin.js +++ b/js/gatecoin.js @@ -176,7 +176,7 @@ module.exports = class gatecoin extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/gateio.js b/js/gateio.js index 4122cebf1f7b..8dff8b42e6c5 100644 --- a/js/gateio.js +++ b/js/gateio.js @@ -24,6 +24,6 @@ module.exports = class gateio extends bter { 'www': 'https://gate.io/', 'doc': 'https://gate.io/api2', } - }) + }); } } diff --git a/js/gdax.js b/js/gdax.js index 212133d23bf9..26eaeb13037b 100644 --- a/js/gdax.js +++ b/js/gdax.js @@ -96,7 +96,7 @@ module.exports = class gdax extends Exchange { 'taker': 0.25 / 100, }, }, - }) + }); } async fetchMarkets () { diff --git a/js/gemini.js b/js/gemini.js index cd424cd1fb11..53b363af3cf3 100644 --- a/js/gemini.js +++ b/js/gemini.js @@ -51,7 +51,7 @@ module.exports = class gemini extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/hitbtc.js b/js/hitbtc.js index 73f2d6217034..cc5307195d60 100644 --- a/js/hitbtc.js +++ b/js/hitbtc.js @@ -74,7 +74,7 @@ module.exports = class hitbtc extends Exchange { ], } }, - }) + }); } commonCurrencyCode (currency) { diff --git a/js/hitbtc2.js b/js/hitbtc2.js index 34b0cc002130..0555fe9f58b1 100644 --- a/js/hitbtc2.js +++ b/js/hitbtc2.js @@ -83,7 +83,7 @@ module.exports = class hitbtc2 extends hitbtc { 'taker': 0.1 / 100, }, } - }) + }); } commonCurrencyCode (currency) { diff --git a/js/huobi.js b/js/huobi.js index ebd797e50499..f949bf51e038 100644 --- a/js/huobi.js +++ b/js/huobi.js @@ -82,7 +82,7 @@ module.exports = class huobi extends Exchange { 'LTC/CNY': { 'id': 'ltc', 'symbol': 'LTC/CNY', 'base': 'LTC', 'quote': 'CNY', 'type': 'staticmarket', 'coinType': 2 }, // 'BTC/USD': { 'id': 'btc', 'symbol': 'BTC/USD', 'base': 'BTC', 'quote': 'USD', 'type': 'usdmarket', 'coinType': 1 }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/huobi1.js b/js/huobi1.js index 59d7d84c6f61..c522bdc2b4e0 100644 --- a/js/huobi1.js +++ b/js/huobi1.js @@ -71,7 +71,7 @@ module.exports = class huobi1 extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/huobicny.js b/js/huobicny.js index 5a8fa4cd6e2b..72f3a023f002 100644 --- a/js/huobicny.js +++ b/js/huobicny.js @@ -20,6 +20,6 @@ module.exports = class huobicny extends huobi1 { 'www': 'https://www.huobi.com', 'doc': 'https://github.com/huobiapi/API_Docs/wiki/REST_api_reference', } - }) + }); } } diff --git a/js/huobipro.js b/js/huobipro.js index aabf76eb8579..d2dec06822a8 100644 --- a/js/huobipro.js +++ b/js/huobipro.js @@ -20,6 +20,6 @@ module.exports = class huobipro extends huobi1 { 'www': 'https://www.huobi.pro', 'doc': 'https://github.com/huobiapi/API_Docs/wiki/REST_api_reference', }, - }) + }); } } diff --git a/js/independentreserve.js b/js/independentreserve.js index 1ff9d6a22eed..d1327c7a2114 100644 --- a/js/independentreserve.js +++ b/js/independentreserve.js @@ -61,7 +61,7 @@ module.exports = class independentreserve extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/itbit.js b/js/itbit.js index b74698019969..ae2f0414b69c 100644 --- a/js/itbit.js +++ b/js/itbit.js @@ -61,7 +61,7 @@ module.exports = class itbit extends Exchange { 'BTC/SGD': { 'id': 'XBTSGD', 'symbol': 'BTC/SGD', 'base': 'BTC', 'quote': 'SGD' }, 'BTC/EUR': { 'id': 'XBTEUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR' }, }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/jubi.js b/js/jubi.js index b0f6af870c96..2e689ca76da6 100644 --- a/js/jubi.js +++ b/js/jubi.js @@ -23,7 +23,7 @@ module.exports = class jubi extends asia { 'www': 'https://www.jubi.com', 'doc': 'https://www.jubi.com/help/api.html', } - }) + }); } async fetchMarkets () { diff --git a/js/kraken.js b/js/kraken.js index afb9cbe0027f..be26d1ab3a1d 100644 --- a/js/kraken.js +++ b/js/kraken.js @@ -84,7 +84,7 @@ module.exports = class kraken extends Exchange { ], }, }, - }) + }); } costToPrecision (symbol, cost) { diff --git a/js/kuna.js b/js/kuna.js index 0deb84d54c14..53849159b87c 100644 --- a/js/kuna.js +++ b/js/kuna.js @@ -61,7 +61,7 @@ module.exports = class kuna extends acx { 'maker': 0.2 / 100, }, }, - }) + }); } handleErrors (code, reason, url, method, headers, body) { diff --git a/js/lakebtc.js b/js/lakebtc.js index 01ae70ba25d2..4cde43410a15 100644 --- a/js/lakebtc.js +++ b/js/lakebtc.js @@ -46,7 +46,7 @@ module.exports = class lakebtc extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/liqui.js b/js/liqui.js index 136446d1e6ca..b8bfb551fc5a 100644 --- a/js/liqui.js +++ b/js/liqui.js @@ -67,7 +67,7 @@ module.exports = class liqui extends btce { }, 'funding': 0.0, } - }) + }); } async withdraw (currency, amount, address, params = {}) { diff --git a/js/livecoin.js b/js/livecoin.js index 6284c01d4272..4a542c3d3c77 100644 --- a/js/livecoin.js +++ b/js/livecoin.js @@ -66,7 +66,7 @@ module.exports = class livecoin extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/luno.js b/js/luno.js index a5ba4d263744..33fdc4b01803 100644 --- a/js/luno.js +++ b/js/luno.js @@ -71,7 +71,7 @@ module.exports = class luno extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/mercado.js b/js/mercado.js index 52894e0e393b..e33af60f0de8 100644 --- a/js/mercado.js +++ b/js/mercado.js @@ -61,7 +61,7 @@ module.exports = class mercado extends Exchange { 'LTC/BRL': { 'id': 'BRLLTC', 'symbol': 'LTC/BRL', 'base': 'LTC', 'quote': 'BRL', 'suffix': 'Litecoin' }, 'BCH/BRL': { 'id': 'BCHBTC', 'symbol': 'BCH/BRL', 'base': 'BCH', 'quote': 'BRL', 'suffix': 'BCash' }, }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/mixcoins.js b/js/mixcoins.js index 46d256de20c3..9986856bcf9d 100644 --- a/js/mixcoins.js +++ b/js/mixcoins.js @@ -50,7 +50,7 @@ module.exports = class mixcoins extends Exchange { 'BCH/USD': { 'id': 'bcc_usd', 'symbol': 'BCH/USD', 'base': 'BCH', 'quote': 'USD' }, 'ETH/USD': { 'id': 'eth_usd', 'symbol': 'ETH/USD', 'base': 'ETH', 'quote': 'USD' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/nova.js b/js/nova.js index 841ac03aab68..ff99befc5551 100644 --- a/js/nova.js +++ b/js/nova.js @@ -57,7 +57,7 @@ module.exports = class nova extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/okcoin.js b/js/okcoin.js index eec772690c7e..7ee89f0ddb31 100644 --- a/js/okcoin.js +++ b/js/okcoin.js @@ -98,7 +98,7 @@ module.exports = class okcoin extends Exchange { ], }, }, - }) + }); } async fetchOrderBook (symbol, params = {}) { diff --git a/js/okcoincny.js b/js/okcoincny.js index 2e3b056f6b93..4c398437e59f 100644 --- a/js/okcoincny.js +++ b/js/okcoincny.js @@ -31,6 +31,6 @@ module.exports = class okcoincny extends okcoin { 'ETC/CNY': { 'id': 'etc_cny', 'symbol': 'ETC/CNY', 'base': 'ETC', 'quote': 'CNY', 'type': 'spot', 'spot': true, 'future': false }, 'BCH/CNY': { 'id': 'bcc_cny', 'symbol': 'BCH/CNY', 'base': 'BCH', 'quote': 'CNY', 'type': 'spot', 'spot': true, 'future': false }, } - }) + }); } } diff --git a/js/okcoinusd.js b/js/okcoinusd.js index f0b21b8b89ea..40ee758871e7 100644 --- a/js/okcoinusd.js +++ b/js/okcoinusd.js @@ -33,6 +33,6 @@ module.exports = class okcoinusd extends okcoin { 'ETH/USD': { 'id': 'eth_usd', 'symbol': 'ETH/USD', 'base': 'ETH', 'quote': 'USD', 'type': 'spot', 'spot': true, 'future': false }, 'ETC/USD': { 'id': 'etc_usd', 'symbol': 'ETC/USD', 'base': 'ETC', 'quote': 'USD', 'type': 'spot', 'spot': true, 'future': false }, } - }) + }); } } diff --git a/js/okex.js b/js/okex.js index 04725780bb0d..461901f5f8ad 100644 --- a/js/okex.js +++ b/js/okex.js @@ -32,6 +32,6 @@ module.exports = class okex extends okcoin { 'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'type': 'spot', 'spot': true, 'future': false }, 'BCH/BTC': { 'id': 'bcc_btc', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC', 'type': 'spot', 'spot': true, 'future': false }, } - }) + }); } } diff --git a/js/paymium.js b/js/paymium.js index 62dfde12ce69..b2276188058e 100644 --- a/js/paymium.js +++ b/js/paymium.js @@ -63,7 +63,7 @@ module.exports = class paymium extends Exchange { 'markets': { 'BTC/EUR': { 'id': 'eur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/poloniex.js b/js/poloniex.js index 1844e6dc35b1..aef8c838950d 100644 --- a/js/poloniex.js +++ b/js/poloniex.js @@ -115,7 +115,7 @@ module.exports = class poloniex extends Exchange { 'amount': 8, 'price': 8, }, - }) + }); } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { diff --git a/js/qryptos.js b/js/qryptos.js index 87eb6222f894..732bd94f7a85 100644 --- a/js/qryptos.js +++ b/js/qryptos.js @@ -67,7 +67,7 @@ module.exports = class qryptos extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/quadrigacx.js b/js/quadrigacx.js index c9cb8dfe40b3..13833f1cfa5d 100644 --- a/js/quadrigacx.js +++ b/js/quadrigacx.js @@ -53,7 +53,7 @@ module.exports = class quadrigacx extends Exchange { 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC' }, 'ETH/CAD': { 'id': 'eth_cad', 'symbol': 'ETH/CAD', 'base': 'ETH', 'quote': 'CAD' }, }, - }) + }); } async fetchBalance (params = {}) { diff --git a/js/quoine.js b/js/quoine.js index 54d3e97ba306..bc039afc87cf 100644 --- a/js/quoine.js +++ b/js/quoine.js @@ -23,6 +23,6 @@ module.exports = class quoine extends qryptos { 'www': 'https://www.quoine.com', 'doc': 'https://developers.quoine.com', } - }) + }); } } diff --git a/js/southxchange.js b/js/southxchange.js index c0c3e3c4133a..e5406a5d6a7d 100644 --- a/js/southxchange.js +++ b/js/southxchange.js @@ -46,7 +46,7 @@ module.exports = class southxchange extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/surbitcoin.js b/js/surbitcoin.js index d894c2c5e8b6..9324dd426324 100644 --- a/js/surbitcoin.js +++ b/js/surbitcoin.js @@ -27,6 +27,6 @@ module.exports = class surbitcoin extends blinktrade { 'markets': { 'BTC/VEF': { 'id': 'BTCVEF', 'symbol': 'BTC/VEF', 'base': 'BTC', 'quote': 'VEF', 'brokerId': 1, 'broker': 'SurBitcoin' }, } - }) + }); } } diff --git a/js/therock.js b/js/therock.js index af6f2be43283..9fdd552e2dd8 100644 --- a/js/therock.js +++ b/js/therock.js @@ -65,7 +65,7 @@ module.exports = class therock extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/tidex.js b/js/tidex.js index 6345ec4b539e..74d636d75bf7 100644 --- a/js/tidex.js +++ b/js/tidex.js @@ -27,6 +27,6 @@ module.exports = class tidex extends btce { 'doc': 'https://tidex.com/public-api', 'fees': 'https://tidex.com/pairs-spec' } - }) + }); } } diff --git a/js/urdubit.js b/js/urdubit.js index 787323e1f96d..b6e288fe0ca4 100644 --- a/js/urdubit.js +++ b/js/urdubit.js @@ -27,6 +27,6 @@ module.exports = class urdubit extends blinktrade { 'markets': { 'BTC/PKR': { 'id': 'BTCPKR', 'symbol': 'BTC/PKR', 'base': 'BTC', 'quote': 'PKR', 'brokerId': 8, 'broker': 'UrduBit' }, } - }) + }); } } diff --git a/js/vaultoro.js b/js/vaultoro.js index 87bdffe30a5d..1783e8621ae0 100644 --- a/js/vaultoro.js +++ b/js/vaultoro.js @@ -52,7 +52,7 @@ module.exports = class vaultoro extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/vbtc.js b/js/vbtc.js index 0c8f9c91dd5d..603a702e6619 100644 --- a/js/vbtc.js +++ b/js/vbtc.js @@ -27,6 +27,6 @@ module.exports = class vbtc extends blinktrade { 'markets': { 'BTC/VND': { 'id': 'BTCVND', 'symbol': 'BTC/VND', 'base': 'BTC', 'quote': 'VND', 'brokerId': 3, 'broker': 'VBTC' }, } - }) + }); } } diff --git a/js/virwox.js b/js/virwox.js index 1b24938302a6..a08eae07e0b4 100644 --- a/js/virwox.js +++ b/js/virwox.js @@ -71,7 +71,7 @@ module.exports = class virwox extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/wex.js b/js/wex.js index f28785789a4a..7df933b232fe 100644 --- a/js/wex.js +++ b/js/wex.js @@ -53,7 +53,7 @@ module.exports = class wex extends btce { ], } } - }) + }); } parseTicker (ticker, market = undefined) { diff --git a/js/xbtce.js b/js/xbtce.js index ee96d3ffd925..cdf8f822aa87 100644 --- a/js/xbtce.js +++ b/js/xbtce.js @@ -96,7 +96,7 @@ module.exports = class xbtce extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/js/yobit.js b/js/yobit.js index e68ef304b944..d82b34c43fad 100644 --- a/js/yobit.js +++ b/js/yobit.js @@ -55,7 +55,7 @@ module.exports = class yobit extends btce { }, 'funding': 0.0, } - }) + }); } commonCurrencyCode (currency) { diff --git a/js/yunbi.js b/js/yunbi.js index 9d9ec6fcf577..48b0637e6e34 100644 --- a/js/yunbi.js +++ b/js/yunbi.js @@ -75,6 +75,6 @@ module.exports = class yunbi extends acx { ], }, } - }) + }); } } diff --git a/js/zaif.js b/js/zaif.js index 8d4d25289ffe..14f4194ba5c2 100644 --- a/js/zaif.js +++ b/js/zaif.js @@ -69,7 +69,7 @@ module.exports = class zaif extends Exchange { ], }, }, - }) + }); } async fetchMarkets () { diff --git a/transpile.js b/transpile.js index 16c716b72e33..9c81f235051d 100644 --- a/transpile.js +++ b/transpile.js @@ -1,6 +1,7 @@ "use strict"; const fs = require ('fs') +const path = require ('path') const log = require ('ololog') const ansi = require ('ansicolor').nice @@ -258,6 +259,12 @@ function addPHPClassDeclaration (array, className, baseClass) { //----------------------------------------------------------------------------- +const python2Folder = './python/ccxt/exchanges/' +const python3Folder = './python/ccxt/async/exchanges/' +const phpFolder = './php/' + +//----------------------------------------------------------------------------- + function transpileDerivedExchangeClasses (sourceFolder) { fs.readdirSync (sourceFolder).filter (file => file.includes ('.js')).map (file => { @@ -266,7 +273,7 @@ function transpileDerivedExchangeClasses (sourceFolder) { let exchangeClassDeclarationMatches = contents.match (/^module\.exports\s*=\s*class\s+([\S]+)\s+extends\s+([\S]+)\s+{([\s\S]+?)^}/m) - log.green (file, exchangeClassDeclarationMatches[3]) + // log.green (file, exchangeClassDeclarationMatches[3]) let className = exchangeClassDeclarationMatches[1] let baseClass = exchangeClassDeclarationMatches[2] @@ -291,9 +298,15 @@ function transpileDerivedExchangeClasses (sourceFolder) { let methodSignatureRegex = /(async |)([\S]+)\s\(([^)]*)\)\s*{/ // signature line let matches = methodSignatureRegex.exec (signature) - log (part) - // async or not - let keyword = matches[1] + let keyword = '' + try { + // async or not + keyword = matches[1] + + } catch (e) { + log.error (e, className, baseClass, signature) + process.exit () + } // method name let method = matches[2] @@ -392,20 +405,36 @@ function transpileDerivedExchangeClasses (sourceFolder) { // alltogether in PHP, Python 2 and 3 python2 = python2.join ("\n") python3 = python3.join ("\n") - php = php.join ("\n") + php = php.join ("\n") + + const python2Filename = python2Folder + className + '.py' + const python3Filename = python3Folder + className + '.py' + const phpFilename = phpFolder + className + '.php' + + overwriteFile (python2Filename, python2) + overwriteFile (python3Filename, python3) + overwriteFile (phpFilename, php) - log.magenta (python2) - log.cyan (php) + // log.magenta (python2) + // log.cyan (php) - process.exit (1) + // process.exit (1) }) - process.exit () + // process.exit () } +//----------------------------------------------------------------------------- + +createFolderRecursively (python2Folder) +createFolderRecursively (python3Folder) +createFolderRecursively (phpFolder) + transpileDerivedExchangeClasses ('./js/') +process.exit (1) + //----------------------------------------------------------------------------- let ccxtjs = fs.readFileSync ('ccxt.js', 'utf8') @@ -883,6 +912,38 @@ function copyFile (oldName, newName) { //----------------------------------------------------------------------------- +function overwriteFile (filename, contents) { + log.cyan ('Overwriting → ' + filename.yellow) + fs.closeSync (fs.openSync (filename, 'a')); + fs.truncateSync (filename) + fs.writeFileSync (filename, contents) +} + +//---------------------------------------------------------------------------- + +function createFolder (folder) { + try { + fs.mkdirSync (folder) + } catch (err) { + if (err.code !== 'EEXIST') { + throw err + } + } +} + +//----------------------------------------------------------------------------- + +function createFolderRecursively (folder) { + + const parts = folder.split (path.sep) + + for (let i = 1; i <= parts.length; i++) { + createFolder (path.join.apply (null, parts.slice (0, i))) + } +} + +//----------------------------------------------------------------------------- + function transpilePythonAsyncToSync (oldName, newName) { log.magenta ('Transpiling ' + oldName.yellow + ' → ' + newName.yellow)