Hi.
I'm trying to test PancakeSwap bot but I'm stuck with this error. Couldn't find answer anywehere yet so maybe someone can help me. I've created Ankr Api, copied wss websocket adress to the code but get this error:
Error: Unexpected server response: 401
at ClientRequest. (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:580:7)
at ClientRequest.emit (events.js:376:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted 'error' event on WebSocket instance at:
at abortHandshake (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:698:15)
at ClientRequest. (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:580:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
I have the same problem, please does anyone know?
How do we add our username/password credentials to the ankr api request?