The official PHP connector for Binance APIs, designed for backend applications and services written in PHP.
The connector provides an idiomatic PHP interface to Binance REST APIs. It includes built-in request signing, configuration helpers, and typed request and response models to help you build reliable server-side integrations.
For source code, issues, and release notes, see the binance-connector-php repository on GitHub.
Supported environments
- PHP 8.4 or newer
- Backend PHP applications and services
This connector is intended for server-side usage only.
Browser-based or client-side PHP environments are not supported.
Package structure
The PHP connector is published as a single Composer package.
Product-specific REST APIs (such as Spot, DerivativesTradingUsdsFutures, Wallet, and others)
are organized into namespaces within the library. This structure keeps APIs clearly separated while
allowing shared configuration, authentication, and transport logic.
Typical use cases
- Trading and execution services using REST APIs
- Backend services managing accounts, balances, and orders
- Historical market data ingestion
- Automation and reporting workflows
Key features
- Support for Binance REST APIs
- Built-in request signing for authenticated endpoints
- Typed request and response models
- Support for both production and testnet environments
- Consistent and idiomatic PHP API design
Getting started
Install the connector using Composer:
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 additional REST API examples.
Notes and best practices
- Store API keys securely using environment variables or a secrets manager
- Monitor rate limits and endpoint weights when building high-throughput services
- Use testnet environments when developing and validating integrations