Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
fix hitbtc constructor name in cctx (#2156)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
emexelem committed May 14, 2020
1 parent 9278812 commit 94b2b54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/exchanges/hitbtc/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}
Expand Down

0 comments on commit 94b2b54

Please sign in to comment.