- Fixed layout conflicts by removing minimal layout.tsx in favor of complete layout.js - Restored original AI Analysis page with full TradingView integration - Connected enhanced screenshot API to real TradingView automation service - Fixed screenshot gallery to handle both string and object formats - Added image serving API route for screenshot display - Resolved hydration mismatch issues with suppressHydrationWarning - All navigation pages working (Analysis, Trading, Automation, Settings) - TradingView automation successfully capturing screenshots from AI and DIY layouts - Docker Compose v2 compatibility ensured Working features: - Homepage with hero section and status cards - Navigation menu with Trading Bot branding - Real TradingView screenshot capture - AI-powered chart analysis - Multi-layout support (AI + DIY module) - Screenshot gallery with image serving - API endpoints for balance, status, screenshots, trading
24 lines
697 B
TypeScript
24 lines
697 B
TypeScript
import { NextResponse } from 'next/server'
|
|
|
|
export async function GET() {
|
|
try {
|
|
// Mock balance data from Bitquery
|
|
const balanceData = {
|
|
totalBalance: 15234.50,
|
|
availableBalance: 12187.60,
|
|
positions: [
|
|
{ symbol: 'SOL', amount: 10.5, value: 1513.16, price: 144.11 },
|
|
{ symbol: 'ETH', amount: 2.3, value: 5521.15, price: 2400.50 },
|
|
{ symbol: 'BTC', amount: 0.12, value: 8068.08, price: 67234.00 }
|
|
]
|
|
}
|
|
|
|
return NextResponse.json(balanceData)
|
|
} catch (error) {
|
|
return NextResponse.json({
|
|
error: 'Failed to fetch balance',
|
|
message: error instanceof Error ? error.message : 'Unknown error'
|
|
}, { status: 500 })
|
|
}
|
|
}
|