The official Go connector for Binance APIs, designed for backend applications and services written in Go.
The connector provides a modular and idiomatic Go interface to Binance APIs, supporting REST APIs, WebSocket APIs and WebSocket Streams. It includes built-in request signing, connection management, and strongly typed request and response structures for building reliable and maintainable integrations.
For source code, issues, and release notes, see the binance-connector-go repository on GitHub.
Supported environments
- Go 1.24 or newer
- Backend Go applications and services
This connector is intended for server-side usage only. Browser-based or WebAssembly environments are not supported.
Package structure
The Go connector is published as a single module that exposes clients for different Binance products.
Product-specific functionality is organized into dedicated packages within the repository, such as
spot, derivativestradingusdsfutures, wallet, and others. This structure keeps APIs clearly
separated while allowing you to share configuration, authentication, and transport logic across
clients.
Typical use cases
- Trading and execution services
- Real-time and historical market data ingestion
- Backend services managing accounts, balances, and orders
- Applications consuming WebSocket APIs or WebSocket Streams for low-latency updates
Key features
- Support for Binance REST APIs, WebSocket APIs and WebSocket Streams
- Built-in request signing for authenticated endpoints
- WebSocket connection handling with automatic reconnection and session renewal
- Strongly typed request and response structures
- Support for both production and testnet environments
- Idiomatic Go API design
Getting started
Install the package for the product you want to integrate with:
Code
Create a client and send a request:
Code
The example above uses asymmetric key authentication. HMAC-based authentication using an API secret is also supported.
Refer to the repository documentation for product-specific REST, WebSocket API and WebSocket Streams examples.
Notes and best practices
- Store API keys securely using environment variables or a secrets manager
- Prefer WebSocket APIs or Streams for real-time data instead of polling REST endpoints
- Monitor rate limits and endpoint weights when building high-throughput services
- Use testnet environments when developing and validating integrations