Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Releases: binance-exchange/php-binance-api

Stable Release

22 Jan 12:31
d731b6b
Compare
Choose a tag to compare

Fix POST requests by afsharsafavi
Add assetDetail + example by afsharsafavi

Stable Release

27 Oct 11:22
b331781
Compare
Choose a tag to compare

Added optional limit to chart function

Stable Release

19 Oct 10:04
b6b047e
Compare
Choose a tag to compare

Added extra parameters to cancel function

Example:
$answer = $api->cancel("BTCUSDT", "177688888", ["side"=>"sell"]);

Stable Release

16 Oct 13:24
7a5f59c
Compare
Choose a tag to compare

Fix for constructor arguments

Stable Release

08 Sep 13:01
ea51f7b
Compare
Choose a tag to compare

roundTicks: Used to round price with tickSize. Example: roundTicks(0.12345, '0.001') = 0.123

function roundTicks($price, $tickSize) {
        $precision = strlen(rtrim(substr($tickSize,strpos($tickSize, '.', 1) + 1), '0'));
        return number_format($price, $precision, '.', '');
}
echo roundTicks(0.00016552, '0.00000010');

Fix for PRICE_FILTER

Stable Release

07 Sep 08:10
1a72414
Compare
Choose a tag to compare

add roundStep function to help with stepSize
$quantity = roundStep($quantity, $stepSize);

function roundStep($value, $stepSize = 0.1) {
        $precision = strlen(substr(strrchr(rtrim($value,'0'), '.'), 1));
        return round((($value / $stepSize) | 0) * $stepSize, $precision);
}

Stable Release

14 Jul 12:14
22f0455
Compare
Choose a tag to compare

FIX: Indirect modification of overloaded property by dmzoneill
Add option to use system CA certificate by dmzoneill

Stable Release

21 May 21:38
f984b4b
Compare
Choose a tag to compare

Many improvements and bug fixes.
16 commits by dmzoneill 🏆

Stable Release

02 May 17:07
9f0786e
Compare
Choose a tag to compare

Please see the update to the constructor:

require 'vendor/autoload.php';
// 1. config in home directory
$api = new Binance\API();
// 2. config in specified file
$api = new Binance\API( "somefile.json" );
// 3. config by specifying api key and secret
$api = new Binance\API("<api key>","<secret>");
    public function __construct()
    {
        $param = func_get_args();
        switch (func_num_args()) {
            case 0:
                $this->setupApiConfigFromFile();
                $this->setupProxyConfigFromFile();
                break;
            case 1:
                $this->setupApiConfigFromFile($param[0]);
                $this->setupProxyConfigFromFile($param[0]);
                $this->setupCurlOptsFromFile($param[0]);
                break;
            case 2:
                $this->api_key = $param[0];
                $this->api_secret = $param[1];
                break;
        }
    }

Stable Release

25 Apr 19:22
9f55594
Compare
Choose a tag to compare

Fix miniTicker + 7 commits by dmzoneill