Skip to content

Commit

Permalink
Merge pull request #93 from jokaorgua/master
Browse files Browse the repository at this point in the history
Update php-binance-api.php
Jon Eyrick authored Mar 30, 2018
2 parents 1cbfcb1 + 9b68a44 commit f753a9b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions php-binance-api.php
Original file line number Diff line number Diff line change
@@ -470,15 +470,19 @@ public function account() {
}

/**
* prevDay get 24hr ticker price change statistics for a symbol
* prevDay get 24hr ticker price change statistics for symbols
*
* $prevDay = $api->prevDay("BNBBTC");
*
* @param $symbol the symbol to get the previous day change for
* @param $symbol (optional) symbol to get the previous day change for
* @return array with error message or array of prevDay change
*/
public function prevDay($symbol) {
return $this->httpRequest("v1/ticker/24hr", "GET", ["symbol"=>$symbol]);
public function prevDay($symbol = '') {
$additionalData = [];
if(!empty($symbol)){
$additionalData = ['symbol' => $symbol];
}
return $this->httpRequest("v1/ticker/24hr", "GET", $additionalData);
}

/**

0 comments on commit f753a9b

Please sign in to comment.