Coinbase WebSocket API

From sgcWebSockets 4.4.7, Coinbase WebSocket API is supported. Coinbase is a platform that allows to sell, buy and store cryptocurrencies like Ethereum, Bitcoin...

WebSocket API allow to receive in real-time ticker updates, status, tickers, book deepth and more.


How Connect to Coinbase

oClient := TsgcWebSocketClient.Create(nil);
oCoinbase := TsgcWSAPI_Coinbase.Create(nil);
oCoinbase.Client := oClient;
oClient.Active := True; 

How Subscribe Ticker 

oClient := TsgcWebSocketClient.Create(nil);
oCoinbase := TsgcWSAPI_Coinbase.Create(nil);
oCoinbase.Client := oClient;
oCoinbase.SubscribeTicker('ETH-USD']);



procedure OnCoinbaseMessage(Sender: TObject; aType, aRawMessage: string);
begin
// here you will receive the ticker updates
end; 
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Binance Futures APIs USDT and COIN
Telegram Bot Chat not found

Related Posts