Comments (8)
Great. Good luck with your deadlines. 🍀
from coinbase-pro-node.
Hey, can you show me your code? I will try to reproduce this problem on my machine.
from coinbase-pro-node.
Please have look at the source code. In this latest version I unsubscribe and subscribe again when it closes and opens. I have been testing this and see how it goes.
Thanks for helping me out.
from coinbase-pro-node.
Ok, I already see some issues here:
- You cannot use
this.client.ws.unsubscribe
when receiving aWebSocketEvent.ON_CLOSE
event because the WebSocket is closed so theunsubscribe
message cannot be send through the WebSocket anymore - You still do
await this.client.ws.connect
butconnect
is not aPromise
anymore since v1.6.0 - You don't have to call
client.ws.subscribe([this.channel])
afterthis.client.ws.connect
because you are doing this already in yourWebSocketEvent.ON_OPEN
handler - I am not sure if
this.client.ws.subscribe
is necessary on everyWebSocketEvent.ON_OPEN
, I would guess you only need to do it for the very firstON_OPEN
, can you confirm?
from coinbase-pro-node.
I had the issue even before adding 1.
, 3.
and 4.
One commit before the latest commit.
from coinbase-pro-node.
I updated the code based on 2.
and cleaned up 1.
, 3.
and 4.
. Let me run again and see how it goes. I also want to do some debugging so I can give you reason(s) why it happens.
Edited:
While I was writing this comment it happened again and I had to restart the program. I tend to thing that this is mostly Coinbase Pro server issue, but I don't know yet.
from coinbase-pro-node.
Hey @baloian, thanks for your intensive testing. You can test against the official coinbase-pro library. It is deprecated but should still be able to connect to the WebSocket. If the problem also shows up with their library, then it tends to be a server issue.
from coinbase-pro-node.
That is a good idea. I will come back to testing in 2 weeks probably as I have some deadlines on my work.
from coinbase-pro-node.
Related Issues (20)
- Can't figure out this 400 Error HOT 3
- Thanks! HOT 4
- Websocket example implementation needs to be updated? HOT 2
- Sorry newb here and at my wits end
- Should ws.subscribe() be marked async and await sendMessage()? HOT 2
- Having trouble accessing listCoinBaseAccounts() HOT 10
- Support conversion (USDC -> USD)
- wrong candlesticks data HOT 3
- Portfolio commission
- Maybe update docs for passing channels? HOT 1
- Add ability to generate wallet addresses HOT 2
- Q: onopen does not trigger for authenticated socket in container HOT 2
- Fix code scanning alert - Polynomial regular expression used on uncontrolled data HOT 1
- granularity for websockets HOT 1
- Unable to recreate order book with l2 data
- Coinbase Advanced Trade API support
- Wallet Endpoint - AvailableBalance interface HOT 2
- Is getPaymentMethods() typing broken? (PaymentMethod Interface) HOT 7
- Is TransferInformation Interface Incorrect? HOT 2
- Coinbase Pro doesn't exist (tutorial) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coinbase-pro-node.