✅ Restore working dashboard and TradingView analysis
- 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
This commit is contained in:
40
app/api/prices/route.ts
Normal file
40
app/api/prices/route.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
// Mock price data from Bitquery
|
||||
const priceData = {
|
||||
prices: [
|
||||
{
|
||||
symbol: 'SOL',
|
||||
price: 144.11,
|
||||
change24h: 2.34,
|
||||
volume24h: 45200000,
|
||||
marketCap: 68500000000
|
||||
},
|
||||
{
|
||||
symbol: 'ETH',
|
||||
price: 2400.50,
|
||||
change24h: -1.23,
|
||||
volume24h: 234100000,
|
||||
marketCap: 288600000000
|
||||
},
|
||||
{
|
||||
symbol: 'BTC',
|
||||
price: 67234.00,
|
||||
change24h: 0.89,
|
||||
volume24h: 1200000000,
|
||||
marketCap: 1330000000000
|
||||
}
|
||||
],
|
||||
lastUpdated: new Date().toISOString()
|
||||
}
|
||||
|
||||
return NextResponse.json(priceData)
|
||||
} catch (error) {
|
||||
return NextResponse.json({
|
||||
error: 'Failed to fetch prices',
|
||||
message: error instanceof Error ? error.message : 'Unknown error'
|
||||
}, { status: 500 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user