mirror of
https://github.com/RomySaputraSihananda/ares.git
synced 2026-07-28 11:07:47 +00:00
272fca4f65
Bot improvements: - Session filter (SESSION_FROM_UTC/TO_UTC) — backtest confirms 08-13 UTC optimal for XAU - Breakeven SL management (BREAKEVEN_AT_RR) — disabled by default, hurts XAU momentum - Daily loss limit circuit breaker (DAILY_LOSS_LIMIT_PCT) - Telegram startup alert with symbol, session, risk, and balance - MT5 modify_position (TRADE_ACTION_SLTP) support in mt5-client Web updates: - Version badge auto-fetched from GitHub Releases API - GitHub icon link in Nav and footer - Multi-pair general (not XAUUSDm-specific) - BTCUSDm backtest results added, session params in params table - Trades page uses rolling 90-day window instead of hardcoded date Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
565 B
TypeScript
22 lines
565 B
TypeScript
const REPO = "RomySaputraSihananda/ares";
|
|
|
|
export async function getLatestVersion(): Promise<string | null> {
|
|
try {
|
|
const res = await fetch(
|
|
`https://api.github.com/repos/${REPO}/releases/latest`,
|
|
{
|
|
headers: { Accept: "application/vnd.github+json" },
|
|
next: { revalidate: 3600 },
|
|
}
|
|
);
|
|
if (!res.ok) return null;
|
|
const data = await res.json();
|
|
return (data.tag_name as string) ?? null;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export const GITHUB_URL = `https://github.com/${REPO}`;
|
|
export const GITHUB_REPO = REPO;
|