Skip to content

Commit 0958e2e

Browse files
ePascalCdmzoneill
authored andcommitted
Added also api status to systemStatus
1 parent adb5e7d commit 0958e2e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

php-binance-api.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2612,14 +2612,21 @@ public function isOnTestnet() : bool
26122612
*
26132613
* @link https://binance-docs.github.io/apidocs/spot/en/#system-status-system
26142614
*
2615-
* @property int $weight 0
2615+
* @property int $weight 1
26162616
*
26172617
* @return array containing the response
26182618
* @throws \Exception
26192619
*/
26202620
public function systemStatus()
26212621
{
26222622
$arr = array();
2623+
$api_status = $this->httpRequest("v3/ping", 'GET');
2624+
if ( empty($api_status) ) {
2625+
$arr['api']['status'] = 'ping ok';
2626+
} else {
2627+
$arr['api']['status'] = $api_status;
2628+
}
2629+
26232630
$arr['sapi'] = $this->httpRequest("v1/system/status", 'GET', [ 'sapi' => true ], true);
26242631
$arr['wapi'] = $this->httpRequest("v3/systemStatus.html", 'GET', [ 'wapi' => true ], true);
26252632
return $arr;

0 commit comments

Comments
 (0)