Releases: binance-exchange/php-binance-api
Stable Release
20 commits by dmzoneill 🏆
Stable Release
withdrawHistory and depositHistory now supports optional parameters: startTime, endTime, status
new withdrawFee function (thanks eugypalu)
withdrawHistory changes suggested by dormadekhin-denis. Thanks!
Stable Release
dmzoneill fixed kline + several other improvements 🏆
Stable Release
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
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
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
Many improvements by dmzoneill, including PHP 5.6 support. Thank you!!
Stable Release
Many improvements and bug fixes by jokaorgua and dmzoneill. Thank you!!
Stable Release
Requires PHP 7!
Numerous improvements to codebase - over 20 improvements by dmzoneill including unit testing and documentation. Thanks!
Stable Release
Many improvements by dmzoneill