This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
Releases: binance-exchange/php-binance-api
Releases · binance-exchange/php-binance-api
Stable Release
Fix POST requests by afsharsafavi
Add assetDetail + example by afsharsafavi
Stable Release
Added optional limit to chart function
Stable Release
Added extra parameters to cancel
function
Example:
$answer = $api->cancel("BTCUSDT", "177688888", ["side"=>"sell"]);
Stable Release
Fix for constructor arguments
Stable Release
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
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
FIX: Indirect modification of overloaded property by dmzoneill
Add option to use system CA certificate by dmzoneill
Stable Release
Many improvements and bug fixes.
16 commits by dmzoneill 🏆
Stable Release
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
Fix miniTicker + 7 commits by dmzoneill