abhiabhash's picture
create backend forn the app
9b42c70 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AlgoTradeAI - AI-Powered Trading Platform</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.trading-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
#vanta-canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
opacity: 0.3;
}
</style>
</head>
<body class="bg-gray-50">
<div id="vanta-canvas"></div>
<!-- Navigation -->
<nav class="relative z-10 bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="activity" class="text-indigo-600 h-8 w-8"></i>
<span class="ml-2 text-xl font-bold text-gray-900">AlgoTradeAI</span>
</div>
</div>
<div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
<a href="#" class="text-indigo-600 hover:text-indigo-800 px-3 py-2 text-sm font-medium">Dashboard</a>
<a href="#" class="text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">Strategies</a>
<a href="#" class="text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">Portfolio</a>
<a href="#" class="text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">Backtesting</a>
<a href="#" class="text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">Market Data</a>
<button class="ml-6 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Connect Broker
</button>
</div>
</div>
</div>
</nav>
<!-- Hero Section -->
<div class="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-24">
<div class="text-center">
<h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
<span class="block">AI-Powered Trading</span>
<span class="block text-indigo-600">For Indian Markets</span>
</h1>
<p class="mt-3 max-w-md mx-auto text-base text-gray-500 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
Smart algorithmic trading powered by machine learning to analyze NSE, BSE markets and execute trades with precision.
</p>
<div class="mt-5 max-w-md mx-auto sm:flex sm:justify-center md:mt-8">
<div class="rounded-md shadow">
<a href="#" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 md:py-4 md:text-lg md:px-10">
Start Free Trial
</a>
</div>
<div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
<a href="#" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10">
See Demo
</a>
</div>
</div>
</div>
</div>
<!-- Features Section -->
<div class="relative z-10 py-12 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="lg:text-center">
<h2 class="text-base text-indigo-600 font-semibold tracking-wide uppercase">Features</h2>
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
Smart Trading Made Simple
</p>
<p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
Our AI analyzes multiple data points to generate high-probability trading signals.
</p>
</div>
<div class="mt-10">
<div class="grid grid-cols-1 gap-10 sm:grid-cols-2 lg:grid-cols-3">
<!-- Feature 1 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="bar-chart-2" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">Real-time Market Analysis</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Our AI continuously monitors NSE/BSE markets, analyzing price action, volume, and technical indicators across all sectors.</p>
</div>
</div>
<!-- Feature 2 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="cpu" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">AI Signal Generation</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Combines technical analysis, sentiment analysis, and pattern recognition to generate high-confidence trading signals.</p>
</div>
</div>
<!-- Feature 3 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="shield" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">Automated Risk Management</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Built-in risk controls including position sizing, stop-loss placement, and portfolio diversification to protect your capital.</p>
</div>
</div>
<!-- Feature 4 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="clock" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">Backtesting Engine</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Test your strategies against 10+ years of historical market data before risking real capital.</p>
</div>
</div>
<!-- Feature 5 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="zap" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">Fast Execution</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Direct integration with major Indian brokers ensures quick order execution with minimal slippage.</p>
</div>
</div>
<!-- Feature 6 -->
<div class="trading-card transition duration-300 ease-in-out bg-white rounded-lg shadow-md overflow-hidden p-6 border border-gray-100">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="pie-chart" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5">
<h3 class="text-lg font-medium text-gray-900">Performance Analytics</h3>
</div>
</div>
<div class="mt-2 text-gray-500">
<p>Detailed reports on strategy performance, win rates, risk metrics, and comparison to benchmarks.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Market Overview Section -->
<div class="relative z-10 bg-gray-50 py-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="lg:text-center mb-10">
<h2 class="text-base text-indigo-600 font-semibold tracking-wide uppercase">Live Market Data</h2>
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
Indian Market Overview
</p>
</div>
<div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4">
<!-- NIFTY 50 -->
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="trending-up" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dt class="text-sm font-medium text-gray-500 truncate">
NIFTY 50
</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">
21,856.10
</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="arrow-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>
0.72%
</div>
</dd>
</div>
</div>
</div>
</div>
<!-- BANKNIFTY -->
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="dollar-sign" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dt class="text-sm font-medium text-gray-500 truncate">
BANKNIFTY
</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">
46,325.45
</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="arrow-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>
1.12%
</div>
</dd>
</div>
</div>
</div>
</div>
<!-- INDIA VIX -->
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="alert-triangle" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dt class="text-sm font-medium text-gray-500 truncate">
INDIA VIX
</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">
14.25
</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-red-600">
<i data-feather="arrow-down" class="h-4 w-4"></i>
<span class="sr-only">Decreased by</span>
2.45%
</div>
</dd>
</div>
</div>
</div>
</div>
<!-- Active Signals -->
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
<i data-feather="bell" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dt class="text-sm font-medium text-gray-500 truncate">
Active Signals
</dt>
<dd class="flex items-baseline">
<div class="text-2xl font-semibold text-gray-900">
8
</div>
<div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
<i data-feather="arrow-up" class="h-4 w-4"></i>
<span class="sr-only">Increased by</span>
2 Today
</div>
</dd>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- CTA Section -->
<div class="relative z-10 bg-indigo-700">
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
<h2 class="text-3xl font-extrabold tracking-tight text-white sm:text-4xl">
<span class="block">Ready to automate your trading?</span>
<span class="block text-indigo-200">Start your free trial today.</span>
</h2>
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
<div class="inline-flex rounded-md shadow">
<a href="#" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-indigo-50">
Get started
</a>
</div>
<div class="ml-3 inline-flex rounded-md shadow">
<a href="#" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 bg-opacity-60 hover:bg-opacity-70">
Live demo
</a>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="relative z-10 bg-white">
<div class="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
<nav class="-mx-5 -my-2 flex flex-wrap justify-center" aria-label="Footer">
<div class="px-5 py-2">
<a href="#" class="text-base text-gray-500 hover:text-gray-900">
About
</a>
</div>
<div class="px-5 py-2">
<a href="#" class="text-base text-gray-500 hover:text-gray-900">
Pricing
</a>
</div>
<div class="px-5 py-2">
<a href="#" class="text-base text-gray-500 hover:text-gray-900">
Documentation
</a>
</div>
<div class="px-5 py-2">
<a href="#" class="text-base text-gray-500 hover:text-gray-900">
Privacy
</a>
</div>
<div class="px-5 py-2">
<a href="#" class="text-base text-gray-500 hover:text-gray-900">
Terms
</a>
</div>
</nav>
<div class="mt-8 flex justify-center space-x-6">
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="twitter" class="h-6 w-6"></i>
</a>
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="github" class="h-6 w-6"></i>
</a>
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="linkedin" class="h-6 w-6"></i>
</a>
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="youtube" class="h-6 w-6"></i>
</a>
</div>
<p class="mt-8 text-center text-base text-gray-400">
&copy; 2023 AlgoTradeAI. All rights reserved.
</p>
</div>
</footer>
<script>
// Initialize Vanta.js globe animation
VANTA.GLOBE({
el: "#vanta-canvas",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x5f6fff,
backgroundColor: 0xf8fafc,
size: 0.8
});
// Initialize feather icons
feather.replace();
// Fetch market data from backend
async function fetchMarketData() {
try {
const response = await fetch('http://localhost:8000/indices/');
const data = await response.json();
// Update NIFTY 50
document.querySelector('dt:contains("NIFTY 50")').nextElementSibling.querySelector('div:first-child').textContent =
data["NIFTY 50"].price.toFixed(2);
// Update other indices similarly...
} catch (error) {
console.error('Error fetching market data:', error);
}
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
fetchMarketData();
// Set interval to refresh data every 60 seconds
setInterval(fetchMarketData, 60000);
});
</script>
</body>
</html>