-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
v4.0.0: WebSocket API, WebsocketClient upgrades, decommission deprecated v1-v3 API groups #398
base: master
Are you sure you want to change the base?
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. |
Hello everyone, friendly reminder if you’re using the Node.js bybit-api SDK for Bybit, would appreciate any help you can provide in testing the latest beta version before the next major release! Even the simplest testing, even on testnet, would help - this is the last push to catch any issues that might have slipped through the cracks. Bonus appreciation if you can help stress test the latest upgrades to the WebsocketClient. Subscribe to tons of topics. Mess around with your network. Even better if you can try out the WS API. More info here: #398 (comment) |
…ly resolve demo trading url for private topics
Published two key updates:
|
…ion" to avoid unhandled exceptions
… are disabled by default.
Published a small beta release:
|
feat(): added/updated types with latest documentation changes
…ges in api docs
Published a small beta release:
|
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
Error
instance, and with the use of promises internally, this can lead to nasty unhandled exceptions that are difficult to trace and very difficult to handle properly.error
event will throw a type error if you try to use it. See WebsocketClient.on("error") event throws type error "Argument of type '(data: any) => void' is not assignable to parameter of type 'never'" #413.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.The "req_id" property shown in ws responses now has an incremental ID value used to uniquely identify individual requests.fetchTimeOffsetBeforeAuth
.await
when subscribing to topics:promiseSubscribeRequests
in the WS client configuration.Additional Information
Self todo notes