Skip to content

Runtime compatibility ​

Setup and recorded public REST and WebSocket checks for the Bybit SDK. Install commands use the latest SDK release; test results identify the version checked.

EnvironmentTested versionResult
Node.jsv24.19.0Live checks passed
Bun1.4.4Live checks passed
Denodeno 2.9.6 (stable, release, aarch64-apple-darwin)Live checks passed
Browser / default ViteChromium 156.0.0.0Checks failed
Browser / configured ViteChromium 156.0.0.0Live checks passed
Next.js serverNext.js 16.4.5 / Node v24.19.0Live checks passed
React Native / default AndroidReact Native 0.88.1 / Expo 58.0.23Checks failed
React Native / default iOSReact Native 0.88.1 / Expo 58.0.23Checks failed
React Native / Android with polyfillsReact Native 0.88.1 / Expo 58.0.23 / Android API 35 / HermesLive checks passed
React Native / iOS with polyfillsReact Native 0.88.1 / Expo 58.0.23 / iOS 26.3.1 / HermesLive checks passed

Tested SDK: bybit-api@4.8.4. Last run: 2026-11-04 on darwin/arm64. Each environment lists its check date.

The listed SDK version identifies the test run, not a minimum requirement. Results and setup recipes are retained across routine SDK releases.

Node.js ​

Live checks passed. The package checks listed below passed against the live exchange APIs.

Checked 2026-11-04.

CheckResult
ES module importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed
CommonJS importPassed
TypeScript consumerPassed

Observed BTC price: 78572.1, received 2026-11-04T11:07:47.750Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 78572.1, received 2026-11-04T11:07:48.510Z from wss://stream.bybit.com/v5/public/spot.

Bun ​

Live checks passed. The package checks listed below passed against the live exchange APIs.

Checked 2026-11-04.

CheckResult
ES module importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed
CommonJS importPassed
TypeScript consumerPassed

Observed BTC price: 78576.4, received 2026-11-04T11:07:54.045Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 78576.4, received 2026-11-04T11:07:54.767Z from wss://stream.bybit.com/v5/public/spot.

Deno ​

Live checks passed. The package checks listed below passed against the live exchange APIs.

Checked 2026-11-04.

CheckResult
ES module importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed
CommonJS importPassed
TypeScript consumerPassed

Observed BTC price: 78576.4, received 2026-11-04T11:07:59.107Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 78576.4, received 2026-11-04T11:07:59.861Z from wss://stream.bybit.com/v5/public/spot.

Browser / default Vite ​

Checks failed. The default Vite consumer failed browser execution checks. See the observed failures below.

Checked 2026-11-04.

CheckResult
Production bundlePassed
ES module importFailed

ES module import: Object.defineProperty called on non-object

Browser / configured Vite ​

Live checks passed. The Vite consumer with an events polyfill passed execution checks in the browser shown here, against the live exchange REST and WebSocket APIs.

Checked 2026-11-04.

CheckResult
Production bundlePassed
ES module importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed

Observed BTC price: 78601.4, received 2026-11-04T11:08:23.012Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 78601.4, received 2026-11-04T11:08:23.734Z from wss://stream.bybit.com/v5/public/spot.

Vite configuration ​

Install the SDK and EventEmitter polyfill:

sh
npm install bybit-api events@3.3.0

Save this as vite.config.mjs at the application root:

js
import {fileURLToPath} from 'node:url';

export default {
  resolve: {
    alias: {
      events: fileURLToPath(new URL('./node_modules/events/events.js', import.meta.url)),
    },
  },
};

This supplies EventEmitter. Tested with Vite 5.4.21 and an npm installation.

Next.js server ​

Live checks passed. Production build and live exchange REST execution in a Node.js Route Handler passed. Client Components and the Edge runtime are not covered.

Checked 2026-11-04.

CheckResult
Production bundlePassed
Server route executionPassed

The server route received BTC price 78609.2 at 2026-11-04T11:08:41.170Z.

Checked in a Node.js Route Handler. Client Components and Edge execution are untested.

React Native / default Android ​

Checks failed. The standard Expo consumer failed its android Metro build. Metro could not resolve the module https.

Checked 2026-11-04.

CheckResult
Android Metro bundleFailed

This is the default configuration. See Android with polyfills for the consumer setup and its live results.

React Native / default iOS ​

Checks failed. The standard Expo consumer failed its ios Metro build. Metro could not resolve the module https.

Checked 2026-11-04.

CheckResult
iOS Metro bundleFailed

See iOS with polyfills for the configured consumer setup and results.

React Native / Android with polyfills ​

Live checks passed. The SDK passed live exchange REST and WebSocket checks in Expo Go on the Android emulator. iOS, background suspension and custom native development builds are not covered.

Checked 2026-11-04.

CheckResult
Android Metro bundlePassed
Native package importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed

Observed BTC price: 78623.2, received 2026-11-04T11:21:53.479Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 78623.2, received 2026-11-04T11:21:54.810Z from wss://stream.bybit.com/v5/public/spot.

Expo and Metro setup ​

Install the latest SDK and the required polyfills:

sh
npm install bybit-api buffer@6.0.3 events@3.3.0 https-browserify@1.0.0 stream-http@3.2.0 url@0.11.4

Save this helper as siebly-sdk.metro.cjs at your application root:

js
const path = require('node:path');

module.exports = function configureSdkMetro(config, projectRoot) {
  const resolve = name => require.resolve(name, {paths:[projectRoot]});
  const aliases = {
    https: resolve('https-browserify'),
    http: resolve('stream-http'),
    url: resolve('url/'),
  };
  const previous = config.resolver.resolveRequest;
  const binanceNodeSupport = path.join(projectRoot,'node_modules/binance/lib/util/node-support');
  config.resolver.resolveRequest = (context, name, platform) => {
    const resolveRequest = previous || context.resolveRequest;
    if (aliases[name]) return {type:'sourceFile',filePath:aliases[name]};
    if (name.startsWith('.') && path.resolve(path.dirname(context.originModulePath),name).replace(/\.js$/,'') === binanceNodeSupport) {
      return {type:'sourceFile',filePath:path.join(projectRoot,'node_modules/binance/lib/util/browser-support.js')};
    }
    return resolveRequest(context,name,platform);
  };
  return config;
};

Apply it in metro.config.cjs:

js
const {getDefaultConfig} = require('expo/metro-config');
const configureSdkMetro = require('./siebly-sdk.metro.cjs');
module.exports = configureSdkMetro(getDefaultConfig(__dirname), __dirname);

Restart Expo with npx expo start --clear. SDK imports and client initialization need no changes.

The HTTPS adapter uses React Native’s HTTP transport. events supplies EventEmitter; buffer supports the adapter’s stream dependency. The Binance rule selects the package’s browser implementation.

Tested in Expo Go with an npm node_modules layout.

Metro resolver documentation

React Native / iOS with polyfills ​

Live checks passed. The SDK passed live exchange REST and WebSocket checks in Expo Go on the iOS simulator. Physical devices, background suspension and custom native development builds are not covered.

Checked 2026-11-04.

CheckResult
iOS Metro bundlePassed
Native package importPassed
Live exchange REST pricePassed
Live exchange market-data subscriptionPassed
Close WebSocket clientPassed

Observed BTC price: 79398.5, received 2026-11-04T14:45:13.397Z from https://api.bybit.com/v5/market/tickers?category=spot&symbol=BTCUSDT.

Observed BTC price: 79395.5, received 2026-11-04T14:45:14.526Z from wss://stream.bybit.com/v5/public/spot.

Use the shared Expo and Metro setup above. The same helper is used for the iOS checks.

Test coverage ​

Live checks cover package imports, a public REST price request, a market-data WebSocket update and client cleanup. Node.js, Bun and Deno also check CommonJS, TypeScript and process exit.

Results apply to the recorded package, runtime, date and network. Region or browser restrictions can prevent exchange access. Authentication, signing, orders and failure recovery are outside these checks.

Browser requests go directly to the exchange. CORS, regional restrictions and network failures can block access; failed checks show the observed error. Safari and Firefox are untested.

Android checks use Metro and Expo Go on an Android 15 ARM64 emulator with Hermes. Runtime checks follow a successful build. Physical devices, background lifecycle and standalone release builds are untested.

iOS checks use Metro and Expo Go on an iOS simulator with Hermes. Runtime checks follow a successful build. The row records the tested iOS and framework versions. Physical devices, background lifecycle and standalone release builds are untested.

Quickstart · Production usage · Troubleshooting

Built by Siebly. Open source SDKs for exchange APIs.