github tiagosiebler/bybit-api v2.0.0
Linear USDT Support

latest releases: v4.3.1, v4.3.0, v4.2.7...
4 years ago

See #75 for details. This primarily introduces support for the Linear USDT APIs and WebSockets, although two minimal changes were introduced to how the existing inverse client (previously RestClient) is imported and when websockets start connecting.

npm install bybit-api@2.0.0

Changelog

Summary

  • Introduced LinearClient as the abstraction for all available Linear USDT Rest APIs.
  • Enhanced WebSocket Client to support multiple linear websockets (public & private).
    • To use linear websockets make a new instance of the Websocket-Client, passing the constructor option "linear: true".
  • Removed deprecated API methods abandoned in December 2020.
  • Renamed exported RestClient to InverseClient. Implementation remains unchanged.

Breaking Changes

This release only has one major change affecting existing usage.

  • Rename dexported RestClient to InverseClient. Implementation remains unchanged.

Simply rename any existing RestClient import to continue using Inverse Rest APIs.

Behavioural Changes

The following are not expected to cause any issues but are a notable change in behaviour:

  • Previously the Websocket Client automatically opens a websocket connection as soon as it is instanced.
    • As of version 2.0.0 (this release), websocket connections are automatically opened as soon as any topics are subscribed to.
    • If needed, manually trigger websocket connection attempts before subscribing to a topic using the websocketClient.connectAll() method. See Websocket-Client.ts for details.

Don't miss a new bybit-api release

NewReleases is sending notifications on new releases.