Skip to content

Commit 44ff64e

Browse files
authored
another typo fixed
1 parent 42811fe commit 44ff64e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

php-binance-api.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,11 +3627,11 @@ private function futuresCandlesticksHelper($symbol, $interval, $limit, $startTim
36273627
if (!isset($this->charts['futures'][$symbol])) {
36283628
$this->charts['futures'][$symbol] = [];
36293629
}
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] = [];
36323632
}
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] = [];
36353635
}
36363636
$params = [
36373637
'interval' => $interval,
@@ -3800,6 +3800,9 @@ public function futuresPrice(string $symbol)
38003800
'fapi' => true,
38013801
];
38023802
$ticker = $this->httpRequest("v1/ticker/price", "GET", $parameters);
3803+
if (!isset($ticker['price'])) {
3804+
throw new \Exception("No price found for symbol $symbol");
3805+
}
38033806
return $ticker['price'];
38043807
}
38053808

@@ -3844,6 +3847,9 @@ public function futuresPriceV2(string $symbol)
38443847
'fapi' => true,
38453848
];
38463849
$ticker = $this->httpRequest("v2/ticker/price", "GET", $parameters);
3850+
if (!isset($ticker['price'])) {
3851+
throw new \Exception("No price found for symbol $symbol");
3852+
}
38473853
return $ticker['price'];
38483854
}
38493855

@@ -6024,6 +6030,8 @@ public function convertSend(string $fromAsset, string $toAsset, $fromAmount = nu
60246030
'fromAsset' => $fromAsset,
60256031
'toAsset' => $toAsset,
60266032
];
6033+
print_r(PHP_EOL);
6034+
print_r('convertSend' . PHP_EOL);
60276035
if ($fromAmount) {
60286036
$params['fromAmount'] = $fromAmount;
60296037
} else if ($toAmount) {

0 commit comments

Comments
 (0)