Bybit WebSocket & REST API
Connect to Bybit v5 spot, linear, inverse and option WebSocket streams plus the signed REST API in one typed component.
Connect to Bybit v5 spot, linear, inverse and option WebSocket streams plus the signed REST API in one typed component.
Bybit v5 client — public channels (orderbook, trades, ticker, kline) per product category plus authenticated execution, order and position streams.
TsgcWSAPI_Bybit
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
Pair with a TsgcWebSocketClient, choose spot / linear / inverse / option via Bybit.Category, then subscribe to public or signed private channels.
uses
sgcWebSocket, sgcWebSocket_API_Bybit;
var
WSClient: TsgcWebSocketClient;
Bybit: TsgcWSAPI_Bybit;
begin
WSClient := TsgcWebSocketClient.Create(nil);
Bybit := TsgcWSAPI_Bybit.Create(nil);
Bybit.Client := WSClient;
Bybit.Bybit.ApiKey := 'your-api-key';
Bybit.Bybit.ApiSecret := 'your-api-secret';
Bybit.Bybit.Category := bcSpot;
WSClient.Active := True;
Bybit.SubscribeOrderbook('BTCUSDT', 50);
Bybit.SubscribePublicTrade('BTCUSDT');
Bybit.SubscribeTicker('BTCUSDT');
end;
// uses: sgcWebSocket, sgcWebSocket_API_Bybit
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Bybit *Bybit = new TsgcWSAPI_Bybit(this);
Bybit->Client = WSClient;
Bybit->Bybit->Category = bcSpot;
WSClient->Active = true;
Bybit->SubscribeOrderbook("BTCUSDT", 50);
Bybit->SubscribePublicTrade("BTCUSDT");
Bybit->SubscribeTicker("BTCUSDT");
Per-category WebSocket streams plus the signed REST surface — one component handles all four product categories.
Choose bcSpot, bcLinear, bcInverse or bcOption on Bybit.Category — the component switches the WebSocket base URL automatically.
SubscribeOrderbook, SubscribePublicTrade, SubscribeTicker, SubscribeKline, SubscribeLiquidation register every Bybit v5 public stream.
SubscribePosition, SubscribeExecution, SubscribeOrder, SubscribeWallet open authenticated channels — the component handles the auth handshake.
Bybit.REST_API wraps spot/derivatives REST calls (place order, cancel, account info, market data fallback) under the same component.
Toggle Bybit.TestNet to switch both WebSocket and REST base URLs to the api-testnet endpoints.
Bybit v5 uses connection-level ping/pong and per-channel sequence numbers; the component verifies sequence continuity and raises OnException on gaps.
Autorytatywne źródła API implementowanych przez ten komponent.
Deep-link do dokumentacji komponentu, gotowy do uruchomienia projekt demonstracyjny i pobranie wersji próbnej.
| Pomoc online — API_Bybit Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu. | Otwórz | |
| Projekt demonstracyjny — Demos\05.Crypto\14.Bybit Gotowy do uruchomienia projekt przykładowy. Dostarczany wewnątrz pakietu sgcWebSockets — pobierz wersję próbną poniżej. | Otwórz | |
| Dokument techniczny (PDF) Funkcje, szybki start, przykłady kodu dla Delphi i C++ Builder oraz odniesienia do źródeł pierwotnych — tylko ten komponent. | Otwórz | |
| Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki. | Otwórz |