$ show ccxt/go-binance
This repository is a production-oriented Go client library for the Binance cryptocurrency exchange, covering spot, margin, USDS-M futures, coin-margined delivery futures, options, portfolio margin, and related products. The code in v2/ exposes fluent builder-style services for REST endpoints and WebSocket streams, with clients such as NewClient, NewFuturesClient, NewDeliveryClient, NewOptionsClient, and portfolio-specific clients. The library is consumed by trading bots and exchange-integration applications; it is not a data analysis or research project, though it provides market-data access primitives for klines, tickers, order books, funding rates, and historical trades.
The LLM identified 3 files worth highlighting for reuse:
Centralized request-signing utility supporting HMAC-SHA256, RSA, and Ed25519 key types. It is isolated from Binance-specific business logic, making it extractable into any signed API client or authentication library. The clean separation of signing algorithms from REST/WebSocket request construction is non-obvious and reusable.
A standalone WebSocket client abstraction with connection lifecycle management, read channels, synchronous and asynchronous writes, request-ID tracking, reconnect/backoff, and keepalive behavior. It is self-contained within the common package and can be extracted and reused for any WebSocket-based API integration that needs robust reconnection semantics.
Exchange-agnostic helper functions for lot-size rounding, JSON list normalization, numeric conversions, and deterministic order-ID generation. These utilities solve recurring exchange-integration problems and can be lifted into other trading or market-data projects with minimal changes.