Skip to content

Releases: tiagosiebler/bybit-api

Fix error handler for failed API requests

21 Jan 08:57
c75b7b2

Choose a tag to compare

Small fix to the error handler when API requests fail.

TypeScript, browser support, loose types

26 Dec 18:09
9e5f1cb

Choose a tag to compare

See #45 for details. This was a major transition from a pureJS library into one that is loosely typed, at least as a first iteration.

npm install bybit-api@1.3.1

Copied from the pull request:

Changelog

Summary

  • Introduce typescript declarations. API methods are typed including optional parameters. Resolves #18.
  • Introduce webpack, although not published to npm yet. TODO: log issue to trim bundle size.
  • Deprecate assert() calls. This caused a nuisance when API parameter requirements changed.
  • Fix browser websocket support. Resolves #33.
  • Organise API methods per API documentation, including the categories also used in official documentation.
  • Mark deprecated API methods.

Breaking Changes

These changes were enforced by bybit:

  • getActiveOrder() uses deprecated endpoint. Use getActiveOrderList() instead.
    • Requires symbol param. Otherwise it's the same.
  • getPositions() uses deprecated endpoint. Use getPosition() instead.

Deprecations

These are a consequence of module improvements:

  • getPublicTradingRecords() deprecated. Use getTrades() instead.
    • Same params & response.
  • getPublicLiquidations() deprecated. Use getLiquidations() instead.
    • Same params & response.
  • getLatestInformation() deprecated. Use getTickers() instead.
    • Same params & response.
  • changeUserLeverage() deprecated. Use setUserLeverage() instead.
    • Same params & response.

Replace deprecated HTTP request library with modern standard. Proxy support.

08 Oct 07:54
df57640

Choose a tag to compare

The primary goal was to transition to axios, since the npm module request is both deprecated and carries a ton of dependency baggage. This version does not change any high level functionality, ensuring no integration changes are required to upgrade to this release.

Difference in dependency baggage

Screenshot 2020-10-14 at 09 57 39

As well as a smaller memory footprint, an additional bonus of this adoption of axios is support for proxied requests as well as other customizations to how HTTP requests are made by the library. See the axios request config for a detailed list of options.

Action Required to Upgrade

None

Summary

  • replace the deprecated npm request module with the much lighter axios module. Resolves #4.
  • bump websocket connectivity dependency to latest version.
  • validated #12 is not an issue.
  • misc refactoring & cleaning.