Lightweight TypeScript SDK for T-Invest API (Tinkoff Investments) built on nice-grpc and ts-proto. Provides full gRPC client covering Users, Orders, MarketData, Operations, Instruments, StopOrders, Sandbox, and Signals services. Integrates unary and streaming endpoints with optional split channels. Includes a high-level MarketDataStreamController for managing subscriptions. Exposes TypeLoggerCb for structured logging with rate-limit headers and API error mapping. Supports sandbox mode, custom endpoints, and gRPC channel options. Currently at v3.0.0, actively maintained with releases tied to upstream contract updates.
npm install tinkoff-sdk-grpc-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating SDK with token, fetching 5-minute candles, and disconnecting.
Migrate from direct RPC method calls to createSdk interface; ensure .disconnect() is called after usage
Always provide appName (e.g., 'my-app'); it's used for x-app-name header
If you want errors to be logged and not thrown, pass options: { middleware: { swallowErrors: true } } to createSdkEnsure you call subscribe before awaiting stream.close(); use a flag to prevent double subscription
Use re-exports from package main entry: import { CandleInterval } from 'tinkoff-sdk-grpc-js'Verify TINVEST_TOKEN environment variable is set and valid; generate a new token in Tinkoff Broker settings
Ensure createSdk is called with valid token and appName; check that no exception was thrown during creation
Check internet connection; if behind a corporate proxy, configure Node.js proxy settings (e.g., HTTP_PROXY environment variable) or use a different network