Download the PHP package dantecoding/php-binance without Composer
On this page you can find all versions of the php package dantecoding/php-binance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dantecoding/php-binance
More information about dantecoding/php-binance
Files in dantecoding/php-binance
Package php-binance
Short Description A PHP wrapper for the Binance API endpoints.
License MIT
Homepage https://github.com/dantecoding/php-binance
Informations about the package php-binance
Larislackers-BinanceApi
Larislackers-BinanceApi is a Binance.com API wrapper for PHP. Moreover, the API wrapper supports all available functionality given from Binance along with sockets.
All requests are following the HTTP/1.1 protocol and all responses are returned as a PSR-7 ResponseInterface.
Tests are available after providing your key and secret in the corresponding class.
Install
Usage
Information on how to obtain your API key and secret from Binance can be found here.
First things first, in order to use the API wrapper you should initialize it with the aforementioned key and secret like this:
Then, use the initiated object/var like this:
You may find the rest of the supported commands inside the BinanceApiContainer.
Notes
All parameters required for each function must be in array format. More information can be found in the comments (phpdoc) and the links to the corresponding functions documented at Binance.
Avoid to use hardcoded values; enums are available (for intervals, types, sides, etc) for consistency and compliance with the Binance API.
You should use your own logger (like Sentry) and catch BinanceApiException
for exceptions returned from Binance API and LarislackersException
for exceptions returned from Websockets.
Don't reinvent the wheel by trying to cache results in a request lifecycle with static classes. Use a framework that supports caching (like Laravel), an extension (like Memcached) or using files. Additional information can be found here.
More information on how to use the library can be found here.
See the official API documentation for more information about the endpoints and responses.
License
Larislackers-BinanceApi is open-sourced software licensed under the MIT license
Donations/Support
If you find this library to your liking and enjoy using it, please consider a donation to one of the following addresses:
- BTC: 13rSaL7ze89Pz28fNR9cNCnNVNvLWR3eFt
- ETH: 0x03d4566d13ca7c7b30c39666b1f21ff97bee3f97
- XMR: 49hxHRNwLSdQcXuCcac3ySMnAEuH4BhLWR8NddjHi6QBJHNvj1LqcSg2X8qpTQgsE1brzt37W6dLiiSN6uCj1CwyUPNr8R5