Installation

Install from npm. The native Rust addon ships pre-built — no extra toolchain required.

npm
bash
npm install streamex-sdk
bun
bash
bun add streamex-sdk
pnpm
bash
pnpm add streamex-sdk
Tip

Requires Node.js 18+ or Bun 1.0+. Pre-built binaries ship for linux-x64, darwin-arm64, and win32-x64.

Quick Start

Connect to an exchange and receive live ticks in a few lines.

example.ts
ts
import { JsStreamex} from "streamex-sdk";

const stream = new JsStreamex();

stream.trades(
    "binance", "SOLUSDT", //or ["SOLUSDT", "BTCUSDT"] for multiple tickers
    (trade) => {
	    console.log(trade);
			}
	);
	
Note

All pairs use the unified BASE/QUOTE format regardless of exchange. The SDK translates to each exchange's native format internally.

Normalised Tick Schema

Every exchange sends data in a different shape. The SDK normalises all responses to this single Tick type before delivering to your handler.

types.ts
ts
interface Tick {
  exchange:         string;   // "binance" | "okx" | ...
  symbol:           string;   // "BTC/USDT"
  event_type:       string;   // trade/orderbook
  event_time:       string;   // "Unix ms"
  trade_id:         string;   // "961677022"
  last_price:       string;   // last traded price
  quantity:         string;   // base asset volume
  is_buyer_maker:   boolean;  // True/False
  timestamp:        number;   // Unix ms
}

See the Exchanges section for the exact raw → normalised mapping for each exchange.