@@ -148,7 +148,7 @@ public function __set(string $member, $value)
148
148
* @param $file string file location
149
149
* @return null
150
150
*/
151
- protected function setupApiConfigFromFile (string $ file = null )
151
+ protected function setupApiConfigFromFile (? string $ file = null )
152
152
{
153
153
$ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
154
154
@@ -174,7 +174,7 @@ protected function setupApiConfigFromFile(string $file = null)
174
174
* @param $file string file location
175
175
* @return null
176
176
*/
177
- protected function setupCurlOptsFromFile (string $ file = null )
177
+ protected function setupCurlOptsFromFile (? string $ file = null )
178
178
{
179
179
$ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
180
180
@@ -197,7 +197,7 @@ protected function setupCurlOptsFromFile(string $file = null)
197
197
*
198
198
* @return null
199
199
*/
200
- protected function setupProxyConfigFromFile (string $ file = null )
200
+ protected function setupProxyConfigFromFile (? string $ file = null )
201
201
{
202
202
$ file = is_null ($ file ) ? getenv ("HOME " ) . "/.config/jaggedsoft/php-binance-api.json " : $ file ;
203
203
@@ -613,7 +613,7 @@ public function orders(string $symbol, int $limit = 500, int $fromOrderId = 0, a
613
613
* @return array with error message or array of orderDetails array
614
614
* @throws \Exception
615
615
*/
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 = [])
617
617
{
618
618
$ request = [
619
619
"symbol " => $ symbol ,
@@ -640,7 +640,7 @@ public function history(string $symbol, int $limit = 500, int $fromTradeId = -1,
640
640
* @return array with error message or array of orderDetails array
641
641
* @throws \Exception
642
642
*/
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 = [])
644
644
{
645
645
return $ this ->history ($ symbol , $ limit , $ fromTradeId , $ startTime , $ endTime , $ params );
646
646
}
@@ -953,7 +953,7 @@ public function depositAddress(string $asset, $network = null, array $params = [
953
953
* @return array containing the response
954
954
* @throws \Exception
955
955
*/
956
- public function depositHistory (string $ asset = null , array $ params = [])
956
+ public function depositHistory (? string $ asset = null , array $ params = [])
957
957
{
958
958
$ request = array ();
959
959
if (is_null ($ asset ) === false ) {
@@ -987,7 +987,7 @@ public function depositHistory(string $asset = null, array $params = [])
987
987
* @return array containing the response
988
988
* @throws \Exception
989
989
*/
990
- public function withdrawHistory (string $ asset = null , array $ params = [])
990
+ public function withdrawHistory (? string $ asset = null , array $ params = [])
991
991
{
992
992
$ request = array ();
993
993
if (is_null ($ asset ) === false ) {
@@ -1212,7 +1212,7 @@ public function account(array $params = [])
1212
1212
* @return array with error message or array of prevDay change
1213
1213
* @throws \Exception
1214
1214
*/
1215
- public function prevDay (string $ symbol = null , array $ params = [])
1215
+ public function prevDay (? string $ symbol = null , array $ params = [])
1216
1216
{
1217
1217
$ request = [];
1218
1218
if (is_null ($ symbol ) === false ) {
@@ -1839,7 +1839,7 @@ public function order(string $side, string $symbol, $quantity, $price, string $t
1839
1839
* @return array containing the response
1840
1840
* @throws \Exception
1841
1841
*/
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 = [])
1843
1843
{
1844
1844
if (!isset ($ this ->charts [$ symbol ])) {
1845
1845
$ this ->charts [$ symbol ] = [];
@@ -2267,7 +2267,7 @@ public function displayDepth(array $array)
2267
2267
* @param $json array of the depth infomration
2268
2268
* @return array of the depth information
2269
2269
*/
2270
- protected function depthData (string $ symbol , array $ json , string $ product_type = null )
2270
+ protected function depthData (string $ symbol , array $ json , ? string $ product_type = null )
2271
2271
{
2272
2272
$ bids = $ asks = [];
2273
2273
foreach ($ json ['bids ' ] as $ obj ) {
@@ -2672,7 +2672,7 @@ public function ticker($symbol, callable $callback)
2672
2672
* @return null
2673
2673
* @throws \Exception
2674
2674
*/
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 )
2676
2676
{
2677
2677
if (is_null ($ callback )) {
2678
2678
throw new Exception ("You must provide a valid callback " );
@@ -2756,7 +2756,7 @@ public function chart($symbols, string $interval = "30m", callable $callback = n
2756
2756
* @return null
2757
2757
* @throws \Exception
2758
2758
*/
2759
- public function kline ($ symbols , string $ interval = "30m " , callable $ callback = null )
2759
+ public function kline ($ symbols , string $ interval = "30m " , ? callable $ callback = null )
2760
2760
{
2761
2761
if (is_null ($ callback )) {
2762
2762
throw new Exception ("You must provide a valid callback " );
@@ -3413,7 +3413,7 @@ public function futuresExchangeInfo(array $params = [])
3413
3413
* @return array with error message or array of market depth
3414
3414
* @throws \Exception
3415
3415
*/
3416
- public function futuresDepth (string $ symbol , int $ limit = null , array $ params = [])
3416
+ public function futuresDepth (string $ symbol , ? int $ limit = null , array $ params = [])
3417
3417
{
3418
3418
if (isset ($ symbol ) === false || is_string ($ symbol ) === false ) {
3419
3419
// WPCS: XSS OK.
@@ -3458,7 +3458,7 @@ public function futuresDepth(string $symbol, int $limit = null, array $params =
3458
3458
* @return array containing the response
3459
3459
* @throws \Exception
3460
3460
*/
3461
- public function futuresRecentTrades (string $ symbol , int $ limit = null , array $ params = [])
3461
+ public function futuresRecentTrades (string $ symbol , ? int $ limit = null , array $ params = [])
3462
3462
{
3463
3463
$ request = [
3464
3464
'symbol ' => $ symbol ,
@@ -3517,7 +3517,7 @@ public function futuresHistoricalTrades(string $symbol, $limit = null, $tradeId
3517
3517
* @return array with error message or array of market history
3518
3518
* @throws \Exception
3519
3519
*/
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 = [])
3521
3521
{
3522
3522
$ request = [
3523
3523
'symbol ' => $ symbol ,
@@ -3560,7 +3560,7 @@ public function futuresAggTrades(string $symbol, int $fromId = null, int $startT
3560
3560
* @return array containing the response
3561
3561
* @throws \Exception
3562
3562
*/
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 = [])
3564
3564
{
3565
3565
return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'klines ' , null , $ params );
3566
3566
}
@@ -3589,7 +3589,7 @@ public function futuresCandlesticks(string $symbol, string $interval = '5m', int
3589
3589
* @return array containing the response
3590
3590
* @throws \Exception
3591
3591
*/
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 = [])
3593
3593
{
3594
3594
return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'continuousKlines ' , $ contractType , $ params );
3595
3595
}
@@ -3617,7 +3617,7 @@ public function futuresContinuousCandlesticks(string $symbol, string $interval =
3617
3617
* @return array containing the response
3618
3618
* @throws \Exception
3619
3619
*/
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 = [])
3621
3621
{
3622
3622
return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'indexPriceKlines ' , null , $ params );
3623
3623
}
@@ -3645,7 +3645,7 @@ public function futuresIndexPriceCandlesticks(string $symbol, string $interval =
3645
3645
* @return array containing the response
3646
3646
* @throws \Exception
3647
3647
*/
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 = [])
3649
3649
{
3650
3650
return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'markPriceKlines ' , null , $ params );
3651
3651
}
@@ -3673,7 +3673,7 @@ public function futuresMarkPriceCandlesticks(string $symbol, string $interval =
3673
3673
* @return array containing the response
3674
3674
* @throws \Exception
3675
3675
*/
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 = [])
3677
3677
{
3678
3678
return $ this ->futuresCandlesticksHelper ($ symbol , $ interval , $ limit , $ startTime , $ endTime , 'premiumIndexKlines ' , null , $ params );
3679
3679
}
@@ -3747,7 +3747,7 @@ private function futuresCandlesticksHelper($symbol, $interval, $limit, $startTim
3747
3747
* @return array containing the response
3748
3748
* @throws \Exception
3749
3749
*/
3750
- public function futuresMarkPrice (string $ symbol = null , array $ params = [])
3750
+ public function futuresMarkPrice (? string $ symbol = null , array $ params = [])
3751
3751
{
3752
3752
$ request = [];
3753
3753
if ($ symbol ) {
@@ -3772,7 +3772,7 @@ public function futuresMarkPrice(string $symbol = null, array $params = [])
3772
3772
* @return array containing the response
3773
3773
* @throws \Exception
3774
3774
*/
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 = [])
3776
3776
{
3777
3777
$ request = [];
3778
3778
if ($ symbol ) {
@@ -3823,7 +3823,7 @@ public function futuresFundingInfo(array $params = [])
3823
3823
* @return array containing the response
3824
3824
* @throws \Exception
3825
3825
*/
3826
- public function futuresPrevDay (string $ symbol = null , array $ params = [])
3826
+ public function futuresPrevDay (? string $ symbol = null , array $ params = [])
3827
3827
{
3828
3828
$ request = [];
3829
3829
if ($ symbol ) {
@@ -3936,7 +3936,7 @@ public function futuresPricesV2(array $params = [])
3936
3936
* @return array containing the response
3937
3937
* @throws \Exception
3938
3938
*/
3939
- public function futuresSymbolOrderBookTicker (string $ symbol = null , array $ params = []): array
3939
+ public function futuresSymbolOrderBookTicker (? string $ symbol = null , array $ params = []): array
3940
3940
{
3941
3941
$ request = [];
3942
3942
if ($ symbol ) {
@@ -4026,7 +4026,7 @@ private function sapieriodLimitStartEndFuturesDataRequest($symbol, $period, $lim
4026
4026
* @return array containing the response
4027
4027
* @throws \Exception
4028
4028
*/
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 = [])
4030
4030
{
4031
4031
return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'openInterestHist ' , $ params );
4032
4032
}
@@ -4047,7 +4047,7 @@ public function futuresOpenInterestHistory(string $symbol, string $period = '5m'
4047
4047
* @return array containing the response
4048
4048
* @throws \Exception
4049
4049
*/
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 = [])
4051
4051
{
4052
4052
return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'topLongShortPositionRatio ' , $ params );
4053
4053
}
@@ -4068,7 +4068,7 @@ public function futuresTopLongShortPositionRatio(string $symbol, string $period
4068
4068
* @return array containing the response
4069
4069
* @throws \Exception
4070
4070
*/
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 = [])
4072
4072
{
4073
4073
return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'topLongShortAccountRatio ' , $ params );
4074
4074
}
@@ -4089,7 +4089,7 @@ public function futuresTopLongShortAccountRatio(string $symbol, string $period =
4089
4089
* @return array containing the response
4090
4090
* @throws \Exception
4091
4091
*/
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 = [])
4093
4093
{
4094
4094
return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'globalLongShortAccountRatio ' , $ params );
4095
4095
}
@@ -4110,7 +4110,7 @@ public function futuresGlobalLongShortAccountRatio(string $symbol, string $perio
4110
4110
* @return array containing the response
4111
4111
* @throws \Exception
4112
4112
*/
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 = [])
4114
4114
{
4115
4115
return $ this ->sapieriodLimitStartEndFuturesDataRequest ($ symbol , $ period , $ limit , $ startTime , $ endTime , 'takerlongshortRatio ' , $ params );
4116
4116
}
@@ -4191,7 +4191,7 @@ public function futuresIndexInfo(string $symbol, array $params = [])
4191
4191
* @return array containing the response
4192
4192
* @throws \Exception
4193
4193
*/
4194
- public function futuresAssetIndex (string $ symbol = null , array $ params = [])
4194
+ public function futuresAssetIndex (? string $ symbol = null , array $ params = [])
4195
4195
{
4196
4196
$ request = [];
4197
4197
if ($ symbol ) {
@@ -5674,7 +5674,7 @@ public function futuresTradingStatus($symbol = null, array $params = [])
5674
5674
* futuresDownloadId
5675
5675
* helper for other metods for getting download id
5676
5676
*/
5677
- protected function futuresDownloadId ($ startTime , $ endTime , array $ params = null , string $ url = '' )
5677
+ protected function futuresDownloadId ($ startTime , $ endTime , ? array $ params = null , string $ url = '' )
5678
5678
{
5679
5679
$ request = [
5680
5680
'startTime ' => $ startTime ,
@@ -5688,7 +5688,7 @@ protected function futuresDownloadId($startTime, $endTime, array $params = null,
5688
5688
* futuresDownloadLinkByDownloadId
5689
5689
* helper for other metods for getting download link by download id
5690
5690
*/
5691
- protected function futuresDownloadLinkByDownloadId (string $ downloadId , array $ params = null , string $ url = '' )
5691
+ protected function futuresDownloadLinkByDownloadId (string $ downloadId , ? array $ params = null , string $ url = '' )
5692
5692
{
5693
5693
$ request = [
5694
5694
'downloadId ' => $ downloadId ,
0 commit comments