Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function publicClient() {
if (!public_client) public_client = new ccxt.hitbtc2({ apiKey: '', secret: '' })
return public_client
}
function authedClient() {
if (!authed_client) {
if (!conf.hitbtc || !conf.hitbtc.key || (!conf.hitbtc.key as any) === '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 })
}
return authed_client
}
function publicClient () {
if (!public_client) public_client = new ccxt.hitbtc2({ 'apiKey': '', 'secret': '' })
return public_client
}
function authedClient() {
if (!authed_client) {
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 })
}
return authed_client
}