Coinbase Pro API
Access real-time order book, trade, and ticker data from Coinbase's professional trading platform via WebSocket.
Access real-time order book, trade, and ticker data from Coinbase's professional trading platform via WebSocket.
Subscribe to Level 2 order book updates, matched trades, and real-time ticker data from Coinbase Pro.
The sgcWebSockets Coinbase Pro component connects to the Coinbase Pro WebSocket feed, delivering real-time market data with low latency. Access full order book snapshots, incremental updates, and trade matches for all available trading pairs.
Subscribe to real-time ticker data from Coinbase Pro.
uses
sgcHTTP_API_Coinbase;
var
Coinbase: TsgcHTTPAPI_Coinbase;
procedure TForm1.FormCreate(Sender: TObject);
begin
Coinbase := TsgcHTTPAPI_Coinbase.Create(nil);
Coinbase.OnCoinbaseTicker := OnTicker;
Coinbase.Connect;
end;
procedure TForm1.Subscribe;
begin
Coinbase.SubscribeTicker('BTC-USD');
end;
procedure TForm1.OnTicker(Sender: TObject;
aProductId, aPrice, aBestBid, aBestAsk: string);
begin
Label1.Caption := aProductId + ': $' + aPrice;
end;
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.