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

Coinbase WebSocket API

Stream Coinbase Advanced Trade market data (ticker, level2, market_trades, candles) and authenticated user channels with HMAC/JWT signing.

빠른 답변: TsgcWSAPI_Coinbase는 Delphi 및 C++ Builder 앱을 Coinbase Advanced Trade에 연결하는 sgcWebSockets 컴포넌트예요. HMAC 또는 JWT 인증을 사용해 공개 시장 채널(ticker, level2, market_trades, candles)과 서명된 user 채널을 스트리밍해요.

TsgcWSAPI_Coinbase

Coinbase Advanced Trade client — ticker, level2 order book, market_trades, candles, status and the authenticated user channel.

컴포넌트 클래스

TsgcWSAPI_Coinbase

플랫폼

Windows, macOS, Linux, iOS, Android

에디션

Standard / Professional / Enterprise

Drop the component, set keys, subscribe

Pair with a TsgcWebSocketClient, supply API key/secret for signed channels, then subscribe to ticker, level2, market_trades or user.

uses
  sgcWebSocket, sgcWebSocket_API_Coinbase;

var
  WSClient: TsgcWebSocketClient;
  Coinbase: TsgcWSAPI_Coinbase;
begin
  WSClient := TsgcWebSocketClient.Create(nil);

  Coinbase := TsgcWSAPI_Coinbase.Create(nil);
  Coinbase.Client := WSClient;
  Coinbase.Coinbase.ApiKey    := 'your-api-key';
  Coinbase.Coinbase.ApiSecret := 'your-api-secret';

  WSClient.Active := True;

  Coinbase.SubscribeTicker(['BTC-USD']);
  Coinbase.SubscribeLevel2(['BTC-USD']);
  Coinbase.SubscribeMarketTrades(['BTC-USD']);
  Coinbase.SubscribeUser;
end;
// uses: sgcWebSocket, sgcWebSocket_API_Coinbase
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Coinbase *Coinbase = new TsgcWSAPI_Coinbase(this);
Coinbase->Client = WSClient;

WSClient->Active = true;
Coinbase->SubscribeTicker(OPENARRAY(UnicodeString, ("BTC-USD")));
Coinbase->SubscribeLevel2(OPENARRAY(UnicodeString, ("BTC-USD")));

내부 구성

Advanced Trade streams: ticker, ticker_batch, level2, market_trades, candles, status, plus the authenticated user channel.

Public channels

SubscribeTicker, SubscribeTickerBatch, SubscribeLevel2, SubscribeMarketTrades, SubscribeCandles and SubscribeStatus handle every Advanced Trade public stream.

User channel

SubscribeUser opens the authenticated user channel and delivers order, fill and account-level events for the signed-in identity.

HMAC + JWT auth

Coinbase Advanced Trade supports both legacy HMAC signing and newer JWT auth — the component picks the right scheme based on the credentials supplied.

Heartbeats & sequence

level2 and market_trades deliver a sequence_num per envelope; the component watches for gaps and raises OnException if a re-subscribe is required.

Multiple product IDs

Every subscribe call accepts an array of product IDs (BTC-USD, ETH-USD, ...) so a single connection can multiplex hundreds of instruments.

REST fallback

For snapshot data and order placement use the REST counterpart — the WebSocket component focuses on real-time streams.

사양 및 참조 문서

Authoritative sources for the APIs this component implements.

문서 및 데모

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

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

자주 묻는 질문

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

폼에 TsgcWebSocketClientTsgcWSAPI_Coinbase 컴포넌트를 추가하고, API 컴포넌트의 Client 속성에 클라이언트를 할당하고, user 채널이 필요하면 Coinbase.ApiKeyCoinbase.ApiSecret을 설정한 다음 WSClient.Active := True로 설정하고 SubscribeTickerSubscribeLevel2 같은 구독 메서드를 호출하세요.
TsgcWSAPI_Coinbase 컴포넌트는 Coinbase Advanced Trade WebSocket API에 중점을 둬요. 공개 채널(ticker, ticker_batch, level2, market_trades, candles, status)과 인증된 user 채널을 다뤄요. 스냅샷 데이터와 주문 생성에는 REST 대응 항목을 사용하고, WebSocket 컴포넌트는 실시간 스트림을 처리해요.
공개 시장 채널은 자격 증명 없이 스트리밍돼요. 주문, 체결, 계정 수준 이벤트를 전달하는 인증된 user 채널에만 Coinbase 자격 증명이 필요해요. API 키와 시크릿을 제공하면 컴포넌트가 제공된 자격 증명에 따라 HMAC 또는 JWT 인증을 자동으로 선택해요.
sgcWebSockets는 Delphi 7부터 최신 Delphi 13 Florence까지, 그리고 해당하는 C++ Builder 버전을 지원해요. Coinbase 컴포넌트는 Windows, macOS, Linux, iOS, Android에서 실행돼요.

Ready to Trade on Coinbase?

Download the free trial and stream Coinbase market data and account events from Delphi.