Bitfinex Trading API
Stream real-time trading data, order books, and candle charts from the Bitfinex cryptocurrency exchange.
Stream real-time trading data, order books, and candle charts from the Bitfinex cryptocurrency exchange.
Access Bitfinex's WebSocket v2 API for real-time market data, trading, and account management.
The sgcWebSockets Bitfinex component connects to the Bitfinex WebSocket v2 API. Subscribe to ticker, trade, order book, and candle channels for any trading pair. Authenticated connections provide access to order management and wallet updates.
Subscribe to Bitfinex ticker data.
uses
sgcHTTP_API_Bitfinex;
var
Bitfinex: TsgcHTTPAPI_Bitfinex;
procedure TForm1.FormCreate(Sender: TObject);
begin
Bitfinex := TsgcHTTPAPI_Bitfinex.Create(nil);
Bitfinex.OnBitfinexTicker := OnTicker;
Bitfinex.Connect;
end;
procedure TForm1.Subscribe;
begin
Bitfinex.SubscribeTicker('tBTCUSD');
end;
procedure TForm1.OnTicker(Sender: TObject;
aSymbol, aBid, aAsk, aLastPrice, aVolume: string);
begin
Label1.Caption := aSymbol + ': $' + aLastPrice;
Label2.Caption := 'Vol: ' + aVolume;
end;
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.