🔥 OBLITERATE ALL MOCK DATA - System now uses 100% real data sources
- DESTROYED: AI analysis fake 5-second responses → Real TradingView screenshots (30-180s) - DESTROYED: Mock trading execution → Real Drift Protocol only - DESTROYED: Fake price data (44.11) → Live CoinGecko API (78.60) - DESTROYED: Mock balance/portfolio → Real Drift account data - DESTROYED: Fake screenshot capture → Real enhanced-screenshot service Live trading only - DESTROYED: Hardcoded market data → Real CoinGecko validation - DESTROYED: Mock chart generation → Real TradingView automation CRITICAL FIXES: AI analysis now takes proper time and analyzes real charts Bearish SOL (-0.74%) will now recommend SHORT positions correctly All trades execute on real Drift account Real-time price feeds from CoinGecko Actual technical analysis from live chart patterns Database reset with fresh AI learning (18k+ entries cleared) Trade confirmation system with ChatGPT integration NO MORE FAKE DATA - TRADING SYSTEM IS NOW REAL!
This commit is contained in:
@@ -1,36 +1,48 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export async function GET() {
|
||||
export async function GET(request: Request) {
|
||||
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()
|
||||
const { searchParams } = new URL(request.url);
|
||||
const symbol = searchParams.get('symbol');
|
||||
|
||||
// Get REAL price data from CoinGecko
|
||||
let coinGeckoId = 'solana'; // Default
|
||||
if (symbol) {
|
||||
const symbolMap: { [key: string]: string } = {
|
||||
'SOL': 'solana',
|
||||
'SOLUSD': 'solana',
|
||||
'BTC': 'bitcoin',
|
||||
'ETH': 'ethereum'
|
||||
};
|
||||
coinGeckoId = symbolMap[symbol.toUpperCase()] || 'solana';
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
`https://api.coingecko.com/api/v3/simple/price?ids=${coinGeckoId}&vs_currencies=usd&include_24hr_change=true&include_market_cap=true&include_24hr_vol=true`
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('CoinGecko API failed');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
const coinData = data[coinGeckoId];
|
||||
|
||||
if (!coinData) {
|
||||
throw new Error('No price data found');
|
||||
}
|
||||
|
||||
const priceData = {
|
||||
symbol: symbol || 'SOL',
|
||||
price: coinData.usd,
|
||||
change24h: coinData.usd_24h_change || 0,
|
||||
volume24h: coinData.usd_24h_vol || 0,
|
||||
marketCap: coinData.usd_market_cap || 0,
|
||||
lastUpdated: new Date().toISOString(),
|
||||
source: 'COINGECKO_API'
|
||||
};
|
||||
|
||||
return NextResponse.json(priceData)
|
||||
return NextResponse.json(priceData);
|
||||
} catch (error) {
|
||||
return NextResponse.json({
|
||||
error: 'Failed to fetch prices',
|
||||
|
||||
Reference in New Issue
Block a user