SDK Releases & Updates
Combined release feed across all JavaScript SDK GitHub repositories, sorted by most recent. Navigate our most recent SDK releases, updates, and changelogs in one place. Filter by SDK to view specific release notes and stay up-to-date with the latest features and improvements.
Last refresh:
Showing releases 1 to 49 of 49 for Bybit JavaScript SDK. Page 1 of 1.
What's Changed
- fix(v4.8.6): Fix DCP product OPTIONS parameter by @JJ-Cro in bybit-api PR #586
- Introducing a new dedicated documentation page for our Bybit JavaScript & Node.js SDK
- Powered by our rich request & response types.
- Detailed examples for the leading JavaScript & Node.js runtimes, included but not limited to Node, JavaScript, TypeScript, React, Vite, Next.js, iOS & Android (via React Native), Bun, Deno and Cloudflare Workers. These fully tested quickstart guides include everything needed to make full use of Bybit's REST APIs & WebSockets with any leading JavaScript runtime.
Full Changelog: bybit-api compare v4.8.5...v4.8
What's Changed
- feat(v4.8.5): add fixed-rate borrow and corporate action endpoints by @JJ-Cro in bybit-api PR #584
Full Changelog: bybit-api compare v4.8.4...v4.8
What's Changed
- feat(v4.8.3): add instrument summary endpoint, split execTypes and spot min order docs by @JJ-Cro in bybit-api PR #580
- chore: update logo, readme, bump pinned versions by @tiagosiebler in bybit-api PR #581
- feat(v4.8.4): add V5 referral endpoints by @JJ-Cro in bybit-api PR #582
Full Changelog: bybit-api compare v4.8.2...v4.8
What's Changed
- feat(v4.8.2): add reviewP2PSellerCancelOrderApply by @JJ-Cro in bybit-api PR #577
Full Changelog: bybit-api compare v4.8.1...v4.8
What's Changed
- feat(v4.7.10): update endpoints for auto savings, tax export, option base coins, and delay liquidation by @JJ-Cro in bybit-api PR #575
- feat(v4.8.0): add auto savings, tax export, option base coins, and delay liquidation by @tiagosiebler in bybit-api PR #576
- Bumped minor version to accommodated changes around how HTTP request building works to accommodate difference in the serialisation mechanic for one earn endpoint (without breaking other endpoints). Extensive tests to freeze existing capabilities.
- chore(4.8.1) Removed fussy release workflow guard that keeps interrupting release with false alarms.
Full Changelog: bybit-api compare v4.8.0...v4.8
What's Changed
- feat(v4.7.10): update endpoints for auto savings, tax export, option base coins, and delay liquidation by @JJ-Cro in bybit-api PR #575
- feat(v4.8.0): add auto savings, tax export, option base coins, and delay liquidation by @tiagosiebler in bybit-api PR #576
- Bumped minor version to accommodated changes around how HTTP request building works to accommodate difference in the serialisation mechanic for one earn endpoint (without breaking other endpoints). Extensive tests to freeze existing capabilities.
Full Changelog: bybit-api compare v4.7.9...v4.8
What's Changed
- feat(v4.7.9): add p2p chat endpoints for bybit rest api by @tiagosiebler in bybit-api PR #574
Context
Add the following endpoints to the REST client:
- getP2PChatSessions() - List P2P chat sessions with cursor pagination and read-status filtering.
- getP2PChatSessionId() - Get the encrypted chat session ID for a counterparty.
- sendP2PChatMessage() - Send a message in a P2P chat session.
- getP2PChatMessages() - List P2P chat messages, newest first.
Full Changelog: bybit-api compare v4.7.8...v4.7
What's Changed
- feat(v4.7.8): add p2p chat endpoints for bybit rest api by @tiagosiebler in bybit-api PR #573
Context
Add the following endpoints to the REST client:
- getP2PChatSessions() - List P2P chat sessions with cursor pagination and read-status filtering.
- getP2PChatSessionId() - Get the encrypted chat session ID for a counterparty.
- sendP2PChatMessage() - Send a message in a P2P chat session.
- getP2PChatMessages() - List P2P chat messages, newest first.
Full Changelog: bybit-api compare v4.7.7...v4.7
What's Changed
- chore: tutorial metadata tweak by @tiagosiebler in bybit-api PR #571
- feat(v4.7.7): add Event Contract REST and WebSocket APIs plus liquidity mining reinvest by @JJ-Cro in bybit-api PR #572
Full Changelog: bybit-api compare v4.7.6...v4.7
What's Changed
- feat(v4.7.6): expand Bybit API & WebSocket regional routing & docs by @tiagosiebler in bybit-api PR #570
Details
- REST regional domain corrections and additions
- REST and WebSocket
siteIdsupport - Top-level WebSocket
apiRegion, with nested fallback - Documented regional WebSocket routing
- Automatic Hong Kong headers
- README, quickstart,
llms.txt, and examples - Successful TypeScript, lint, header, and live WebSocket checks
EU, NL, UAE, and bytick intentionally use the global WebSocket stream by design.
Full Changelog: bybit-api compare v4.7.5...v4.7
What's Changed
- feat(v4.7.5): link package docs to Siebly pages by @tiagosiebler in bybit-api PR #568
- Bybit QuickStart Guide: Bybit JavaScript Getting Started
- Bybit Tutorial Bybit JavaScript & Node.js Tutorial
Full Changelog: bybit-api compare v4.7.4...v4.7
What's Changed
- fix: point readme template wiki URLs to sieblyio by @JJ-Cro in bybit-api PR #564
- chore(): README.md template sections by @tiagosiebler in bybit-api PR #566
- feat(v4.7.4): sync V5 changelog since July with Spot-X, inventory, RFQ details, and regional access by @JJ-Cro in bybit-api PR #567
Full Changelog: bybit-api compare v4.7.3...v4.7
What's Changed
- fix: git url after siebly repo migration by @tiagosiebler in bybit-api PR #563
Full Changelog: bybit-api compare v4.7.2...v4.7
What's Changed
- fix(v4.7.2, #561): Add DCP and other category private topics to isPrivateTopic detection
- chore: update readme links by @tiagosiebler in bybit-api PR #562
Full Changelog: bybit-api compare v4.7.1...v4.7
What's Changed
- chore(): upgrade GitHub Actions to setup-node v7 and checkout v6 by @JJ-Cro in bybit-api PR #557
- fix(v4.7.1, #558): ws v7 dependency WS_ERR_TOO_MANY_BUFFERED_PARTS side effect, chore: remove bundle analyser, fix: return type by @tiagosiebler in bybit-api PR #559
Full Changelog: bybit-api compare v4.7.0...v4.7
What's Changed
- chore: update readme with docs link by @JJ-Cro in bybit-api PR #551
- feat(v4.6.6): add Alpha LP and Prediction market APIs with corresponding request types and examples by @JJ-Cro in bybit-api PR #553
- chore(v4.7.0): bump build version to LTS node v24. bump deps post audit. by @tiagosiebler in bybit-api PR #554
Full Changelog: bybit-api compare v4.6.4...v4.7
What's Changed
- chore: update quickstart guide to latest by @tiagosiebler in bybit-api PR #547
- chore(v4.6.4): move build toolchain to devDependencies (fixes default-install bloat) by @tamasPetki in bybit-api PR #549
New Contributors
- @tamasPetki made their first contribution in bybit-api PR #549
Full Changelog: bybit-api compare v4.6.3...v4.6
What's Changed
- refactor: update import statements to ES6 syntax across multiple API documentation files by @JJ-Cro in bybit-api PR #542
- feat: add tutorial by @tiagosiebler in bybit-api PR #544
- feat(v4.6.3): add new PWM investment plan APIs and examples by @JJ-Cro in bybit-api PR #546
Full Changelog: bybit-api compare v4.6.2...v4.6
Bybit API changelog catch-up (~Apr-Jun 2026). Types + RestClientV5 methods + apidoc examples where we had HTTP samples.
Breaking / watch out
FiatBybitPaydropped fromPermissionsV5/ApiKeyPermissionsV5(useFiatBitPay)EarnPositionV5.availableAmount+freezeDetailsare required in types now (API returns them)CoinInfoV5.chains[].withdrawMaxadded;remainAmountstill typed but deprecated
Type updates (existing endpoints)
- Position -
openTimeonPositionV5+WSPositionV5 - Instruments -
symbolIdon spot / linear / inverse / option;InstrumentSymbolTypeV5(stock,forex, etc.) - Affiliate user info -
paySendAmount30Day,payFtt,cardFtt; request paramscoin,business - Fixed loan supply -
availableSourceon create;refundedAccounton cancel supply - Earn position -
availableAmount,freezeDetails[]
New - Strategy (/v5/strategy/*)
createStrategyOrder- twap / chaseOrder / iceberg / povgetStrategyListgetStrategyOrderListstopStrategy
New - Hold to Earn (/v5/earn/hold-to-earn/*)
getHoldToEarnAirdropProducts- public, no authgetHoldToEarnAirdropYieldHistory- needs Earn permission
New - PWM investment plan (user)
getPwmInvestmentPlanList-GET .../investment-plan/listgetPwmInvestmentPlanDetailgetPwmPendingInvestmentPlanDetail-.../new-planclaimPwmWithdrawableFundsgetPwmInvestmentPlanAssetTrendgetPwmFundHistoricalNavsubscribePwmInvestmentPlaninvestMorePwmInvestmentPlanredeemPwmInvestmentPlangetPwmInvestmentPlanOrders
New - PWM customize plan
getPwmSubscribableProductInfo- publiccreatePwmCustomizeInvestmentPlan
New - PWM asset manager
getPwmAllFundssettlePwmFundProfitcreatePwmFundcreatePwmAssetManagerInvestmentPlangetPwmAssetManagerInvestmentPlans- not the same as usergetPwmInvestmentPlanListmanagePwmAssetManagerInvestmentPlangetPwmAllFundOrdersmanagePwmFundOrder- approve/rejectcreatePwmFundSubAccountpwmFundTransfer- custodian sub-account keygetPwmFundTransferRecords
Affiliate
getAffiliateSubAffiliateList-GET /v5/affiliate/affiliate-sub-list
New modules
src/types/request|response/v5-strategy.tssrc/types/request|response/v5-earn-pwm.ts
Examples (examples/apidoc/)
V5/Strategy/*(4)V5/Earn/get-hold-to-earn-*(2)V5/Earn/PWM/*(23)V5/Affiliate/get-affiliate-sub-affiliate-list.js
Other
docs/endpointFunctionList.mdregeneratedllms.txtregenerated- version bump
4.6.2->4.6.3
What's Changed
- feat(v4.6.2): add new API endpoints for Alpha Trade, Card, and Earn fe… by @JJ-Cro in bybit-api PR #540
- chore: minor test updates & lockfile bumps by @tiagosiebler in bybit-api PR #541
Full Changelog: bybit-api compare v4.6.1...v4.6
What's Changed
- feat(v4.6.1): Add API endpoints and changes from release notes by @JJ-Cro in bybit-api PR #535
- chore: bump dependencies after npm audit, update readme by @tiagosiebler in bybit-api PR #536
- add readme references to new quickstart guide on using the Bybit REST API JavaScript SDK
Full Changelog: bybit-api compare v4.6.0...v4.6
What's Changed
- Upgrades to WebSocket architecture, aligned with other SDKs by @tiagosiebler in bybit-api PR #533
The WebSocket client architecture saw many improvements with the newer SDKs. This PR cleans up some of the tech debt, bringing this in line with the other SDKs. Less differences -> easier long-term maintainability:
- Bump audit dependencies
- Add wsUrl & WS ref to open & reconnected events
- Normalise internal emittable event structure handling via safer getFinalEmittable normaliser
- Add authPrivateConnectionsOnConnect mechanic
- Normalise internal logger category, optional WS API Auth flag
- Normalise internal WS behaviour flags
- Add internal requireConnectionReady & useNativeHeartbeats flags
- Integrate custom reconnection hook mechanic.
Full Changelog: bybit-api compare v4.5.3...v4.6
What's Changed
- chore(v4.5.3): add readme migration notice by @tiagosiebler in bybit-api PR #530
Full Changelog: bybit-api compare v4.5.2...v4.5
What's Changed
- feat: add examples for RSA authentication and faster HMAC signing in Bybit API client; enhance demo trading functionality with WebSocket and REST examples by @JJ-Cro in bybit-api PR #526
- refactor: reorganize example files and enhance type definitions; update WebSocket event handling with type annotations by @JJ-Cro in bybit-api PR #527
- feat(v4.5.2):enhance isDeepObjectMatch function for recursive object c… by @JJ-Cro in bybit-api PR #528
Full Changelog: bybit-api compare v4.5.1...v4.5
What's Changed
- feat(v4.5.1): add new API endpoints for crypto loans and fiat trading, enhance existing functionality with new examples and documentation updates by @JJ-Cro in bybit-api PR #525
Full Changelog: bybit-api compare v4.5.0...v4.5
What's Changed
- feat(v4.5.0): add support for Bybit EU REST APIs. feat: add support for other regional REST API domains by @tiagosiebler in bybit-api commit 05f0092
- chore: enhance WSClientConfigurableOptions to support additional WebSocket and HTTP client options by @JJ-Cro in bybit-api PR #521
- chore(): README.md template sections by @tiagosiebler in bybit-api PR #524
Full Changelog: bybit-api compare v4.4.5...v4.5
What's Changed
- [Snyk] Upgrade axios from 1.12.2 to 1.13.2 by @tiagosiebler in bybit-api PR #515
- fix(v5-trade.ts): add basePrice property by @posokhin in bybit-api PR #517
- chore(): README.md template sections by @tiagosiebler in bybit-api PR #519
- fix(v4.4.5, #518, #516): add missing basePrice property for spot orders, fix return type for getP2POrderMessages by @tiagosiebler in bybit-api PR #520
New Contributors
- @posokhin made their first contribution in bybit-api PR #517
Full Changelog: bybit-api compare v4.4.4...v4.4
What's Changed
- feat(v4.4.4): add missing funding cap ws ticker properties by @tiagosiebler in bybit-api PR #513
Full Changelog: bybit-api compare v4.4.3...v4.4
What's Changed
- feat(v4.4.3): new crypto loan endpoints for renewing borrow orders and an additional response field for USDT pre-market contracts. by @JJ-Cro in bybit-api PR #511
- [Snyk] Upgrade axios from 1.12.1 to 1.12.2 by @tiagosiebler in bybit-api PR #495
- chore(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 in the npm_and_yarn group across 1 directory by @dependabot[bot] in bybit-api PR #506
- [Snyk] Upgrade webpack-bundle-analyzer from 4.3.0 to 4.10.2 by @tiagosiebler in bybit-api PR #507
Summary
- Update Bybit V5 API client to support the latest release notes from 2025-11-25 and 2025-11-27. This includes new crypto loan endpoints for renewing borrow orders and an additional response field for USDT pre-market contracts.
- Market Data Updates (2025-11-25)
- Get Instruments Info: Added skipCallAuction?: boolean field
- Get Account Instruments Info: Inherited skipCallAuction field
- Crypto Loan - Fixed Loan (2025-11-27)
- Added two new endpoints for renewing fixed crypto loans:
- Market Data Updates (2025-11-25)
Full Changelog: bybit-api compare v4.4.2...v4.4
What's Changed
- feat(v4.4.2): Update full release notes since 1st October by @JJ-Cro in bybit-api PR #504
Market Data APIs
- Get Tickers (Linear/Inverse): Added new response fields
basisRateYear,fundingIntervalHour, andfundingCapfor enhanced funding rate information
Account APIs
- Get Transaction Log: Added optional
transSubTypeparameter to filter transaction logs by sub-type (e.g., "movePosition" for Move Position logs)
Spot Margin Trade (UTA) APIs - New Endpoints
-
Manual Borrow (
POST /v5/account/borrow): New endpoint for UTA manual borrow operations- Added
ManualBorrowParamsV5request type - Added
ManualBorrowResultV5response type
- Added
-
Get Max Borrowable Amount (
GET /v5/spot-margin-trade/max-borrowable): New endpoint to query maximum borrowable amount for a currency- Added
GetMaxBorrowableAmountParamsV5request type - Added
MaxBorrowableAmountV5response type
- Added
-
Get Position Tiers (
GET /v5/spot-margin-trade/position-tiers): New endpoint to get loan position risk information- Added
GetPositionTiersParamsV5request type - Added
PositionTierV5andCurrencyPositionTiersV5response types
- Added
-
Get Coin State (
GET /v5/spot-margin-trade/coinstate): New endpoint to get currency leverage information- Added
GetCoinStateParamsV5request type - Added
CoinStateV5response type
- Added
-
Get Available Amount to Repay (
GET /v5/spot-margin-trade/repayment-available-amount): New endpoint to query available amount for repayment- Added
GetAvailableAmountToRepayParamsV5request type - Added
AvailableAmountToRepayV5response type
- Added
-
Manual Repay Without Asset Conversion (
POST /v5/account/no-convert-repay): New endpoint for manual repayment without asset conversion- Added
ManualRepayWithoutConversionParamsV5request type - Added
ManualRepayWithoutConversionResultV5response type - Note: Repayment is prohibited between 04:00 and 05:30 per hour
- Added
Spot Margin Trade - Updated Endpoints
- Set Leverage (
POST /v5/spot-margin-trade/set-leverage): Enhanced to support optionalcurrencyparameter for setting leverage by currency- Added
SetSpotMarginLeverageParamsV5type - Maintains backward compatibility
- Added
Code Quality Improvements
- Get Affiliate User List: Extracted inline type definition to proper exported interface
GetAffiliateUserListParamsV5for better type reusability and maintainability
Type Definitions
- All new request and response types are properly exported from their respective type definition files
- Types are fully documented with JSDoc comments where applicable
- All changes maintain backward compatibility
Full Changelog: bybit-api compare v4.4.1...v4.4
Previously running a JSON.stringify call within the WebsocketAPIClient exception handler could in rare circumstances lead to a circular reference. This handles that scenario in a safer way.
What's Changed
- feat: beta release mechanic by @tiagosiebler in bybit-api PR #498
- fix(v4.4.1-beta.0): improved guard for missing web crypto api by @tiagosiebler in bybit-api PR #499
- chore: remove duplicate release trigger by @tiagosiebler in bybit-api PR #500
- revert(#499): web crypto api guard by @tiagosiebler in bybit-api PR #501
- chore(4.4.1): Update wsapi error handling, bump version by @JJ-Cro in bybit-api PR #503
Full Changelog: bybit-api compare v4.4.0...v4.4
What's Changed
- feat: beta release mechanic by @tiagosiebler in bybit-api PR #498
fix(v4.4.1-beta.0): improved guard for missing web crypto apiby @tiagosiebler in bybit-api PR #499-
- ^ was reverted
Full Changelog: bybit-api compare v4.4.0...v4.4.1 beta
What's Changed
- fix(v4.4.0): Integrate request build & sign for p2p uploads, fixes #493 by @tiagosiebler in bybit-api PR #497
Full Changelog: bybit-api compare v4.3.2...v4.4
What's Changed
- feat(v4.3.2): add rate limit, rpi orderbook & adl endpoints by @JJ-Cro in bybit-api PR #492
- Add a new response field cumFeeDetail to return trading fee details instead of cumExecFee (resolves #491)
Full Changelog: bybit-api compare v4.3.1...v4.3
What's Changed
- feat(v4.3.1): add new endpoints for limit price behavior and new delivery price by @JJ-Cro in bybit-api PR #485
- feat(v4.3.1): add new endpoints for limit price behavior and new deli… by @JJ-Cro in bybit-api PR #489
Full Changelog: bybit-api compare v4.3.0...v4.3
Summary
Disabled by default to prevent any breaking changes. Enable it by passing this boolean in the REST client constructor:
const client = new RestClientV5({
key: key,
secret: secret,
throwExceptions: true,
});
Any retCode !== 0 response will be thrown in full, if enabled.
What's Changed
- feat(#437): add config to throw REST API exceptions automatically by @tiagosiebler in bybit-api PR #483
Full Changelog: bybit-api compare v4.2.7...v4.3
What's Changed
- feat(v4.2.7): force ws request batching into groups of max 500 topics per batch by @tiagosiebler in bybit-api PR #479
Full Changelog: bybit-api compare v4.2.6...v4.2
- Fixes deduping workflow introduced in previous release
Full Changelog: bybit-api compare v4.2.5...v4.2
What's Changed
- fix(v4.2.5, #477): automatically dedupe topic requests if already subscribed by @tiagosiebler in bybit-api PR #478
This provides convenience in calling the subscribe method, where it will only emit subscribe events to bybit for the topics that haven't been subscribed to yet, preventing the scenario in #477 (which will cause non-duplicate topic subs to fail)
Full Changelog: bybit-api compare v4.2.4...v4.2
What's Changed
- feat(v4.2.4): add full support for RFQ endpoints by @JJ-Cro in bybit-api PR #474
- feat(v4.2.4): add full support for RFQ endpoints by @tiagosiebler in bybit-api PR #475
Full Changelog: bybit-api compare v4.2.3...v4.2
What's Changed
Transitioned the release workflow to a token-less trusted publisher workflow, for a more secure way to publish new releases to npm.
Historic Changelog
Note: these are since the last "release" / tag on GitHub.
- Batch sub/unsubscribe to topics for spot v3 by @tiagosiebler in bybit-api PR #176
- fix(shared/types):
max_leveragetypo by @iam4x in bybit-api PR #180 - v3.1.0: fix typo in types (#180), fix tests, fix repeating subscribe/unsubscribe WS events to active connections by @tiagosiebler in bybit-api PR #182
- missing unifiedPrivate in WS_AUTH_ON_CONNECT_KEYS by @twxia in bybit-api PR #183
- chore(): fix changed test error code by @tiagosiebler in bybit-api PR #184
- feat(#187, v3.1.2): add support for new orderCategory param for spotv3 by @tiagosiebler in bybit-api PR #188
- v3.1.3: fix(#187) rare signature failure for spotv3 GET with parameters by @tiagosiebler in bybit-api PR #190
- v3.2.0: Contract V3 REST & WebSocket Clients. Improve websocket reconnection resilience by @tiagosiebler in bybit-api PR #196
- update tests for copy trading client by @tiagosiebler in bybit-api PR #197
- v3.3.0: fix rare sign error when using cursors in private unified margin API calls. expand unified margin response types. expand tests. by @tiagosiebler in bybit-api PR #198
- v3.3.1: fix(#199) wrong endpoint for contract.getOpenInterestLimitInfo by @tiagosiebler in bybit-api PR #201
- missing api by @JustMankus in bybit-api PR #203
- v3.3.2: feat(#203) add execution history list endpoint for linear by @tiagosiebler in bybit-api PR #204
- new param Type for getHistoryTradeRecordsRequest. by @JustMankus in bybit-api PR #205
- v3.3.4: fix optional param in contract client, add js/ts samples for contract client, fix e2e open interest limit test, update readme by @tiagosiebler in bybit-api PR #208
- v3.3.5: fix typo in contract endpoint order request interfaces by @tiagosiebler in bybit-api PR #209
- v3.3.6: add response type for contract ticker by @tiagosiebler in bybit-api PR #210
- v3.3.7: fix nesting in contract list result type by @tiagosiebler in bybit-api PR #211
- fix contract symbol ticker response typo by @tiagosiebler in bybit-api PR #212
- v3.3.9: fix copy trading close order endpoint. add ws log for topic sub request. add example for rest copy closing. by @tiagosiebler in bybit-api PR #216
- v3.3.10: fix(#220): correctly detecting usdc pairs for unified perp ws market by @tiagosiebler in bybit-api PR #221
- Bump json5 from 2.1.3 to 2.2.3 by @dependabot[bot] in bybit-api PR #215
- Bump loader-utils from 2.0.0 to 2.0.4 by @dependabot[bot] in bybit-api PR #200
- v3.4.0: feat(#219) add support for account asset v3 REST endpoints by @tiagosiebler in bybit-api PR #223
- string type error in createSubAPIKeyRequest by @mlake in bybit-api PR #225
- v3.4.1: fix(#225) fix typos in account asset v3 client by @tiagosiebler in bybit-api PR #226
- v3.4.2: fix() missing property from linear client set trading stop method by @tiagosiebler in bybit-api PR #229
- v3.5.0: RestClientV5 with end-to-end tests by @tiagosiebler in bybit-api PR #224
- v3.5.1: Support for V5 WebSockets by @tiagosiebler in bybit-api PR #230
- v3.5.2: feat() add missing v5 internal deposit records endpoint. fix(#233) return type for v5 wallet balance endpoint, fix(#232) timestamp resolution for v5 fetch time endpoint by @tiagosiebler in bybit-api PR #234
- fix(#240): fix sign error on parallel requests due to pointer mutation by @tiagosiebler in bybit-api PR #241
- Support triggerPrice in ContractModifyOrderRequest by @sangnv-ptit in bybit-api PR #242
- v3.5.4: feat(#242) add request param to contract replace order endpoint by @tiagosiebler in bybit-api PR #243
- v3.5.5: fix() add missing wallet balance response type properties by @tiagosiebler in bybit-api PR #245
- v3.5.6, feat(#249): add 10-per-event limiter to spot v5 subscriptions, chore(): enable trailing comma linting rule by @tiagosiebler in bybit-api PR #250
- Add syncTimeBeforePrivateRequests option by @Tindtily in bybit-api PR #247
- v3.5.7: feat(#247) add optional flag to sync time before every api call by @tiagosiebler in bybit-api PR #252
- v3.5.8: feat() easier env-controlled HTTP traces. Add missing properties for asset v5 types. by @tiagosiebler in bybit-api PR #254
- chore(): update tests for compatibility with new testing sub account by @tiagosiebler in bybit-api PR #262
- #218 Returning a promise when subscribing to topic(s) by @caiusCitiriga in bybit-api PR #256
- build(deps-dev): bump webpack from 5.13.0 to 5.76.0 by @dependabot[bot] in bybit-api PR #239
- v3.6.0: feat(#218, #256) returning a promise when subscribing by @tiagosiebler in bybit-api PR #263
- feat(): add copy trading ws topic example by @tiagosiebler in bybit-api PR #265
- v3.7.0: add missing v5 endpoints, add new tpsl request/response v3 & v5 parameters, add rest api samples for docs by @tiagosiebler in bybit-api PR #267
- v3.7.1: chore() naming consistency for interface, pass through logger for ws url getter by @tiagosiebler in bybit-api PR #273
- v3.7.2: fix() response type for v5 open interest endpoint by @tiagosiebler in bybit-api PR #283
- fix(#286): automatic type determination for instrument info by @ThijMau in bybit-api PR #287
- v3.7.3: feat(#286) improved type flowing for instrument info v5 by @tiagosiebler in bybit-api PR #288
- v3.7.4: feat(#251, #291) add optional endpoint rate limit parsing, add deprecation warnings for v1/v2 rest clients, improve v5 types, bump dependencies by @tiagosiebler in bybit-api PR #293
- v3.7.5: fix() optional properties in AccountOrderV5 response interface by @tiagosiebler in bybit-api PR #294
- v3.7.6: feat() update batch order types & categories by @tiagosiebler in bybit-api PR #295
- feat(types): adds WSAccountOrderEventV5 & WSAccountOrderV5 interfaces by @caiusCitiriga in bybit-api PR #300
- type fixing by @t0chk in bybit-api PR #302
- Minor docs updates, add recv window for ws client by @tiagosiebler in bybit-api PR #304
- v3.8.0: Safer WS timer cleanup & teardown, add proxy/rate limits example, docs... by @tiagosiebler in bybit-api PR #306
- v3.8.1: feat() add type guard and type for ws orderbook events by @tiagosiebler in bybit-api PR #309
- v3.8.2: feat(#310) add set collateral coin endpoints by @tiagosiebler in bybit-api PR #311
- v3.9.0: Upgrades to dependencies (axios, node build version, typescript, jest, etc) by @tiagosiebler in bybit-api PR #312
- v3.9.1: feat(user): add methods to delete submember by @ThijMau in bybit-api PR #314
- v3.9.2: fix(#315) orderbook level type by @tiagosiebler in bybit-api PR #316
- Add
marketUnitoptional property toOrderParamsV5interface by @will2022 in bybit-api PR #317 - v3.9.4: feat() update test & publish actions, update public ws example, disable test for deprecated endpoint by @tiagosiebler in bybit-api PR #318
- v3.9.5: chore() add permissions needed for provenance generation by @tiagosiebler in bybit-api PR #319
- v3.9.6: feat(#322) add nextPageCursor type via generic by @tiagosiebler in bybit-api PR #323
- v3.9.7: feat(#324) add new account order v5 properties by @tiagosiebler in bybit-api PR #325
- v3.9.8: Updated V5
InstrumentInfotypes by @Mnjongen in bybit-api PR #330 - chore(): remove UM tests covering dead endpoints, fix v5 test by @tiagosiebler in bybit-api PR #331
- v3.10.0: feat() add v5 demo trading by @tiagosiebler in bybit-api PR #334
- v3.10.1: fix(#333) v5 time endpoint by @tiagosiebler in bybit-api PR #335
- v3.10.2: Added and updated V5 types. Added type guards. by @will2022 in bybit-api PR #338
- v3.10.3: feat(#340) fix pass-through headers for proxying via nginx. add second proxy example. by @tiagosiebler in bybit-api PR #343
- v3.10.4: Introduce
getSubAccountAllApiKeys, updatedeleteSubApiKeyby @karimsan in bybit-api PR #346 - v3.10.5: Update
UpdateApiKeyParamsV5by @karimsan in bybit-api PR #347 - v3.10.6: chore() readme & logo updates, fix() bump dependencies by @tiagosiebler in bybit-api PR #348
- chore(): update license by @tiagosiebler in bybit-api PR #352
- feat(): Added all missing endpoints by @JJ-Cro in bybit-api PR #350
- v3.10.9: chore() bump dependencies, fix() strict test, chore() run linter by @tiagosiebler in bybit-api PR #353
- v3.10.10: feat() Update type
AccountMarginModeV5and interfaceCollateralInfoV5by @karimsan in bybit-api PR #354 - v3.10.11: fix() deprecated endpoints (copy trading & unified margin client) by @JJ-Cro in bybit-api PR #357
- v3.10.12: feat() Add convert endpoints, convert examples, small updates to request/response types by @JJ-Cro in bybit-api PR #359
- chore(): deprecate unified margin private test by @tiagosiebler in bybit-api PR #360
- v3.10.13: feat() add updated withdraw request params by @tiagosiebler in bybit-api PR #362
- fix(): Comma/semicolon fix in params by @JJ-Cro in bybit-api PR #364
- feat(): Added endpoint, updated types by @JJ-Cro in bybit-api PR #366
- v3.10.15: feat(): updated missing examples and endpoints by @JJ-Cro in bybit-api PR #367
- v3.10.16: feat(): added missing API examples, deprecated abandoned functions by @JJ-Cro in bybit-api PR #369
- v3.10.17: chore() update dependencies, feat() add apiRegion config for changing regional API URL by @tiagosiebler in bybit-api PR #370
- v3.10.18: feat(#368) add config for HTTP keep alive via axios by @tiagosiebler in bybit-api PR #371
- feat(): added automatic Readme actions by @JJ-Cro in bybit-api PR #373
- chore(): README.md template sections by @tiagosiebler in bybit-api PR #376
- chore(): cleaned up old tests by @JJ-Cro in bybit-api PR #377
- feat(): added new endpoints by @JJ-Cro in bybit-api PR #378
- feat(): extend demo trading sample to include more ws logic by @tiagosiebler in bybit-api PR #379
- feat(): added Crypto Loan endpoints by @JJ-Cro in bybit-api PR #381
- feat(): added links to endpoint map by @JJ-Cro in bybit-api PR #382
- feat(): added latency check, updated example by @JJ-Cro in bybit-api PR #384
- feat(#385): updated createSubAPIKey params to match docs by @JJ-Cro in bybit-api PR #386
- chore(): marked clients for deprecation by @JJ-Cro in bybit-api PR #387
- fix(type): fixed #391 by @soranoo in bybit-api PR #392
- fix(): failing tests, failing eslint configuration, chore(): run linter by @tiagosiebler in bybit-api PR #393
- fix(types): add missing 'mmDeduction' prop to RiskLimitV5 by @fireflies1988 in bybit-api PR #394
- v3.10.27 feat(): updated request params by @JJ-Cro in bybit-api PR #395
- v3.10.28 feat(): added new endpoints, updated examples by @JJ-Cro in bybit-api PR #401
- feat(): added nextPageCursor example by @JJ-Cro in bybit-api PR #403
- fix(): updated test parameters so it can pass by @JJ-Cro in bybit-api PR #404
- fix(): adjusted type definitions for instruments endpoint by @LanPRD in bybit-api PR #406
- Fix submit order example by @tiagosiebler in bybit-api PR #408
- v3.10.30: add missing WSExecutionV5 execPnl property. Bump npm audit dependency. by @tiagosiebler in bybit-api PR #410
- fix(v3.10.31, #411): demo trading wss should only be used for private topics. by @tiagosiebler in bybit-api PR #412
- feat(v3.10.32): add params for GetDeliveryRecord, fixed e2e tests by @JJ-Cro in bybit-api PR #415
- chore(): fix env vars for test split by @tiagosiebler in bybit-api PR #416
- feat(3.10.33): Updated return types for getSubDepositAddress, createUniversalTransfer and createInternalTransfer by @JJ-Cro in bybit-api PR #418
- feat(): added/updated types with latest documentation changes by @JJ-Cro in bybit-api PR #419
- feat(): added new Earn REST endpoints by @JJ-Cro in bybit-api PR #420
- feat(v3.10.34): added slippage tolerance types to order endpoints by @JJ-Cro in bybit-api PR #421
- fix(v3.11.0): ensure private GET requests use serialised/encoded params appended to URL. Update slippage tolerance type to optional. by @tiagosiebler in bybit-api PR #422
- v4.0.0: WebSocket API, WebsocketClient upgrades, decommission deprecated v1-v3 API groups by @tiagosiebler in bybit-api PR #398
- fix(v4.0.1, #425): fix WSOrderbookEventV5 type definition. Bump dependencies. by @tiagosiebler in bybit-api PR #426
- feat(v4.1.0): Add full support for P2P trading, Add suffix to recent Earn types (minor breaking change) by @JJ-Cro in bybit-api PR #429
- chore(v4.1.1): update travel rule request params by @JJ-Cro in bybit-api PR #430
- feat(v4.1.2): added websocket types for all topics by @JJ-Cro in bybit-api PR #431
- feat(v4.1.3): full support for demo endpoints by @JJ-Cro in bybit-api PR #432
- fix(types): change response v5-asset CoinInfoV5.name by @zororaka00 in bybit-api PR #433
- feat(v4.1.4): full spread trading support by @JJ-Cro in bybit-api PR #434
- feat(v4.1.5): updated latency check to look at absolute values, fixed batch order responses, updated new endpoints by @tiagosiebler in bybit-api PR #439
- chore(v4.1.6): updated post to postPrivate for getP2POnlineAds by @JJ-Cro in bybit-api PR #440
- feat(v4.1.7): fast execution topics should use authenticated stream by @tiagosiebler in bybit-api PR #442
- fix typo by @batrudinych in bybit-api PR #443
- feat(): added bybit wsapi client all functions by @JJ-Cro in bybit-api PR #445
- feat(): added wsapiclient examples, updated endpoint map, updated lin… by @JJ-Cro in bybit-api PR #446
- feat(v4.1.8): introduce websocket API client wrapper, chore(): misc typo fixes & cleaning by @tiagosiebler in bybit-api PR #444
- feat(v4.1.9): new ws topic, updated response and request types by @JJ-Cro in bybit-api PR #449
- Update README.md by @JJ-Cro in bybit-api PR #451
- feat(4.1.10): add new WSTickerOptionV5 and WSTickerSpotV5 interfaces for enhanced websocket event handling by @JJ-Cro in bybit-api PR #453
- feat(v4.1.11): add preCheckOrder method with corresponding types and example usage, add txId and Id to deposit records by @JJ-Cro in bybit-api PR #454
- feat(v4.1.12): added new endpoints,new ws topic updated types for existing endpoints, added examples for new endpoints, updated endpoint map, bumped version by @JJ-Cro in bybit-api PR #457
- chore(v4.1.13): bump dependency. Update readme with rate limits note. by @tiagosiebler in bybit-api PR #459
- feat(v4.1.14): Add new fields to response types for account, position, execution, spread trading, and websocket events. by @JJ-Cro in bybit-api PR #460
- chore(v4.1.15): marked removed functions for deprecation, updated tests by @JJ-Cro in bybit-api PR #461
- feat(v4.1.16): add keepAlive, add lint script, edit lint errors by @JJ-Cro in bybit-api PR #462
- feat(v4.1.17): update dependencies and ESLint configuration, fix all linter errors by @JJ-Cro in bybit-api PR #463
- chore(): update readme by @tiagosiebler in bybit-api PR #467
- feat(v4.2.0): RSA, llm.txt, bump dependencies by @JJ-Cro in bybit-api PR #466
- feat(v4.2.0): RSA, llm.txt, bump dependencies by @tiagosiebler in bybit-api PR #468
- feat(v4.2.1): added new crypto loan endpoints and examples, updates types by @JJ-Cro in bybit-api PR #470
- [Snyk] Upgrade axios from 1.8.3 to 1.10.0 by @tiagosiebler in bybit-api PR #469
- feat(v4.2.2): add webcryptoapi support check and update readme, bump axios by @JJ-Cro in bybit-api PR #471
- chore():Update GitHub Actions workflow for NPM publishing by @JJ-Cro in bybit-api PR #472
- chore(): bump version to 4.2.3 in package.json and package-lock.json by @JJ-Cro in bybit-api PR #473
New Contributors
- @iam4x made their first contribution in bybit-api PR #180
- @twxia made their first contribution in bybit-api PR #183
- @JustMankus made their first contribution in bybit-api PR #203
- @mlake made their first contribution in bybit-api PR #225
- @sangnv-ptit made their first contribution in bybit-api PR #242
- @Tindtily made their first contribution in bybit-api PR #247
- @caiusCitiriga made their first contribution in bybit-api PR #256
- @ThijMau made their first contribution in bybit-api PR #287
- @t0chk made their first contribution in bybit-api PR #302
- @will2022 made their first contribution in bybit-api PR #317
- @Mnjongen made their first contribution in bybit-api PR #330
- @karimsan made their first contribution in bybit-api PR #346
- @JJ-Cro made their first contribution in bybit-api PR #350
- @soranoo made their first contribution in bybit-api PR #392
- @fireflies1988 made their first contribution in bybit-api PR #394
- @LanPRD made their first contribution in bybit-api PR #406
- @zororaka00 made their first contribution in bybit-api PR #433
- @batrudinych made their first contribution in bybit-api PR #443
Full Changelog: bybit-api compare v3.0.1...v4.2
For an up to date list of releases and updates, refer to:
- Closed Pull Requests: bybit-api on GitHub
- NPM: bybit api on npm
The above links are the best place to stay up to date on the latest releases for this SDK.
Node.js connector for the Bybit APIs and WebSockets:
- Complete integration with all bybit APIs.
- TypeScript support (with type declarations for most API requests & responses).
- Over 300 integration tests making real API calls & WebSocket connections, validating any changes before they reach npm.
- Robust WebSocket integration with configurable connection heartbeats & automatic reconnect then resubscribe workflows.
- Browser support (via webpack bundle - see "Browser Usage" below).
This major release introduces 6 new REST clients and hundreds of integration tests. The bybit-api npm connector now supports all REST API and WebSocket categories, including the very recently added unified margin and copy trading categories.
REST APIs
Each REST API group has a dedicated REST client. To avoid confusion, here are the available REST clients and the corresponding API groups:
| Class | Description |
|---|---|
| InverseClient | Inverse Perpetual Futures (v2) APIs |
| LinearClient | USDT Perpetual Futures (v2) APIs |
| InverseFuturesClient | Inverse Futures (v2) APIs |
| USDCPerpetualClient | USDC Perpetual APIs |
| USDCOptionClient | USDC Option APIs |
| UnifiedMarginClient | Derivatives (v3) unified margin APIs |
| SpotClientV3 | Spot Market (v3) APIs |
| Spot Market (v1) APIs | |
| AccountAssetClient | Account Asset APIs |
| CopyTradingClient | Copy Trading APIs |
| WebsocketClient | All WebSocket Events (Public & Private for all API categories) |
Examples for using each client can be found in:
- the examples folder.
- the awesome-crypto-examples repository.
If you're missing an example, you're welcome to request one. Priority will be given to github sponsors.
WebSockets
For WebSockets, all API groups can be used via a shared WebsocketClient. However, to listen to multiple API groups at once, you will need to make one WebsocketClient instance per API group (for now).
The WebsocketClient can be configured to a specific API group using the market parameter. These are the currently available API groups:
| API Category | Market | Description |
|---|---|---|
| Unified Margin - Options | market: 'unifiedOption' | The derivatives v3 category for unified margin. Note: public topics only support options topics. If you need USDC/USDT perps, use unifiedPerp instead. |
| Unified Margin - Perps | market: 'unifiedPerp' | The derivatives v3 category for unified margin. Note: public topics only support USDT/USDC perpetual topics - use unifiedOption if you need public options topics. |
| Futures v2 - Inverse Perps | market: 'inverse' | The inverse v2 perps category. |
| Futures v2 - USDT Perps | market: 'linear' | The USDT/linear v2 perps category. |
| Futures v2 - Inverse Futures | market: 'inverse' | The inverse futures v2 category uses the same market as inverse perps. |
| Spot v3 | market: 'spotv3' | The spot v3 category. |
| Spot v1 | market: 'spot' | The older spot v1 category. Use the spotv3 market if possible, as the v1 category does not have automatic re-subscribe if reconnected. |
| Copy Trading | market: 'linear' | The copy trading category. Use the linear market to listen to all copy trading topics. |
| USDC Perps | market: 'usdcPerp | The USDC perps category. |
| USDC Options | market: 'usdcOption' | The USDC options category. |
Check the readme for an example. More examples will be added in the future, and will be found in the following locations:
- the examples folder.
- the awesome-crypto-examples repository (note, these will be updated shortly).
Issues & Discussion
- Issues? Check the issues tab.
- Discuss & collaborate with other node devs? Join our Node.js Algo Traders engineering community on telegram.
Breaking Changes
While I have tried to avoid any breaking changes as much as possible, I have decided to accept some as part of this major release as an opportunity for improvement. If you notice any other breaking changes not listed below, please let me know.
REST Clients
- The
SpotClientis now deprecated in favour of the newSpotClientV3(which uses the newer v3 spot APIs). - The
keyparameter has been moved into the restOptions object. - The
secretparameter has been moved into the restOptions object. - The
useLivenetparameter has been renamed totestnetand moved into the restOptions object. - The REST clients now connect to the live environment by default, unless
testnet: trueis provided inrestOptions.
All REST clients now accept only two parameters:
constructor(
restOptions: RestClientOptions = {},
networkOptions: AxiosRequestConfig = {}
)
API credentials are passed into the first parameter.
disable_time_synchas been removed from the rest client options, since time sync is now disabled by default.- To re-enable time sync, use
enable_type_sync: truein the rest options object parameter.
Websocket-Client
- The WS client now connects to the live environment by default, unless
testnet: trueis provided in the ws client options. - The
marketparameter is now required in the ws client config. It tells the websocket client which websocket URL to use, since there's variation between spotv1, spotv3, futures, unified margin and other markets. Check theAPIMarketunion type for a list of possible values (which your IDE should also be able to show, if you're using typescript). - Constant parameters such as
wsKeySpotPublichave been grouped under aWS_KEY_MAPobject.- The WsKey values remain the same, with some new additions.
- If you were using the exported constant (e.g. wsKeySpotPublic), you will need to update your code to use
WS_KEY_MAP.spotPublicinstead. - If you were using the spot market, the
spotv3market is very much recommended (it supports automatic re-subscribe if the connection drops & reconnects)
- The
livenetparameter has been deprecated in favour oftestnet: boolean. - The websocket client now connects to livenet by default. If you want to use testnet, include the parameter
testnet: truein your client options.- This is consistent with my other api connectors, which connect to livenet by default.
- In future, the REST clients will also connect to the live environment by default.
Summary
This expands the library to support the spot REST & Websocket APIs.
npm install bybit-api@2.1.0
Deprecation Notices
The WebSocket client now accepts a new parameter for market.
This should be used instead of the boolean linear parameter, which will be removed in a future release. Check the readme for examples.
Changelog
- Fix inversed secondary URLs (#106)
- Add support for Spot APIs (#99)
Summary
This adds the missing mode/switch APIs for the inverse client, see #98 for details. This also significantly reduces the size of the webpack bundle for use in web browsers, see #59 for details.
npm install bybit-api@2.0.5
Changelog
- Add API to set position mode (hedge)
- Add API to set SL/TP partial/full mode.
- Add API to set margin type.
- Significant reduction in webpack bundle size.
Summary
See #83 for details. This adds support for Inverse Futures REST endpoints, currently only available for quarterly BTC futures on testnet.
npm install bybit-api@2.0.3
Changelog
- Introduce a new REST client:
InverseFuturesClient. Resolves #82. - Update & clean readme.
- Add missing
trailing_stopparameter for inverse clientsetTradingStop().
Changelog
See #80 for details. This fixes a pass-through parameter to pass a custom base URL in the REST constructors.
npm install bybit-api@2.0.1
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
RestClienttoInverseClient. Implementation remains unchanged.
Breaking Changes
This release only has one major change affecting existing usage.
- Rename dexported
RestClienttoInverseClient. 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.
- As of version
Small fix to the error handler when API requests fail.
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.
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
<img width="1047" alt="Screenshot 2020-10-14 at 09 57 39" src="https://user-images.githubusercontent.com/14090872/95967098-c5bb2880-0e03-11eb-8d93-cbfde97183ae.png">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.
- huge reduction in module footprint (see step to 1.2.0): bundlephobia.com result
- expose request options in constructor, allowing proxy support (among other settings)
- bump websocket connectivity dependency to latest version.
- validated #12 is not an issue.
- misc refactoring & cleaning.