TypeScript, browser support, loose types
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.