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.therock ({'apiKey': '', 'secret': '' })
return public_client
}
function authedClient() {
if (!authed_client) {
if (!conf.therock || !conf.therock.key || (!conf.therock.key as any) === 'YOUR-API-KEY') {
throw new Error('please configure your TheRockTrading credentials in ' + path.resolve(__dirname, 'conf.js'))
}
authed_client = new ccxt.therock({ apiKey: conf.therock.key, secret: conf.therock.secret })
}
return authed_client
}
function authedClient() {
if (!authed_client) {
if (!conf.therock || !conf.therock.key || !conf.therock.key === 'YOUR-API-KEY') {
throw new Error('please configure your TheRockTrading credentials in ' + path.resolve(__dirname, 'conf.js'))
}
authed_client = new ccxt.therock ({ 'apiKey': conf.therock.key,'secret': conf.therock.secret })
}
return authed_client
}
function publicClient() {
if (!public_client) public_client = new ccxt.therock({ apiKey: '', secret: '' })
return public_client
}