PHPackages                             ash-rain/laravel-binance-api - 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. ash-rain/laravel-binance-api

ActiveLibrary[API Development](/categories/api)

ash-rain/laravel-binance-api
============================

A Laravel Wrapper for the Binance API.

010PHP

Since Aug 31Pushed 3y agoCompare

[ Source](https://github.com/net-shell/Laravel-Binance-Api)[ Packagist](https://packagist.org/packages/ash-rain/laravel-binance-api)[ RSS](/packages/ash-rain-laravel-binance-api/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/d65995293cfc26f8550c36e1f0841be5cfbbca1a1214721edec33ae38fc9175e/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c2d42696e616e63652d4150492e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6173682d7261696e2532466c61726176656c2d62696e616e63652d617069267061747465726e3d617263686974656374267374796c653d7374796c655f32266465736372697074696f6e3d412b6c61726176656c2b777261707065722b666f722b7468652b42696e616e63652b4150492e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d736572766572)](https://camo.githubusercontent.com/d65995293cfc26f8550c36e1f0841be5cfbbca1a1214721edec33ae38fc9175e/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c2d42696e616e63652d4150492e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6173682d7261696e2532466c61726176656c2d62696e616e63652d617069267061747465726e3d617263686974656374267374796c653d7374796c655f32266465736372697074696f6e3d412b6c61726176656c2b777261707065722b666f722b7468652b42696e616e63652b4150492e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d736572766572)

[![GitHub release](https://camo.githubusercontent.com/bf39db8f3d9371776f88f098692ffc203bad49d769494f018e08b11900516d13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6173682d7261696e2f6c61726176656c2d62696e616e63652d6170692e7376673f696e636c7564655f70726572656c6561736573267374796c653d666f722d7468652d62616467652626636f6c6f72423d374535374332)](https://packagist.org/packages/ash-rain/laravel-binance-api)[![GitHub issues](https://camo.githubusercontent.com/b61b86a9616ce1a81700aa9e7481610800f864fa3d0f59da3012939ea60323d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6173682d7261696e2f4c61726176656c2d42696e616e63652d4170692e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ash-rain/Laravel-Binance-Api/issues)[![Software License](https://camo.githubusercontent.com/c003d4d48be8c870b7f5dfef6e898cc00ece72e12064c1eb199611b0e290ce92/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666f722d7468652d62616467652626636f6c6f72423d463237453430)](license.md)[![Total Downloads](https://camo.githubusercontent.com/c98c93900a1293bedca6cf2f9e334db64d47bfd70a77152f50fef2aa5bd9d993/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6173682d7261696e2f6c61726176656c2d62696e616e63652d6170692e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ash-rain/laravel-binance-api)

This package provides a Laravel Wrapper for the [Binance API](https://binance-docs.github.io/apidocs/spot/en) and allows you to easily communicate with it.

---

#### Important Note

[](#important-note)

This package is in early development stage. It is not advisable to use it in a production app until **`v1.0`** is released. Feel free to open a PR to contribute to this project and help me reach a production ready build.

---

### Installation

[](#installation)

You can install the package via composer:

```
composer require ash-rain/laravel-binance-api
```

You can publish the config file with:

```
php artisan vendor:publish --tag="binance-api-config"
```

Open your `.env` file and add the following (replace `YOUR_API_KEY` and `YOUR_SECRET` with the API Key &amp; Secret you received from [Binance](https://www.binancezh.top/en/support/faq/360002502072)) -

```
BINANCE_KEY=YOUR_API_KEY
BINANCE_SECRET=YOUR_SECRET
```

Or

Open the published config file available at `config/binance-api.php` and add your API and Secret Keys:

```
return [
    'auth' => [
        'key'        => env('BINANCE_KEY', 'YOUR_API_KEY'),
        'secret'     => env('BINANCE_SECRET', 'YOUR_SECRET')
    ],
];
```

### Usage

[](#usage)

Using this package is very simple. Just initialize the Api and call one of the available methods:

```
use TechTailor\BinanceApi\BinanceAPI;

$binance = new BinanceAPI();

$time = $binance->getTime();
```

You can also set an API &amp; Secret for a user by passing it after initalization (useful when you need to isolate api keys for individual users):

```
$binance = new BinanceApi();

$binance->setApi($apiKey, $secretKey);

$accountInfo = $binance->getAccountInfo();
```

### Available Methods

[](#available-methods)

Available Public Methods (Security Type : `NONE`) **\[API Keys Not Required\]**

```
- getSystemStatus()         // returns system status, expect msg to be "normal".
- getTime()                 // returns server timestamp.
- getExchangeInfo($symbol)  // returns current exchange trading rules and symbol information.
- getOrderBook($symbol)     // returns the order book for the symbol.
- getAvgPrice($symbol)      // returns the average price for a symbol.
- getTicker($symbol)        // returns the 24hr ticker for a symbol (if no symbol provided, returns an array of all symbols).

```

Available Private Methods (Security Type : `USER_DATA`) **\[API Keys Required\]**

```
- getAccountInfo()          // returns current account information.
- getAllOrders()            // return all current account orders (active, canceled or filled).
- getOpenOrders($symbol)    // returns all current account open orders (Careful when accessing without symbol).
- getTrades($symbol)        // returns all trades for a symbol.
- getOrderStatus($symbol, $orderId) // returns status of a given order.
- getUserCoinsInfo()        // returns information of all coins available to the user.
- getDepositHistory()       // returns the user's deposit history.
- getWithdrawHistory()      // returns the user's withdraw history.

```

### TODO

[](#todo)

List of features or additional functionality we are working on (in no particular order) -

```
- Improve exception handling.
- Add rate limiting to API Calls.
- Add response for API ban/blacklisting response.
- Improve ReadMe.
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

### Contributing

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Security Vulnerabilities

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

### Credits

[](#credits)

- [Moinuddin S. Khaja](https://github.com/TechTailor)
- [All Contributors](../../contributors)

### License

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e4825d34110a3d9de54e2ff0c7e6bc0fe3ec8cfa158e69c1a34ba9ff91dfbda?d=identicon)[ash-rain](/maintainers/ash-rain)

---

Top Contributors

[![ash-rain](https://avatars.githubusercontent.com/u/4172202?v=4)](https://github.com/ash-rain "ash-rain (9 commits)")[![TechTailor](https://avatars.githubusercontent.com/u/14147474?v=4)](https://github.com/TechTailor "TechTailor (2 commits)")

### Embed Badge

![Health badge](/badges/ash-rain-laravel-binance-api/health.svg)

```
[![Health](https://phpackages.com/badges/ash-rain-laravel-binance-api/health.svg)](https://phpackages.com/packages/ash-rain-laravel-binance-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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