@@ -3627,11 +3627,11 @@ private function futuresCandlesticksHelper($symbol, $interval, $limit, $startTim
3627
3627
if (!isset ($ this ->charts ['futures ' ][$ symbol ])) {
3628
3628
$ this ->charts ['futures ' ][$ symbol ] = [];
3629
3629
}
3630
- if (!isset ($ this ->charts ['futures ' ][$ symbol ][$ type ])) {
3631
- $ this ->charts ['futures ' ][$ symbol ][$ type ] = [];
3630
+ if (!isset ($ this ->charts ['futures ' ][$ symbol ][$ contractType ])) {
3631
+ $ this ->charts ['futures ' ][$ symbol ][$ contractType ] = [];
3632
3632
}
3633
- if (!isset ($ this ->charts ['futures ' ][$ symbol ][$ type ][$ interval ])) {
3634
- $ this ->charts ['futures ' ][$ symbol ][$ type ][$ interval ] = [];
3633
+ if (!isset ($ this ->charts ['futures ' ][$ symbol ][$ contractType ][$ interval ])) {
3634
+ $ this ->charts ['futures ' ][$ symbol ][$ contractType ][$ interval ] = [];
3635
3635
}
3636
3636
$ params = [
3637
3637
'interval ' => $ interval ,
@@ -3800,6 +3800,9 @@ public function futuresPrice(string $symbol)
3800
3800
'fapi ' => true ,
3801
3801
];
3802
3802
$ ticker = $ this ->httpRequest ("v1/ticker/price " , "GET " , $ parameters );
3803
+ if (!isset ($ ticker ['price ' ])) {
3804
+ throw new \Exception ("No price found for symbol $ symbol " );
3805
+ }
3803
3806
return $ ticker ['price ' ];
3804
3807
}
3805
3808
@@ -3844,6 +3847,9 @@ public function futuresPriceV2(string $symbol)
3844
3847
'fapi ' => true ,
3845
3848
];
3846
3849
$ ticker = $ this ->httpRequest ("v2/ticker/price " , "GET " , $ parameters );
3850
+ if (!isset ($ ticker ['price ' ])) {
3851
+ throw new \Exception ("No price found for symbol $ symbol " );
3852
+ }
3847
3853
return $ ticker ['price ' ];
3848
3854
}
3849
3855
@@ -6024,6 +6030,8 @@ public function convertSend(string $fromAsset, string $toAsset, $fromAmount = nu
6024
6030
'fromAsset ' => $ fromAsset ,
6025
6031
'toAsset ' => $ toAsset ,
6026
6032
];
6033
+ print_r (PHP_EOL );
6034
+ print_r ('convertSend ' . PHP_EOL );
6027
6035
if ($ fromAmount ) {
6028
6036
$ params ['fromAmount ' ] = $ fromAmount ;
6029
6037
} else if ($ toAmount ) {
0 commit comments