Delphi 및 C++ Builder용 Bybit API 클라이언트 | eSeGeCe

Bybit WebSocket & REST API

Connect to Bybit v5 spot, linear, inverse and option WebSocket streams plus the signed REST API in one typed component.

빠른 답변: TsgcWSAPI_Bybit는 Delphi 및 C++ Builder 앱을 Bybit에 연결하는 sgcWebSockets 컴포넌트예요. spot, linear, inverse, option 카테고리에 걸친 Bybit v5 공개 및 인증된 WebSocket 채널과 서명된 REST API를 처리해요.

TsgcWSAPI_Bybit

Bybit v5 client — public channels (orderbook, trades, ticker, kline) per product category plus authenticated execution, order and position streams.

컴포넌트 클래스

TsgcWSAPI_Bybit

프로토콜

Bybit v5 API

플랫폼

Windows, macOS, Linux, iOS, Android

에디션

Standard / Professional / Enterprise

Drop the component, set keys, subscribe

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.

Category-aware streams

Choose bcSpot, bcLinear, bcInverse or bcOption on Bybit.Category — the component switches the WebSocket base URL automatically.

Public channels

SubscribeOrderbook, SubscribePublicTrade, SubscribeTicker, SubscribeKline, SubscribeLiquidation register every Bybit v5 public stream.

Signed private streams

SubscribePosition, SubscribeExecution, SubscribeOrder, SubscribeWallet open authenticated channels — the component handles the auth handshake.

REST endpoints

Bybit.REST_API wraps spot/derivatives REST calls (place order, cancel, account info, market data fallback) under the same component.

TestNet

Toggle Bybit.TestNet to switch both WebSocket and REST base URLs to the api-testnet endpoints.

Heartbeat & sequence tracking

Bybit v5 uses connection-level ping/pong and per-channel sequence numbers; the component verifies sequence continuity and raises OnException on gaps.

사양 및 참조 문서

Authoritative sources for the APIs this component implements.

문서 및 데모

컴포넌트 참조 문서로 바로 이동하고, 바로 실행 가능한 데모 프로젝트를 받고, 체험판을 다운로드해 보세요.

온라인 도움말 — API_Bybit 이 컴포넌트의 전체 속성, 메서드, 이벤트 참조 문서.
데모 프로젝트 — Demos\05.Crypto\14.Bybit 바로 실행 가능한 예제 프로젝트예요. sgcWebSockets 패키지에 포함되어 있어요 — 아래에서 체험판을 다운로드하세요.
기술 문서 (PDF) 기능, 빠른 시작, Delphi 및 C++ Builder 코드 샘플 및 1차 출처 참고 — 이 컴포넌트 전용.
사용자 설명서 (PDF) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서.

자주 묻는 질문

Delphi 및 C++ Builder용 Bybit API 컴포넌트에 대해 자주 묻는 질문이에요.

폼에 TsgcWebSocketClientTsgcWSAPI_Bybit 컴포넌트를 추가하고, API 컴포넌트의 Client 속성에 클라이언트를 할당하고, 비공개 채널을 위해 Bybit.ApiKeyBybit.ApiSecret을 설정하고, Bybit.Category로 제품 카테고리를 선택한 다음 WSClient.Active := True로 설정하고 SubscribeOrderbook이나 SubscribeTicker 같은 구독 메서드를 호출하세요.
네. 동일한 TsgcWSAPI_Bybit 컴포넌트가 Bybit v5 WebSocket 채널(공개 orderbook, trade, ticker, kline과 서명된 position, execution, order, wallet 스트림)과 주문 생성/취소, 계정 정보, 시장 데이터 폴백을 위한 서명된 REST API를 Bybit.REST_API를 통해 제공해요.
orderbook, trades, ticker, kline 같은 공개 채널은 자격 증명 없이 작동해요. 인증된 비공개 스트림(position, execution, order, wallet)과 서명된 REST 호출에만 Bybit API 키와 시크릿이 필요해요. Bybit.ApiKeyBybit.ApiSecret을 설정하면 컴포넌트가 인증 핸드셰이크를 처리해요.
sgcWebSockets는 Delphi 7부터 최신 Delphi 13 Florence까지, 그리고 해당하는 C++ Builder 버전을 지원해요. Bybit 컴포넌트는 Windows, macOS, Linux, iOS, Android에서 실행돼요.

Ready to Trade on Bybit?

Download the free trial and stream Bybit spot, derivatives and account events from Delphi.