<?php
// GET ?action=balance&api_key=KEY
// Returns user balance

$user = $GLOBALS['api_user'];

api_response([
    'status'   => 'success',
    'balance'  => number_format((float)$user['main_balance'], 2, '.', ''),
    'currency' => $site_data['currency'] ?? 'NGN',
    'username' => $user['username'],
]);
