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

20 Apr 00:17
b6fd311
Compare
Choose a tag to compare

20 commits by dmzoneill 🏆

Stable Release

16 Apr 04:32
222c41f
Compare
Choose a tag to compare

withdrawHistory and depositHistory now supports optional parameters: startTime, endTime, status
new withdrawFee function (thanks eugypalu)
withdrawHistory changes suggested by dormadekhin-denis. Thanks!

Stable Release

16 Apr 00:14
b8ba38a
Compare
Choose a tag to compare

dmzoneill fixed kline + several other improvements 🏆

Stable Release

13 Apr 00:38
b5db5f2
Compare
Choose a tag to compare

More constructor options:

Default way

require 'vendor/autoload.php';
$api = new Binance\API("<api key>","<secret>");

Config file (JSON)

Your json should have "api-key" and "api-secret" values set

require 'vendor/autoload.php';
$api = new Binance\API("config.json");

Stable Release

10 Apr 21:30
4382989
Compare
Choose a tag to compare

Added WebSocket kline function:

Get latest candlestick data only

$api->kline(["BTCUSDT", "EOSBTC"], "5m", function($api, $symbol, $chart) {
  //echo "{$symbol} ({$interval}) candlestick update\n";
	$interval = $chart->i;
	$tick = $chart->t;
	$open = $chart->o;
	$high = $chart->h;
	$low = $chart->l;
	$close = $chart->c;
	$volume = $chart->q; // +trades buyVolume assetVolume makerVolume
	echo "{$symbol} price: {$close}\t volume: {$volume}\n";
});

Add miniTicker() WebSocket example:

miniTicker return the latest candlestick information for every symbol

$api->miniTicker(function($api, $ticker) {
	print_r($ticker);
});
View Response
    [18] => Array
        (
            [symbol] => ONTBNB
            [close] => 0.37649000
            [open] => 0.30241000
            [high] => 0.38112000
            [low] => 0.29300000
            [volume] => 975240.72000000
            [quoteVolume] => 326908.77744250
            [eventTime] => 1523395389582
        )

    [19] => Array
        (
            [symbol] => WANBTC
            [close] => 0.00063657
            [open] => 0.00054151
            [high] => 0.00063900
            [low] => 0.00053900
            [volume] => 4443618.00000000
            [quoteVolume] => 2637.76413131
            [eventTime] => 1523395389551
        )

Stable Release

07 Apr 19:00
0536d70
Compare
Choose a tag to compare

Multiple constructor support & specify file in constructor (by dmzoneill)
You can now pass a json filename to the constructor to load your API keys and settings from there

Stable Release

05 Apr 18:15
09cafd4
Compare
Choose a tag to compare

Many improvements by dmzoneill, including PHP 5.6 support. Thank you!!

Stable Release

03 Apr 16:41
eef886c
Compare
Choose a tag to compare

Many improvements and bug fixes by jokaorgua and dmzoneill. Thank you!!

Stable Release

02 Apr 17:27
dbe981f
Compare
Choose a tag to compare

Requires PHP 7!
Numerous improvements to codebase - over 20 improvements by dmzoneill including unit testing and documentation. Thanks!

Stable Release

28 Mar 18:05
6d9f7b5
Compare
Choose a tag to compare

Many improvements by dmzoneill