Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User requested an account-locked subscription but no authorization was provided #13

Open
thecao365 opened this issue Dec 25, 2018 · 1 comment

Comments

@thecao365
Copy link

Help me

r00t@ubuntu:~/crypto-trading-bot$ node index.js trade
body-parser deprecated undefined extended: provide extended option modules/http.js:43:25
Webserver listening on: 127.0.0.1:8080
(node:2504) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
(node:2504) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined
    at new Hmac (internal/crypto/hash.js:88:11)
    at Object.createHmac (crypto.js:133:10)
    at BitmexTestnet.syncPositionViaRestApi (/home/r00t/crypto-trading-bot/exchange/bitmex.js:685:32)
    at f (/home/r00t/crypto-trading-bot/exchange/bitmex.js:91:20)
    at BitmexTestnet.start (/home/r00t/crypto-trading-bot/exchange/bitmex.js:94:14)
    at activeExchanges.forEach.activeExchange (/home/r00t/crypto-trading-bot/modules/exchange/exchange_manager.js:35:66)
    at Array.forEach (<anonymous>)
    at ExchangeManager.init (/home/r00t/crypto-trading-bot/modules/exchange/exchange_manager.js:35:25)
    at Object.boot (/home/r00t/crypto-trading-bot/modules/services.js:110:35)
    at Object.<anonymous> (/home/r00t/crypto-trading-bot/index.js:10:10)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2504) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2504) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined
    at new Hmac (internal/crypto/hash.js:88:11)
    at Object.createHmac (crypto.js:133:10)
    at BitmexTestnet.syncOrdersViaRestApi (/home/r00t/crypto-trading-bot/exchange/bitmex.js:728:32)
    at f (/home/r00t/crypto-trading-bot/exchange/bitmex.js:92:20)
    at BitmexTestnet.start (/home/r00t/crypto-trading-bot/exchange/bitmex.js:94:14)
    at activeExchanges.forEach.activeExchange (/home/r00t/crypto-trading-bot/modules/exchange/exchange_manager.js:35:66)
    at Array.forEach (<anonymous>)
    at ExchangeManager.init (/home/r00t/crypto-trading-bot/modules/exchange/exchange_manager.js:35:25)
    at Object.boot (/home/r00t/crypto-trading-bot/modules/services.js:110:35)
    at Object.<anonymous> (/home/r00t/crypto-trading-bot/index.js:10:10)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
WebSocket [INFO]: Connected.
Bitmex: Connection opened.
{"op":"subscribe","args":"tradeBin1m:XBTUSD"}
{"op":"subscribe","args":"tradeBin5m:XBTUSD"}
{"op":"subscribe","args":"tradeBin1h:XBTUSD"}
{"op":"subscribe","args":"instrument:XBTUSD"}
{"op":"subscribe","args":"order:*"}
{"op":"subscribe","args":"position:*"}
WebSocket [INFO]: Connected.
Bitmex: Connection opened.
{"op":"subscribe","args":"tradeBin1m:ADAZ18"}
{"op":"subscribe","args":"tradeBin5m:ADAZ18"}
{"op":"subscribe","args":"tradeBin1h:ADAZ18"}
{"op":"subscribe","args":"instrument:ADAZ18"}
{"op":"subscribe","args":"tradeBin1m:TRXZ18"}
{"op":"subscribe","args":"tradeBin5m:TRXZ18"}
{"op":"subscribe","args":"tradeBin1h:TRXZ18"}
{"op":"subscribe","args":"instrument:TRXZ18"}
{"op":"subscribe","args":"tradeBin1m:XRPZ18"}
{"op":"subscribe","args":"tradeBin5m:XRPZ18"}
{"op":"subscribe","args":"tradeBin1h:XRPZ18"}
{"op":"subscribe","args":"instrument:XRPZ18"}
{"op":"subscribe","args":"order:*"}
{"op":"subscribe","args":"position:*"}
User requested an account-locked subscription but no authorization was provided.
{"message":"Bitmex: error\"User requested an account-locked subscription but no authorization was provided.\"","level":"error","timestamp":"2018-12-25T10:28:06.636Z"}
User requested an account-locked subscription but no authorization was provided.
{"message":"Bitmex: error\"User requested an account-locked subscription but no authorization was provided.\"","level":"error","timestamp":"2018-12-25T10:28:06.651Z"}
{"message":"Bitfinex: error: Error: auth failed: apikey: digest invalid (FAILED)","level":"error","timestamp":"2018-12-25T10:28:12.239Z"}
{"message":"Mailer: {\"errno\":\"ECONNREFUSED\",\"code\":\"ECONNECTION\",\"syscall\":\"connect\",\"address\":\"125.235.4.59\",\"port\":465,\"command\":\"CONN\"}","level":"error","timestamp":"2018-12-25T10:28:26.624Z"}
Trade module: warmup done; starting ticks
(node:2504) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at instances.symbols.filter (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:91)
    at Array.filter (<anonymous>)
    at TickListener.onTick (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:32)
    at EventEmitter.eventEmitter.on (/home/r00t/crypto-trading-bot/modules/trade.js:132:29)
    at EventEmitter.emit (events.js:182:13)
    at Timeout.setInterval [as _onTimeout] (/home/r00t/crypto-trading-bot/modules/trade.js:81:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:2504) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at instances.symbols.filter (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:91)
    at Array.filter (<anonymous>)
    at TickListener.onTick (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:32)
    at EventEmitter.eventEmitter.on (/home/r00t/crypto-trading-bot/modules/trade.js:132:29)
    at EventEmitter.emit (events.js:182:13)
    at Timeout.setInterval [as _onTimeout] (/home/r00t/crypto-trading-bot/modules/trade.js:81:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:2504) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined
    at new Hmac (internal/crypto/hash.js:88:11)
    at Object.createHmac (crypto.js:133:10)
    at BitmexTestnet.syncPositionViaRestApi (/home/r00t/crypto-trading-bot/exchange/bitmex.js:685:32)
    at Timeout.f [as _onTimeout] (/home/r00t/crypto-trading-bot/exchange/bitmex.js:91:20)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:2504) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined
    at new Hmac (internal/crypto/hash.js:88:11)
    at Object.createHmac (crypto.js:133:10)
    at BitmexTestnet.syncOrdersViaRestApi (/home/r00t/crypto-trading-bot/exchange/bitmex.js:728:32)
    at Timeout.f [as _onTimeout] (/home/r00t/crypto-trading-bot/exchange/bitmex.js:92:20)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:2504) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at instances.symbols.filter (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:91)
    at Array.filter (<anonymous>)
    at TickListener.onTick (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:32)
    at EventEmitter.eventEmitter.on (/home/r00t/crypto-trading-bot/modules/trade.js:132:29)
    at EventEmitter.emit (events.js:182:13)
    at Timeout.setInterval [as _onTimeout] (/home/r00t/crypto-trading-bot/modules/trade.js:81:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
(node:2504) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at instances.symbols.filter (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:91)
    at Array.filter (<anonymous>)
    at TickListener.onTick (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:32)
    at EventEmitter.eventEmitter.on (/home/r00t/crypto-trading-bot/modules/trade.js:132:29)
    at EventEmitter.emit (events.js:182:13)
    at Timeout.setInterval [as _onTimeout] (/home/r00t/crypto-trading-bot/modules/trade.js:81:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
(node:2504) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at instances.symbols.filter (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:91)
    at Array.filter (<anonymous>)
    at TickListener.onTick (/home/r00t/crypto-trading-bot/modules/listener/tick_listener.js:98:32)
    at EventEmitter.eventEmitter.on (/home/r00t/crypto-trading-bot/modules/trade.js:132:29)
    at EventEmitter.emit (events.js:182:13)
    at Timeout.setInterval [as _onTimeout] (/home/r00t/crypto-trading-bot/modules/trade.js:81:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:2504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)

@rabinage
Copy link

rabinage commented Jul 9, 2019

Got the same error "TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined" when trying to trade on Bitmex testnet

Found out this was missing in conf.json under exchanges:
"bitmex_testnet": { "key": "<API_KEY>", "secret": "<API_SECRET> }

Haehnchen pushed a commit that referenced this issue Jan 18, 2020
Bumps [telegraf](https://github.com/telegraf/telegraf) from 3.34.1 to 3.35.0.
- [Release notes](https://github.com/telegraf/telegraf/releases)
- [Commits](https://github.com/telegraf/telegraf/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants