Download the PHP package kleninm/binance-api without Composer
On this page you can find all versions of the php package kleninm/binance-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kleninm/binance-api
More information about kleninm/binance-api
Files in kleninm/binance-api
Informations about the package binance-api
Binance PHP API Client
The purpose of this project is to assist you in creating your own projects that interact with the Binance SPOT API.
Supported in the current version Wallet Endpoints, Market Data Endpoints and Spot Account/Trade
Introduction
This project requires php version more or equal 8.2. Also it requires bcmath extension and guzzle dependency
Installation
Quick start
Every original method's name in \BinanceApi\Binance
class created by name from url after prefix v1
, v2
or v3
.
For example, by table:
Link to endpoint | Method name |
[Order Book](https://binance-docs.github.io/apidocs/spot/en/#order-book) | |
[Symbol Order Book Ticker](https://binance-docs.github.io/apidocs/spot/en/#symbol-order-book-ticker) | |
[24hr Ticker Price Change Statistics](https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics) | |
[Withdraw History (supporting network)](https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data) |
All endpoints and their methods with parameters you can see in phpdoc in \BinanceApi\Binance
class
Full docs you can find in documentation
folder of this repository
Look at the Basic topic to learn more features
Look at the Digging deeper topic if you want to dive deep into the mechanism and add more yourself customizations and scale functionality
You can go to the Examples and Analogs topic to see more examples, include what each function returns
Simple start
View $fullResult variable
If you want to use testnet
Set api keys
Some endpoints will require an API Keys. You can set them like this:
Handle often throws errors:
Full list of errors, you can see in Basic topic
Rate limits
Limits by IP
You know how much weight you use
Binance reset weights by IP (api and sapi) every minute
Binance time
At any places where you need to use time, use a binance microtime format
You can get binance microtime now by function:
More examples
Common part for all next examples
Exchange info
Current exchange trading rules and symbol information
Order book
All three methods are identical. Use that you prefer
Trades
All two methods are identical. Use that you prefer
Klines/Candlestick
Kline/candlestick bars for a symbol.
Prices
Latest price for a symbol or symbols.
Limit order
Market order
Stop loss order
Take profit order
Get open orders
Get all open orders on a symbol. Careful when accessing this with no symbol.
Get order status
Check an order's status.
Cancel order
Cancel an active order.
Cancel all orders
Cancels all active orders on a symbol.
Account Information (Including Balances)
Get current account information.
Account Trade List
Get trades for a specific account and symbol.
All Coins' Information
Get information of coins (available for deposit and withdraw) for user.
Withdraw
Submit a withdraw request.
Withdraw History (supporting network)
Fetch withdraw history.
Deposit Address (supporting network)
Fetch deposit address with network.
Deposit History (supporting network)
Fetch deposit history.
Contributing
- Please give a star or fork repository 💫
- Create a new issues or pull requests 🤝
License
Binance PHP API Client is licensed under The MIT License (MIT).