From 94b2b54abed0a41c3a5f8b8d4c2c4fed95f81b08 Mon Sep 17 00:00:00 2001 From: Maxime Lem Date: Thu, 14 May 2020 19:35:45 +0200 Subject: [PATCH] fix hitbtc constructor name in cctx (#2156) the name of the constructor is hitbtc, not hitbtc2, as visible in https://github.com/ccxt/ccxt/blob/master/ccxt.js#L118 the current wrong name results in this error when using hitbtc in zenbot TypeError: ccxt.hitbtc2 is not a constructor at publicClient (/home/me/workspaces/crypto/zenbot/extensions/exchanges/hitbtc/exchange.js:12:41) --- extensions/exchanges/hitbtc/exchange.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/exchanges/hitbtc/exchange.js b/extensions/exchanges/hitbtc/exchange.js index 611501c96b..f1d8ecf37e 100644 --- a/extensions/exchanges/hitbtc/exchange.js +++ b/extensions/exchanges/hitbtc/exchange.js @@ -9,7 +9,7 @@ module.exports = function container (conf) { var public_client, authed_client function publicClient () { - if (!public_client) public_client = new ccxt.hitbtc2({ 'apiKey': '', 'secret': '' }) + if (!public_client) public_client = new ccxt.hitbtc({ 'apiKey': '', 'secret': '' }) return public_client } @@ -18,7 +18,7 @@ module.exports = function container (conf) { if (!conf.hitbtc || !conf.hitbtc.key || !conf.hitbtc.key === 'YOUR-API-KEY') { throw new Error('please configure your HitBTC credentials in ' + path.resolve(__dirname, 'conf.js')) } - authed_client = new ccxt.hitbtc2({ 'apiKey': conf.hitbtc.key, 'secret': conf.hitbtc.secret }) + authed_client = new ccxt.hitbtc({ 'apiKey': conf.hitbtc.key, 'secret': conf.hitbtc.secret }) } return authed_client }