Skip to content

Releases: ccxt/php-binance-api

Stable Release

16 Oct 13:23

Choose a tag to compare

Fix for constructor arguments

Stable Release

08 Sep 12:57
4be9587

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');

Fixes PRICE_FILTER problem

Stable Release

07 Sep 08:08
9752109

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:13

Choose a tag to compare

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

Stable Release

28 May 04:46
36031d4

Choose a tag to compare

cURL PUT method added to fix WebSocket keepalive. Thanks kwshimhyunbo!

Stable Release

21 May 21:38

Choose a tag to compare

Many improvements and bug fixes.
16 commits by dmzoneill 🏆

Stable Release

03 May 18:43

Choose a tag to compare

Automatically fix CA certificate issues in certain WAMP installations
Several improvements + 6 commits by dmzoneill

Stable Release

02 May 17:07

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
876a819

Choose a tag to compare

Fix miniTicker + 7 commits by dmzoneill

Stable Release

22 Apr 03:10
897c9bb

Choose a tag to compare

Fix history() function, fromId defaults to all