Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Official SDK, TypeScript / Node

TickerAll TypeScript SDK

A typed client for the TickerAll REST + WebSocket API — place trades, stream live market data, and manage broker sessions, with idempotency keys and automatic reconnects built in. Requires Node 18+.

npm install @tickerall/sdk
Get started

SDKs and tools

Install & connect #install

One client object holds your API key and exposes every namespace. The same key can drive many broker accounts at once, each addressed by its accountId.

Sessions #sessions

Connect a broker account and get its accountId. keepAlive caches the credentials in this process’s memory (never persisted) so the client transparently re-arms an account that goes cold — e.g. after a service restart.

Accounts #accounts

List and inspect the broker accounts linked to your key — balances, open positions, tradeable symbols and their volume specs.

Orders #orders

Place market and pending (limit / stop) orders, and manage resting pending orders. State-changing calls carry a stable idempotency key so a retry can’t double-execute.

Positions #positions

Close (fully or partially) and modify the stop-loss / take-profit on open positions.

Bulk operations #bulk

Execute one action across many accounts in a single call — place, close, modify, and cancel over a set of accounts, or read live state for your whole roster at once. Each method returns a per-account results array plus a summary tally, so a partial success is explicit. Bulk operations require a Pro or Enterprise plan.

Copy Trading #copy

Mirror one master account's trades to many followers — each scaled, symbol-mapped, and risk-clamped to its own size. Create a set, tune each follower, arm it, and the master's trades follow. Read a set's stats + log. A Pro or Enterprise feature.

Seats (white-label) #seats

Serve many downstream customers through one key (Enterprise, opt-in). Manage seats on your owner client (client.seats.*); act AS a seat with client.asSeat(externalId) / client.as_seat(external_id), which sends X-Tickerall-User on every call. Σ(seat caps) ≤ your reserved capacity; each seat sees only its own accounts.

Candles #candles

Historical OHLC candles from a connected account, across all nine timeframes. Bound the series by a look-back window (hours) or an exact date range (from + to, ISO-8601). Coarser timeframes reach further back; deep look-backs ride an isolated history connection so they don’t disturb your live tick stream.

Trade history #history

Closed-trade history — executed deals paired into round-trips, from the broker’s recent deal window plus any closes seen live this session.

Realtime stream #stream

A single self-healing WebSocket pushes live ticks, position events, and account snapshots. It heartbeats, reconnects with backoff, and re-subscribes automatically — you register callbacks and go.

Errors #errors

Every failure is a typed error carrying status / code / requestId / details / transient. Catch the base class, or a narrow subclass. transient marks a momentary connectivity issue that is safe to retry.

Reliability #reliability

State-changing calls (sessions.start, orders.place, positions.close / modify, pending cancel / modify) carry a stable Idempotency-Key, so a retried call can’t double-execute. By default a transient failure fails fast so you can re-decide with fresh prices.