@@ -148,7 +148,7 @@ public function __set(string $member, $value)
148148 * @param $file string file location
149149 * @return null
150150 */
151- protected function setupApiConfigFromFile (string $ file = null )
151+ protected function setupApiConfigFromFile (? string $ file = null )
152152 {
153153 $ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
154154
@@ -174,7 +174,7 @@ protected function setupApiConfigFromFile(string $file = null)
174174 * @param $file string file location
175175 * @return null
176176 */
177- protected function setupCurlOptsFromFile (string $ file = null )
177+ protected function setupCurlOptsFromFile (? string $ file = null )
178178 {
179179 $ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
180180
@@ -197,7 +197,7 @@ protected function setupCurlOptsFromFile(string $file = null)
197197 *
198198 * @return null
199199 */
200- protected function setupProxyConfigFromFile (string $ file = null )
200+ protected function setupProxyConfigFromFile (? string $ file = null )
201201 {
202202 $ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
203203
@@ -613,7 +613,7 @@ public function orders(string $symbol, int $limit = 500, int $fromOrderId = 0, a
613613 * @return array with error message or array of orderDetails array
614614 * @throws \Exception
615615 */
616- public function history (string $ symbol , int $ limit = 500 , int $ fromTradeId = -1 , int $ startTime = null , int $ endTime = null , array $ params = [])
616+ public function history (string $ symbol , int $ limit = 500 , int $ fromTradeId = -1 , ? int $ startTime = null , ? int $ endTime = null , array $ params = [])
617617 {
618618 $ request = [
619619 "symbol " => $ symbol ,
@@ -640,7 +640,7 @@ public function history(string $symbol, int $limit = 500, int $fromTradeId = -1,
640640 * @return array with error message or array of orderDetails array
641641 * @throws \Exception
642642 */
643- public function myTrades (string $ symbol , int $ limit = 500 , int $ fromTradeId = -1 , int $ startTime = null , int $ endTime = null , array $ params = [])
643+ public function myTrades (string $ symbol , int $ limit = 500 , int $ fromTradeId = -1 , ? int $ startTime = null , ? int $ endTime = null , array $ params = [])
644644 {
645645 return $ this ->history ($ symbol , $ limit , $ fromTradeId , $ startTime , $ endTime , $ params );
646646 }
@@ -953,7 +953,7 @@ public function depositAddress(string $asset, $network = null, array $params = [
953953 * @return array containing the response
954954 * @throws \Exception
955955 */
956- public function depositHistory (string $ asset = null , array $ params = [])
956+ public function depositHistory (? string $ asset = null , array $ params = [])
957957 {
958958 $ request = array ();
959959 if (is_null ($ asset ) === false ) {
@@ -987,7 +987,7 @@ public function depositHistory(string $asset = null, array $params = [])
987987 * @return array containing the response
988988 * @throws \Exception
989989 */
990- public function withdrawHistory (string $ asset = null , array $ params = [])
990+ public function withdrawHistory (? string $ asset = null , array $ params = [])
991991 {
992992 $ request = array ();
993993 if (is_null ($ asset ) === false ) {
@@ -1212,7 +1212,7 @@ public function account(array $params = [])
12121212 * @return array with error message or array of prevDay change
12131213 * @throws \Exception
12141214 */
1215- public function prevDay (string $ symbol = null , array $ params = [])
1215+ public function prevDay (? string $ symbol = null , array $ params = [])
12161216 {
12171217 $ request = [];
12181218 if (is_null ($ symbol ) === false ) {
@@ -1839,7 +1839,7 @@ public function order(string $side, string $symbol, $quantity, $price, string $t
18391839 * @return array containing the response
18401840 * @throws \Exception
18411841 */
1842- public function candlesticks (string $ symbol , string $ interval = "5m " , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
1842+ public function candlesticks (string $ symbol , string $ interval = "5m " , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
18431843 {
18441844 if (!isset ($ this ->charts [$ symbol ])) {
18451845 $ this ->charts [$ symbol ] = [];
@@ -2267,7 +2267,7 @@ public function displayDepth(array $array)
22672267 * @param $json array of the depth infomration
22682268 * @return array of the depth information
22692269 */
2270- protected function depthData (string $ symbol , array $ json , string $ product_type = null )
2270+ protected function depthData (string $ symbol , array $ json , ? string $ product_type = null )
22712271 {
22722272 $ bids = $ asks = [];
22732273 foreach ($ json ['bids ' ] as $ obj ) {
@@ -2672,7 +2672,7 @@ public function ticker($symbol, callable $callback)
26722672 * @return null
26732673 * @throws \Exception
26742674 */
2675- public function chart ($ symbols , string $ interval = "30m " , callable $ callback = null , $ limit = 500 )
2675+ public function chart ($ symbols , string $ interval = "30m " , ? callable $ callback = null , $ limit = 500 )
26762676 {
26772677 if (is_null ($ callback )) {
26782678 throw new Exception ("You must provide a valid callback " );
@@ -2756,7 +2756,7 @@ public function chart($symbols, string $interval = "30m", callable $callback = n
27562756 * @return null
27572757 * @throws \Exception
27582758 */
2759- public function kline ($ symbols , string $ interval = "30m " , callable $ callback = null )
2759+ public function kline ($ symbols , string $ interval = "30m " , ? callable $ callback = null )
27602760 {
27612761 if (is_null ($ callback )) {
27622762 throw new Exception ("You must provide a valid callback " );
@@ -3413,7 +3413,7 @@ public function futuresExchangeInfo(array $params = [])
34133413 * @return array with error message or array of market depth
34143414 * @throws \Exception
34153415 */
3416- public function futuresDepth (string $ symbol , int $ limit = null , array $ params = [])
3416+ public function futuresDepth (string $ symbol , ? int $ limit = null , array $ params = [])
34173417 {
34183418 if (isset ($ symbol ) === false || is_string ($ symbol ) === false ) {
34193419 // WPCS: XSS OK.
@@ -3458,7 +3458,7 @@ public function futuresDepth(string $symbol, int $limit = null, array $params =
34583458 * @return array containing the response
34593459 * @throws \Exception
34603460 */
3461- public function futuresRecentTrades (string $ symbol , int $ limit = null , array $ params = [])
3461+ public function futuresRecentTrades (string $ symbol , ? int $ limit = null , array $ params = [])
34623462 {
34633463 $ request = [
34643464 'symbol ' => $ symbol ,
@@ -3517,7 +3517,7 @@ public function futuresHistoricalTrades(string $symbol, $limit = null, $tradeId
35173517 * @return array with error message or array of market history
35183518 * @throws \Exception
35193519 */
3520- public function futuresAggTrades (string $ symbol , int $ fromId = null , int $ startTime = null , int $ endTime = null , int $ limit = null , array $ params = [])
3520+ public function futuresAggTrades (string $ symbol , ? int $ fromId = null , ? int $ startTime = null , ? int $ endTime = null , ? int $ limit = null , array $ params = [])
35213521 {
35223522 $ request = [
35233523 'symbol ' => $ symbol ,
@@ -3560,7 +3560,7 @@ public function futuresAggTrades(string $symbol, int $fromId = null, int $startT
35603560 * @return array containing the response
35613561 * @throws \Exception
35623562 */
3563- public function futuresCandlesticks (string $ symbol , string $ interval = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
3563+ public function futuresCandlesticks (string $ symbol , string $ interval = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
35643564 {
35653565 return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'klines ' , null , $ params );
35663566 }
@@ -3589,7 +3589,7 @@ public function futuresCandlesticks(string $symbol, string $interval = '5m', int
35893589 * @return array containing the response
35903590 * @throws \Exception
35913591 */
3592- public function futuresContinuousCandlesticks (string $ symbol , string $ interval = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , $ contractType = 'PERPETUAL ' , array $ params = [])
3592+ public function futuresContinuousCandlesticks (string $ symbol , string $ interval = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , $ contractType = 'PERPETUAL ' , array $ params = [])
35933593 {
35943594 return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'continuousKlines ' , $ contractType , $ params );
35953595 }
@@ -3617,7 +3617,7 @@ public function futuresContinuousCandlesticks(string $symbol, string $interval =
36173617 * @return array containing the response
36183618 * @throws \Exception
36193619 */
3620- public function futuresIndexPriceCandlesticks (string $ symbol , string $ interval = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
3620+ public function futuresIndexPriceCandlesticks (string $ symbol , string $ interval = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
36213621 {
36223622 return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'indexPriceKlines ' , null , $ params );
36233623 }
@@ -3645,7 +3645,7 @@ public function futuresIndexPriceCandlesticks(string $symbol, string $interval =
36453645 * @return array containing the response
36463646 * @throws \Exception
36473647 */
3648- public function futuresMarkPriceCandlesticks (string $ symbol , string $ interval = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
3648+ public function futuresMarkPriceCandlesticks (string $ symbol , string $ interval = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
36493649 {
36503650 return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'markPriceKlines ' , null , $ params );
36513651 }
@@ -3673,7 +3673,7 @@ public function futuresMarkPriceCandlesticks(string $symbol, string $interval =
36733673 * @return array containing the response
36743674 * @throws \Exception
36753675 */
3676- public function futuresPremiumIndexCandlesticks (string $ symbol , string $ interval = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
3676+ public function futuresPremiumIndexCandlesticks (string $ symbol , string $ interval = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
36773677 {
36783678 return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'premiumIndexKlines ' , null , $ params );
36793679 }
@@ -3747,7 +3747,7 @@ private function futuresCandlesticksHelper($symbol, $interval, $limit, $startTim
37473747 * @return array containing the response
37483748 * @throws \Exception
37493749 */
3750- public function futuresMarkPrice (string $ symbol = null , array $ params = [])
3750+ public function futuresMarkPrice (? string $ symbol = null , array $ params = [])
37513751 {
37523752 $ request = [];
37533753 if ($ symbol ) {
@@ -3772,7 +3772,7 @@ public function futuresMarkPrice(string $symbol = null, array $params = [])
37723772 * @return array containing the response
37733773 * @throws \Exception
37743774 */
3775- public function futuresFundingRateHistory (string $ symbol = null , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
3775+ public function futuresFundingRateHistory (? string $ symbol = null , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
37763776 {
37773777 $ request = [];
37783778 if ($ symbol ) {
@@ -3823,7 +3823,7 @@ public function futuresFundingInfo(array $params = [])
38233823 * @return array containing the response
38243824 * @throws \Exception
38253825 */
3826- public function futuresPrevDay (string $ symbol = null , array $ params = [])
3826+ public function futuresPrevDay (? string $ symbol = null , array $ params = [])
38273827 {
38283828 $ request = [];
38293829 if ($ symbol ) {
@@ -3936,7 +3936,7 @@ public function futuresPricesV2(array $params = [])
39363936 * @return array containing the response
39373937 * @throws \Exception
39383938 */
3939- public function futuresSymbolOrderBookTicker (string $ symbol = null , array $ params = []): array
3939+ public function futuresSymbolOrderBookTicker (? string $ symbol = null , array $ params = []): array
39403940 {
39413941 $ request = [];
39423942 if ($ symbol ) {
@@ -4026,7 +4026,7 @@ private function sapieriodLimitStartEndFuturesDataRequest($symbol, $period, $lim
40264026 * @return array containing the response
40274027 * @throws \Exception
40284028 */
4029- public function futuresOpenInterestHistory (string $ symbol , string $ period = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
4029+ public function futuresOpenInterestHistory (string $ symbol , string $ period = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
40304030 {
40314031 return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'openInterestHist ' , $ params );
40324032 }
@@ -4047,7 +4047,7 @@ public function futuresOpenInterestHistory(string $symbol, string $period = '5m'
40474047 * @return array containing the response
40484048 * @throws \Exception
40494049 */
4050- public function futuresTopLongShortPositionRatio (string $ symbol , string $ period = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
4050+ public function futuresTopLongShortPositionRatio (string $ symbol , string $ period = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
40514051 {
40524052 return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'topLongShortPositionRatio ' , $ params );
40534053 }
@@ -4068,7 +4068,7 @@ public function futuresTopLongShortPositionRatio(string $symbol, string $period
40684068 * @return array containing the response
40694069 * @throws \Exception
40704070 */
4071- public function futuresTopLongShortAccountRatio (string $ symbol , string $ period = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
4071+ public function futuresTopLongShortAccountRatio (string $ symbol , string $ period = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
40724072 {
40734073 return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'topLongShortAccountRatio ' , $ params );
40744074 }
@@ -4089,7 +4089,7 @@ public function futuresTopLongShortAccountRatio(string $symbol, string $period =
40894089 * @return array containing the response
40904090 * @throws \Exception
40914091 */
4092- public function futuresGlobalLongShortAccountRatio (string $ symbol , string $ period = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
4092+ public function futuresGlobalLongShortAccountRatio (string $ symbol , string $ period = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
40934093 {
40944094 return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'globalLongShortAccountRatio ' , $ params );
40954095 }
@@ -4110,7 +4110,7 @@ public function futuresGlobalLongShortAccountRatio(string $symbol, string $perio
41104110 * @return array containing the response
41114111 * @throws \Exception
41124112 */
4113- public function futuresTakerLongShortRatio (string $ symbol , string $ period = '5m ' , int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
4113+ public function futuresTakerLongShortRatio (string $ symbol , string $ period = '5m ' , ? int $ limit = null , $ startTime = null , $ endTime = null , array $ params = [])
41144114 {
41154115 return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'takerlongshortRatio ' , $ params );
41164116 }
@@ -4191,7 +4191,7 @@ public function futuresIndexInfo(string $symbol, array $params = [])
41914191 * @return array containing the response
41924192 * @throws \Exception
41934193 */
4194- public function futuresAssetIndex (string $ symbol = null , array $ params = [])
4194+ public function futuresAssetIndex (? string $ symbol = null , array $ params = [])
41954195 {
41964196 $ request = [];
41974197 if ($ symbol ) {
@@ -5674,7 +5674,7 @@ public function futuresTradingStatus($symbol = null, array $params = [])
56745674 * futuresDownloadId
56755675 * helper for other metods for getting download id
56765676 */
5677- protected function futuresDownloadId ($ startTime , $ endTime , array $ params = null , string $ url = '' )
5677+ protected function futuresDownloadId ($ startTime , $ endTime , ? array $ params = null , string $ url = '' )
56785678 {
56795679 $ request = [
56805680 'startTime ' => $ startTime ,
@@ -5688,7 +5688,7 @@ protected function futuresDownloadId($startTime, $endTime, array $params = null,
56885688 * futuresDownloadLinkByDownloadId
56895689 * helper for other metods for getting download link by download id
56905690 */
5691- protected function futuresDownloadLinkByDownloadId (string $ downloadId , array $ params = null , string $ url = '' )
5691+ protected function futuresDownloadLinkByDownloadId (string $ downloadId , ? array $ params = null , string $ url = '' )
56925692 {
56935693 $ request = [
56945694 'downloadId ' => $ downloadId ,
0 commit comments