From d66e8628c8557e46953a3914f4a5a3e5fc7be620 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Tue, 4 Aug 2026 11:26:45 +0100 Subject: [PATCH] fix(v4.7.2, #561): Add DCP and other category private topics to isPrivateTopic detection, chore: update readme links --- README.md | 28 +++++++------- package-lock.json | 56 +++++++++++++-------------- package.json | 2 +- src/util/websockets/websocket-util.ts | 35 +++++++++++++++-- 4 files changed, 75 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index f90c5995..c6c75d0b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # Node.js & JavaScript SDK for Bybit REST API, WebSocket API & WebSocket Events -[![Build & Test](https://github.com/tiagosiebler/bybit-api/actions/workflows/e2etest.yml/badge.svg?branch=master)](https://github.com/tiagosiebler/bybit-api/actions/workflows/e2etest.yml) +[![Build & Test](https://github.com/sieblyio/bybit-api/actions/workflows/e2etest.yml/badge.svg?branch=master)](https://github.com/sieblyio/bybit-api/actions/workflows/e2etest.yml) [![npm version](https://img.shields.io/npm/v/bybit-api)][1] [![npm size](https://img.shields.io/bundlephobia/min/bybit-api/latest)][1] [![npm downloads](https://img.shields.io/npm/dt/bybit-api)][1] -[![last commit](https://img.shields.io/github/last-commit/tiagosiebler/bybit-api)][1] -[![CodeFactor](https://www.codefactor.io/repository/github/tiagosiebler/bybit-api/badge)](https://www.codefactor.io/repository/github/tiagosiebler/bybit-api) +[![last commit](https://img.shields.io/github/last-commit/sieblyio/bybit-api)][1] +[![CodeFactor](https://www.codefactor.io/repository/github/sieblyio/bybit-api/badge)](https://www.codefactor.io/repository/github/sieblyio/bybit-api) [![Telegram](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/nodetraders) -[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/tiagosiebler/bybit-api) +[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/sieblyio/bybit-api)

- - SDK Logo + + SDK Logo

@@ -21,7 +21,7 @@ [1]: https://www.npmjs.com/package/bybit-api > [!TIP] -> Upcoming change: As part of the [Siebly.io](https://siebly.io/) brand, this SDK will soon be hosted under the [Siebly.io GitHub organisation](https://github.com/sieblyio). The migration is seamless and requires no user changes. +> Upcoming change: As part of the [Siebly.io](https://siebly.io/) brand, this SDK is now hosted under our [Siebly.io GitHub organisation](https://github.com/sieblyio). The migration is seamless and requires no user changes. Professional Node.js, JavaScript & TypeScript SDK for the Bybit REST APIs, WebSocket APIs & WebSocket Events: @@ -32,7 +32,7 @@ Professional Node.js, JavaScript & TypeScript SDK for the Bybit REST APIs, WebSo - All qualified API requests made with this SDK are automatically subject to significantly higher rate limits. - Rate limits are raised to 400 requests per second, higher than the highest VIP tier. - No action required. This is automatic for any API calls made with this SDK, for any user. - - Read more in the announcement: [here](https://github.com/tiagosiebler/bybit-api/issues/458). + - Read more in the announcement: [here](https://github.com/sieblyio/bybit-api/issues/458). - Lower minimum order notional value with this SDK!\* - Place orders with a notional value as low as $1. - Lower than the default minimum notional order value $5. @@ -113,7 +113,7 @@ Professional Node.js, JavaScript & TypeScript SDK for the Bybit REST APIs, WebSo ## Issues & Discussion -- Issues? Check the [issues tab](https://github.com/tiagosiebler/bybit-api/issues). +- Issues? Check the [issues tab](https://github.com/sieblyio/bybit-api/issues). - Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram. - Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/sieblyio) @@ -138,7 +138,7 @@ Check out our JavaScript/TypeScript/Node.js SDKs & Projects: - [OrderBooks Node.js: orderbooks](https://www.npmjs.com/package/orderbooks) - [Crypto Exchange Account State Cache: accountstate](https://www.npmjs.com/package/accountstate) - Check out my examples: - - [awesome-crypto-examples Node.js](https://github.com/tiagosiebler/awesome-crypto-examples) + - [awesome-crypto-examples Node.js](https://github.com/sieblyio/awesome-crypto-examples) ## Documentation @@ -165,7 +165,7 @@ The SDK is written in TypeScript, but fully compatible with both TypeScript and Examples for using each client can be found in: - the [examples](./examples) folder. -- the [awesome-crypto-examples](https://github.com/tiagosiebler/awesome-crypto-examples) repository. +- the [awesome-crypto-examples](https://github.com/sieblyio/awesome-crypto-examples) repository. If you're missing an example, you're welcome to request one. Priority will be given to [github sponsors](https://github.com/sponsors/tiagosiebler). @@ -224,7 +224,7 @@ const restClientOptions = { /** * Enable keep alive for REST API requests (via axios). - * See: https://github.com/tiagosiebler/bybit-api/issues/368 + * See: https://github.com/sieblyio/bybit-api/issues/368 */ // keepAlive: true, @@ -683,7 +683,7 @@ This file contains AI optimised structure of all the functions in this package, ## Used By -[![Repository Users Preview Image](https://dependents.info/tiagosiebler/bybit-api/image)](https://github.com/tiagosiebler/bybit-api/network/dependents) +[![Repository Users Preview Image](https://dependents.info/sieblyio/bybit-api/image)](https://github.com/sieblyio/bybit-api/network/dependents) --- @@ -723,6 +723,6 @@ Contributions are encouraged, I will review any incoming pull requests. See the ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/bybit-api,tiagosiebler/okx-api,tiagosiebler/binance,tiagosiebler/bitget-api,tiagosiebler/bitmart-api,tiagosiebler/gateio-api,tiagosiebler/kucoin-api,tiagosiebler/coinbase-api,tiagosiebler/orderbooks,tiagosiebler/accountstate,tiagosiebler/awesome-crypto-examples&type=Date)](https://star-history.com/#tiagosiebler/bybit-api&tiagosiebler/okx-api&tiagosiebler/binance&tiagosiebler/bitget-api&tiagosiebler/bitmart-api&tiagosiebler/gateio-api&tiagosiebler/kucoin-api&tiagosiebler/coinbase-api&tiagosiebler/orderbooks&tiagosiebler/accountstate&tiagosiebler/awesome-crypto-examples&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=sieblyio/bybit-api,sieblyio/okx-api,sieblyio/binance,sieblyio/bitget-api,sieblyio/htx-api,sieblyio/gateio-api,sieblyio/kucoin-api,sieblyio/coinbase-api,sieblyio/orderbooks,sieblyio/accountstate,sieblyio/awesome-crypto-examples&type=Date)](https://star-history.com/#sieblyio/bybit-api&sieblyio/okx-api&sieblyio/binance&sieblyio/bitget-api&sieblyio/htx-api&sieblyio/gateio-api&sieblyio/kucoin-api&sieblyio/coinbase-api&sieblyio/orderbooks&sieblyio/accountstate&sieblyio/awesome-crypto-examples&Date) diff --git a/package-lock.json b/package-lock.json index 9fb9db15..d900dc7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "4.7.1", + "version": "4.7.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "4.7.1", + "version": "4.7.2", "license": "MIT", "dependencies": { "@types/ws": "^8.18.1", @@ -1732,9 +1732,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", - "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -2224,13 +2224,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", - "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz", + "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", + "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } @@ -2300,9 +2300,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", - "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -3316,9 +3316,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "dev": true, "funding": [ { @@ -8240,9 +8240,9 @@ }, "dependencies": { "brace-expansion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", - "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -8611,12 +8611,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", - "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz", + "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==", "requires": { "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", + "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } @@ -8673,9 +8673,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", - "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -9376,9 +9376,9 @@ "dev": true }, "fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "dev": true }, "fastest-levenshtein": { diff --git a/package.json b/package.json index c0ef7f0b..bf462e86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "4.7.1", + "version": "4.7.2", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/util/websockets/websocket-util.ts b/src/util/websockets/websocket-util.ts index bb34b98c..7d95a660 100644 --- a/src/util/websockets/websocket-util.ts +++ b/src/util/websockets/websocket-util.ts @@ -41,11 +41,13 @@ const PRIVATE_TOPICS = [ 'outboundAccountInfo', 'executionReport', 'ticketInfo', + // copy trading apis 'copyTradePosition', 'copyTradeOrder', 'copyTradeExecution', 'copyTradeWallet', + // usdc options 'user.openapi.option.position', 'user.openapi.option.trade', @@ -54,34 +56,61 @@ const PRIVATE_TOPICS = [ 'user.service', 'user.openapi.greeks', 'user.mmp.event', + // usdc perps 'user.openapi.perp.position', 'user.openapi.perp.trade', 'user.openapi.perp.order', 'user.service', + // unified margin 'user.position.unifiedAccount', 'user.execution.unifiedAccount', 'user.order.unifiedAccount', 'user.wallet.unifiedAccount', 'user.greeks.unifiedAccount', + // contract v3 'user.position.contractAccount', 'user.execution.contractAccount', 'user.order.contractAccount', 'user.wallet.contractAccount', + // v5 'position', + 'position.linear', + 'position.inverse', + 'position.option', + 'execution', - 'order', - 'wallet', - 'greeks', + 'execution.spot', + 'execution.linear', + 'execution.inverse', + 'execution.option', + // v5 fast execution topics are private 'execution.fast', 'execution.fast.linear', 'execution.fast.inverse', 'execution.fast.spot', 'execution.fast.option', + + 'order', + 'order.spot', + 'order.linear', + 'order.inverse', + 'order.option', + + 'wallet', + 'greeks', + + // v5 DCP topics + 'dcp.future', + 'dcp.spot', + 'dcp.option', + + // Strategy + 'strategy', ]; /**