<?php
header('Content-Type: application/json');
require_once '../../connection/db.php';
try {
    $st = getDB()->query("SELECT svalue FROM gm_settings WHERE skey='trx_price' LIMIT 1");
    $row = $st ? $st->fetch() : null;
    echo json_encode(['price' => $row ? $row['svalue'] : '3.48']);
} catch(Exception $e) {
    echo json_encode(['price' => '3.48']);
}
