-
-
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
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.
feat(): added/updated types with latest documentation changes
…ges in api docs
Published a small beta release:
|
feat(): added new Earn REST endpoints
Published a small beta release:
Unless any issues are discovered, this is most likely the final beta release before the major release goes live. |
Published a small beta release:
Unless any issues are discovered, this is most likely the final beta release before the major release goes live. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final self-review complete. Awaiting CI/CD checks.
Released
The release is now live, as of v4.0.0 on npm. Like/retweet/follow the announcement on X:
https://x.com/quantSDKs/status/1896897683526222318
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.sendWSAPIRequest(WS_KEY_MAP.v5PrivateTrade, command, parameters)
method to send WS API requests. See examples/ws-api-promises.ts for examples.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.fetchTimeOffsetBeforeAuth
.await
when subscribing to topics:promiseSubscribeRequests
in the WS client configuration.Additional Information
Self todo notes