We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43b417b commit eb8a8e8Copy full SHA for eb8a8e8
settings/messagewizwiz.php
@@ -5,9 +5,9 @@
5
6
$rateLimit = $botState['rateLimit']??0;
7
if(time() > $rateLimit){
8
- $rate = json_decode(file_get_contents("https://api.changeto.technology/api/rate"),true)['result'];
9
- if(!empty($rate['USD'])) $botState['USDRate'] = $rate['USD'];
10
- if(!empty($rate['TRX'])) $botState['TRXRate'] = $rate['TRX'];
+ $rate = json_decode(curl_get_file_contents("https://api.pooleno.ir/v1/currency/short-name/trx?type=buy"),true);
+ $botState['USDRate'] = round($rate['priceUsdt'],2);
+ $botState['TRXRate'] = round($rate['priceFiat'] / 10,2);
11
$botState['rateLimit'] = strtotime("+1 hour");
12
13
$stmt = $connection->prepare("SELECT * FROM `setting` WHERE `type` = 'BOT_STATES'");
0 commit comments