PHPackages                             binance/binance-connector-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. binance/binance-connector-php

ActiveLibrary[API Development](/categories/api)

binance/binance-connector-php
=============================

A thin layer for Binance API in PHP

v4.0.0(4mo ago)10157.3k↓12.7%26[5 issues](https://github.com/binance/binance-connector-php/issues)[1 PRs](https://github.com/binance/binance-connector-php/pulls)MITPHPPHP ^8.1CI passing

Since May 19Pushed 4mo ago9 watchersCompare

[ Source](https://github.com/binance/binance-connector-php)[ Packagist](https://packagist.org/packages/binance/binance-connector-php)[ Docs](https://github.com/binance/binance-connector-php)[ RSS](/packages/binance-binance-connector-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (18)Used By (0)

Binance PHP Connectors
======================

[](#binance-php-connectors)

[![Build Status](https://camo.githubusercontent.com/11a79b37dab40c5a3418fbe1c1acbd87f10fbb1f7a9a38dda3fd3917e4794a11/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62696e616e63652f62696e616e63652d636f6e6e6563746f722d7068702f7068702e796d6c)](https://github.com/binance/binance-connector-php/actions)[![Open Issues](https://camo.githubusercontent.com/63d4eccede95e9f01d281cae9f1b433f87de9302c2eff102e3a9d1a4389320be/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f62696e616e63652f62696e616e63652d636f6e6e6563746f722d706870)](https://github.com/binance/binance-connector-php/issues)[![Code Style: PHP-CS-Fixer](https://camo.githubusercontent.com/ad2bdbd07f33b00cb4bc336b442b632ae723f5f7880d7f4170c5eb7479f3cefe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d5048502d2d43532d2d46697865722d666636396234)](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)[![PHP Version](https://camo.githubusercontent.com/fb35d776e210b765f4eddcfea80329789f94d548183d4250f914f97af30ee366/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d382e342e302d627269676874677265656e)](https://camo.githubusercontent.com/fb35d776e210b765f4eddcfea80329789f94d548183d4250f914f97af30ee366/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d382e342e302d627269676874677265656e)[![Known Vulnerabilities](https://camo.githubusercontent.com/265cd0d4fea9c9684f2a5dca13ce16f3840beb439735ffa32ede0837986ee52a/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f62696e616e63652f62696e616e63652d636f6e6e6563746f722d7068702f62616467652e737667)](https://snyk.io/test/github/binance/binance-connector-php)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Collection of auto-generated PHP connectors for Binance APIs.

Prerequisites
-------------

[](#prerequisites)

Before using the connectors, ensure you have:

- **PHP** (version &gt;= 8.4.0)

Available Connectors
--------------------

[](#available-connectors)

- [binance-algo](src/algo) - Algo Trading connector
- [binance-c2c](src/c2c) - C2C connector
- [binance-convert](src/convert) - Convert connector
- [binance-copy-trading](src/copy-trading) - Copy Trading connector
- [binance-crypto-loan](src/crypto-loan) - Crypto Loan connector
- [binance-derivatives-trading-coin-futures](src/derivatives-trading-coin-futures) - Derivatives Trading (COIN-M Futures) connector
- [binance-derivatives-trading-options](src/derivatives-trading-options) - Derivatives Trading (Options) connector
- [binance-derivatives-trading-portfolio-margin](src/derivatives-trading-portfolio-margin) - Derivatives Trading (Portfolio Margin) connector
- [binance-derivatives-trading-portfolio-margin-pro](src/derivatives-trading-portfolio-margin-pro) - Derivatives Trading (Portfolio Margin Pro) connector
- [binance-derivatives-trading-usds-futures](src/derivatives-trading-usds-futures) - Derivatives Trading (USDS-M Futures) connector
- [binance-dual-investment](src/dual-investment) - Dual Investment connector
- [binance-fiat](src/fiat) - Fiat connector
- [binance-gift-card](src/gift-card) - Gift Card connector
- [binance-margin-trading](src/margin-trading) - Margin Trading connector
- [binance-mining](src/mining) - Mining connector
- [binance-nft](src/nft) - NFT connector
- [binance-pay](src/pay) - Pay connector
- [binance-rebate](src/rebate) - Rebate connector
- [binance-simple-earn](src/simple-earn) - Simple Earn connector
- [binance-spot](src/spot) - Spot Trading connector
- [binance-staking](src/staking) - Staking connector
- [binance-sub-account](src/sub-account) - Sub Account connector
- [binance-vip-loan](src/vip-loan) - VIP Loan connector
- [binance-wallet](src/wallet) - Wallet connector

Documentation
-------------

[](#documentation)

For detailed information, refer to the [Binance API Documentation](https://developers.binance.com).

Installation
------------

[](#installation)

All connectors are within the same package and can be install with the command:

```
composer require binance/binance-connector-php
```

Contributing
------------

[](#contributing)

Since this repository contains auto-generated code using OpenAPI Generator, we encourage you to:

1. Open a GitHub issue to discuss your ideas or report bugs
2. Allow maintainers to implement necessary changes through the code generation process

### Types of Signature Generator

[](#types-of-signature-generator)

When creating REST clients (such as SpotRestApi), you use one of the following types of Signature Generator to create signatures (for SIGNED endpoints) based on your security preference:

- `HMAC` - Use of API Key and Secret Key.

```
    $configurationBuilder = SpotRestApiUtil::getConfigurationBuilder();
    $configurationBuilder->apiKey('apiKey')->secretKey('mySecretKey');
    $api = new SpotRestApi($configurationBuilder->build());
```

- `RSA` or `ED25519` - use of API Key and RSA/Ed25519 algorithm keys.

```
    $configurationBuilder = SpotRestApiUtil::getConfigurationBuilder();
    $configurationBuilder
    ->apiKey('apiKey')
    ->privateKey('file:///path/to/private.key')
    // if the private key is protected by a password
    ->privateKeyPass("myPrivateKeyPass");

    $api = new SpotRestApi($configurationBuilder->build());
```

How to use a proxy
------------------

[](#how-to-use-a-proxy)

### Rest Api

[](#rest-api)

```
    // set up a client array
    $configurationBuilder = SpotRestApiUtil::getConfigurationBuilder();
    // define the proxies
    $proxies = [
        'http'  => 'http://localhost:8080',
        'https' => 'http://localhost:8080',
    ];

    $configurationBuilder->setProxy($proxies);

    $api = new SpotRestApi($configurationBuilder->build());
```

Examples
--------

[](#examples)

**Algo**: [Rest API](src/algo/example_rest.md)

**C2c**: [Rest API](src/c2c/example_rest.md)

**Convert**: [Rest API](src/convert/example_rest.md)

**Copy Trading**: [Rest API](src/copy-trading/example_rest.md)

**Crypto Loan**: [Rest API](src/crypto-loan/example_rest.md)

**Derivatives Trading Coin Futures**: [Rest API](src/derivatives-trading-coin-futures/example_rest.md)

**Derivatives Trading Options**: [Rest API](src/derivatives-trading-options/example_rest.md)

**Derivatives Trading Portfolio Margin**: [Rest API](src/derivatives-trading-portfolio-margin/example_rest.md)

**Derivatives Trading Portfolio Margin Pro**: [Rest API](src/derivatives-trading-portfolio-margin-pro/example_rest.md)

**Derivatives Trading Usds Futures**: [Rest API](src/derivatives-trading-usds-futures/example_rest.md)

**Dual Investment**: [Rest API](src/dual-investment/example_rest.md)

**Fiat**: [Rest API](src/fiat/example_rest.md)

**Gift Card**: [Rest API](src/gift-card/example_rest.md)

**Margin Trading**: [Rest API](src/margin-trading/example_rest.md)

**Mining**: [Rest API](src/mining/example_rest.md)

**Nft**: [Rest API](src/nft/example_rest.md)

**Pay**: [Rest API](src/pay/example_rest.md)

**Rebate**: [Rest API](src/rebate/example_rest.md)

**Simple Earn**: [Rest API](src/simple-earn/example_rest.md)

**Spot**: [Rest API](src/spot/example_rest.md)

**Staking**: [Rest API](src/staking/example_rest.md)

**Sub Account**: [Rest API](src/sub-account/example_rest.md)

**Vip Loan**: [Rest API](src/vip-loan/example_rest.md)

**Wallet**: [Rest API](src/wallet/example_rest.md)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance75

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~46 days

Total

16

Last Release

130d ago

Major Versions

v1.7.0 → v2.0.02025-07-08

v2.0.1 → v3.0.02025-11-06

v3.0.0 → v4.0.0.x-dev2026-01-09

PHP version history (3 changes)v1.0.0PHP &gt;=7.4.0

v1.6.0PHP &gt;=8.1.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/788f15d934212f4718a2792bf60a83ed9e5814a3cc73e3e0f8e8cb21d8b96c42?d=identicon)[Binance](/maintainers/Binance)

---

Top Contributors

[![2pd](https://avatars.githubusercontent.com/u/365354?v=4)](https://github.com/2pd "2pd (21 commits)")[![alplabin](https://avatars.githubusercontent.com/u/122352306?v=4)](https://github.com/alplabin "alplabin (15 commits)")[![selviler](https://avatars.githubusercontent.com/u/56368718?v=4)](https://github.com/selviler "selviler (11 commits)")[![theo-s68](https://avatars.githubusercontent.com/u/194042188?v=4)](https://github.com/theo-s68 "theo-s68 (9 commits)")[![tantialex](https://avatars.githubusercontent.com/u/17701918?v=4)](https://github.com/tantialex "tantialex (1 commits)")

---

Tags

apibinance-apiconnectorcryptolibrarymarket-dataphpreal-timetrading

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/binance-binance-connector-php/health.svg)

```
[![Health](https://phpackages.com/badges/binance-binance-connector-php/health.svg)](https://phpackages.com/packages/binance-binance-connector-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
