Bitstamp WebSocket API

Subscribe to Bitstamp v2 public channels for live ticker, trade and order book updates across BTC, ETH, XRP, LTC and the rest of the trading pairs.

TsgcWSAPI_Bitstamp

Bitstamp WebSocket v2 client — live trades, order book and detailed order events for every supported instrument.

Component class

TsgcWSAPI_Bitstamp

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Standard / Professional / Enterprise

Drop the component, set keys, subscribe

Pair the component with a TsgcWebSocketClient, then call SubscribeLiveTicker, SubscribeOrderBook or SubscribeLiveOrders per currency pair.

uses
  sgcWebSocket, sgcWebSocket_API_Bitstamp;

var
  WSClient: TsgcWebSocketClient;
  Bitstamp: TsgcWSAPI_Bitstamp;
begin
  WSClient := TsgcWebSocketClient.Create(nil);

  Bitstamp := TsgcWSAPI_Bitstamp.Create(nil);
  Bitstamp.Client := WSClient;

  WSClient.Active := True;

  Bitstamp.SubscribeLiveTicker('btcusd');
  Bitstamp.SubscribeOrderBook('btcusd');
  Bitstamp.SubscribeLiveOrders('btcusd');
end;
// uses: sgcWebSocket, sgcWebSocket_API_Bitstamp
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Bitstamp *Bitstamp = new TsgcWSAPI_Bitstamp(this);
Bitstamp->Client = WSClient;

WSClient->Active = true;
Bitstamp->SubscribeLiveTicker("btcusd");
Bitstamp->SubscribeOrderBook("btcusd");
Bitstamp->SubscribeLiveOrders("btcusd");

What's inside

Live trade tape, detailed order events, full order-book snapshots and incremental detail-order-book updates.

Live trades

SubscribeLiveTicker opens the live_trades_xxx channel and delivers individual trade ticks (price, amount, microtimestamp, buy/sell side) per pair.

Order book streams

SubscribeOrderBook (top 100), SubscribeLiveDetailOrderBook (full L3 detail) and SubscribeLiveFullOrderBook (incremental updates) cover every level of order-book detail Bitstamp exposes.

Live orders

SubscribeLiveOrders publishes order_created, order_changed and order_deleted events for the chosen currency pair — the raw L3 order tape.

Reconnection-safe

On TsgcWebSocketClient WatchDog reconnect the component re-subscribes to every previously active channel so no manual replay is needed.

Heartbeats

Bitstamp v2 uses connection-level heartbeats — configure the underlying client's HeartBeat property to keep the connection alive through firewalls and NAT translators.

Multi-pair multiplex

A single component handles many currency pairs concurrently; OnBitstamp* events surface the originating pair so you can route the payload appropriately.

Specifications & references

Authoritative sources for the APIs this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Online Help — API_Bitstamp Full property, method and event reference for this component.
Demo Project — Demos\05.Crypto\02.Bitstamp Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Ready to Trade on Bitstamp?

Download the free trial and integrate Bitstamp WebSocket streams into your Delphi applications.