-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
WIP WS API #398
base: master
Are you sure you want to change the base?
WIP WS API #398
Conversation
… add promisified WS workflows, feat(): add WS API integration
…th caveat described in PR)
…t custom sign function
…avaScript/TypeScript. Update type flowing and docs for stricter types.
… Remove deprecated V1-V3 support. WS upgrades.
Who wants to help stress test the latest Bybit SDK? I have been heavily testing on the go, and the automated tests are still all passing without any code change, but this next phase is important. The latest changes (including the REST-like WS API integration) are now available as a beta release:
You can test on testnet and/or demo trading if preferred. Even if you only test really simple things, the more testing the better - higher chance of catching any accidental mistakes. Everything should work as it did before, even after upgrading to the beta release. Except for the few breaking changes I’ve documented in the PR, there should be no code change necessary to upgrade to this release. Impact of the few breaking changes should (hopefully) be relatively tiny: If you notice any breaking changes I have not documented, or you’re not sure about a behaviour, please let me know - I’d rather double check something than risk missing it. Even if you try it out and don’t notice any issues, please let me know - helps to know it’s been tested successfully! Even just a simple 👍 on the PR or comment would be great. As always, you can ping me here, or in the telegram community, or drop me a private message on telegram. |
Public Beta
The public beta release is now available on npm.
Summary
This major release brings major upgrades to the Node.js, TypeScript & JavaScript SDK for Bybit's REST APIs and WebSockets.
Key points, with further details below:
Major Changes
Auth/Performance (REST & WS)
customSignMessageFn()
parameter to WebsocketClient and RestClientV5.examples/fasterHmacSign.ts
example for a demonstration on using the faster node crypto createHmac function instead (same behaviour as before this upgrade).WebsocketClient
market
setting in the constructor is now optional.market
is specified, it will usev5
by default.Breaking Changes
REST Clients
WebsocketClient
subscribeV3
andunsubscribeV3
methods. The V3 (& older) WebSockets have been deprecated for a while now.DefaultLogger
methods.trace
|info
|error
.silly
level before this release, thetrace
level is disabled/silent by default.WSConnectedResult
, instead of the raw WebSocket.fetchTimeOffsetBeforeAuth
.await
when subscribing to topics:Additional Information
Self todo notes