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;