Closed nick-allen closed 4 years ago
Similar behavior when trying to use the Bitfinex feed
Logs
2017-10-01T05:16:17.082Z - info: Creating new Websocket connection to wss://api2.bitfinex.com:3000/ws
2017-10-01T05:16:17.694Z - debug: Connection to wss://api2.bitfinex.com:3000/ws has been established.
2017-10-01T05:16:17.694Z - debug: Sending {"event":"subscribe","channel":"ticker","pair":"btcusd"} message to WS server
2017-10-01T05:16:17.695Z - debug: Sending {"event":"subscribe","channel":"trades","pair":"btcusd"} message to WS server
2017-10-01T05:16:17.695Z - debug: Sending {"event":"subscribe","freq":"F0","channel":"book","pair":"btcusd","len":"250"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","channel":"ticker","pair":"ethusd"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","channel":"trades","pair":"ethusd"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","freq":"F0","channel":"book","pair":"ethusd","len":"250"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","channel":"ticker","pair":"ltcusd"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","channel":"trades","pair":"ltcusd"} message to WS server
2017-10-01T05:16:17.696Z - debug: Sending {"event":"subscribe","freq":"F0","channel":"book","pair":"ltcusd","len":"250"} message to WS server
/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:371
callback(null, messageBuffer);
^
TypeError: Cannot read property 'isValidUTF8' of undefined
at /app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:532:28
at Receiver.applyExtensions (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:371:5)
at /app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:508:14
at Receiver.flush (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:347:3)
at Receiver.finish (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:541:12)
at Receiver.expectHandler (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:499:31)
at Receiver.add (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/Receiver.js:103:24)
at TLSSocket.realHandler (/app/node_modules/gdax-trading-toolkit/node_modules/ws/lib/WebSocket.js:825:20)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
With Bittrex
2017-10-01T05:18:45.395Z - debug: Connection to wss://socket.bittrex.com/signalr has been established.
TypeError: Cannot read property 'Nounce' of undefined
at BittrexFeed.processSnapshot (/app/node_modules/gdax-trading-toolkit/src/exchanges/bittrex/BittrexFeed.ts:223:28)
at client.call.done (/app/node_modules/gdax-trading-toolkit/src/exchanges/bittrex/BittrexFeed.ts:64:56)
at callCallbacks.(anonymous function) (/app/node_modules/signalr-client/signalR.js:429:6)
at handleCallResult (/app/node_modules/signalr-client/signalR.js:436:11)
at WebSocketConnection.<anonymous> (/app/node_modules/signalr-client/signalR.js:748:7)
at emitOne (events.js:115:13)
at WebSocketConnection.emit (events.js:210:7)
at WebSocketConnection.processFrame (/app/node_modules/websocket/lib/WebSocketConnection.js:547:26)
at /app/node_modules/websocket/lib/WebSocketConnection.js:321:40
at _combinedTickCallback (internal/process/next_tick.js:131:7)
Are you using ts-node? If not, try this:
npm -g ts-node typescript
ts-node tutorials/t001_feeds.ts
If you are, what version of ts-node? My versions are:
I was able to get this working using vanilla javascript. Try building the script one part at a time, instead of copy/paste, and make sure the individual parts work before everything is in the script. If you're familiar with javascript it's easy to 'convert' it from ts.
Hi, we are closing out PRs + Issues as this project is being archived.
gdax-tt 0.1.16 node 8.3.0 typescript 2.5.3
Script pulled from example doc https://coinbase.github.io/gdax-tt/gtt_tutorials_feed.html#the-basics
Logs