Spaces:
Running
Running
| <html lang="en" class="dark"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>API Documentation | CryptoSignal Sleuth</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script> | |
| <script> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 500: '#d946ef', | |
| }, | |
| secondary: { | |
| 500: '#f97316', | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| .vanta-bg { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| opacity: 0.3; | |
| } | |
| .glass-card { | |
| backdrop-filter: blur(16px) saturate(180%); | |
| -webkit-backdrop-filter: blur(16px) saturate(180%); | |
| background-color: rgba(17, 25, 40, 0.75); | |
| border-radius: 12px; | |
| border: 1px solid rgba(255, 255, 255, 0.125); | |
| } | |
| .endpoint-card { | |
| transition: all 0.3s ease; | |
| } | |
| .endpoint-card:hover { | |
| transform: translateY(-3px); | |
| border-color: #d946ef; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-gray-100 min-h-screen"> | |
| <div id="vanta-bg" class="vanta-bg"></div> | |
| <nav class="border-b border-gray-800 py-4"> | |
| <div class="container mx-auto px-4 flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="activity" class="text-primary-500"></i> | |
| <span class="text-xl font-bold bg-gradient-to-r from-primary-500 to-secondary-500 bg-clip-text text-transparent">CryptoSignal Sleuth</span> | |
| </div> | |
| <div class="hidden md:flex space-x-6"> | |
| <a href="index.html" class="hover:text-primary-500 transition">Dashboard</a> | |
| <a href="signals.html" class="hover:text-primary-500 transition">Signals</a> | |
| <a href="#" class="hover:text-primary-500 transition">Analytics</a> | |
| <a href="#" class="hover:text-primary-500 transition">Traders</a> | |
| <a href="api-docs.html" class="text-primary-500 font-medium">API Docs</a> | |
| </div> | |
| <button class="md:hidden"> | |
| <i data-feather="menu"></i> | |
| </button> | |
| </div> | |
| </nav> | |
| <main class="container mx-auto px-4 py-8"> | |
| <!-- API Hero Section --> | |
| <section class="glass-card p-8 mb-12 relative overflow-hidden"> | |
| <div class="absolute -top-20 -right-20 w-64 h-64 rounded-full bg-primary-500 opacity-10 blur-3xl"></div> | |
| <div class="absolute -bottom-20 -left-20 w-64 h-64 rounded-full bg-secondary-500 opacity-10 blur-3xl"></div> | |
| <div class="relative z-10"> | |
| <h1 class="text-4xl md:text-6xl font-bold mb-4">API <span class="text-primary-500">Documentation</span></h1> | |
| <p class="text-xl text-gray-300 mb-8 max-w-2xl">Integrate with our powerful crypto signal analysis platform</p> | |
| <div class="flex flex-col sm:flex-row gap-4"> | |
| <button class="bg-primary-500 hover:bg-primary-600 text-white px-6 py-3 rounded-lg font-medium transition transform hover:scale-105">Get API Key</button> | |
| <button class="border border-primary-500 text-primary-500 hover:bg-primary-500/10 px-6 py-3 rounded-lg font-medium transition">View Examples</button> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- API Endpoints --> | |
| <section class="mb-16"> | |
| <h2 class="text-3xl font-bold mb-8">Available <span class="text-secondary-500">Endpoints</span></h2> | |
| <!-- Endpoint 1 --> | |
| <div class="glass-card endpoint-card p-6 rounded-xl mb-6 border border-gray-800"> | |
| <div class="flex flex-col md:flex-row md:items-center md:justify-between"> | |
| <div class="mb-4 md:mb-0"> | |
| <span class="bg-green-900/50 text-green-400 px-3 py-1 rounded-full text-sm font-medium">GET</span> | |
| <span class="ml-2 text-xl font-mono font-bold">/api/v1/signals</span> | |
| </div> | |
| <button class="bg-gray-800 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition"> | |
| Try It Out | |
| </button> | |
| </div> | |
| <p class="text-gray-400 mt-4">Retrieve the latest trading signals from monitored channels</p> | |
| <div class="mt-6"> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Parameters</h4> | |
| <table class="w-full text-sm"> | |
| <thead> | |
| <tr class="border-b border-gray-800"> | |
| <th class="text-left py-2">Name</th> | |
| <th class="text-left py-2">Type</th> | |
| <th class="text-left py-2">Description</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr class="border-b border-gray-800"> | |
| <td class="py-3">symbol</td> | |
| <td class="py-3">string</td> | |
| <td class="py-3">Filter by trading pair (e.g. BTC/USDT)</td> | |
| </tr> | |
| <tr class="border-b border-gray-800"> | |
| <td class="py-3">type</td> | |
| <td class="py-3">string</td> | |
| <td class="py-3">BUY or SELL</td> | |
| </tr> | |
| <tr> | |
| <td class="py-3">limit</td> | |
| <td class="py-3">integer</td> | |
| <td class="py-3">Number of results to return (default: 10)</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Endpoint 2 --> | |
| <div class="glass-card endpoint-card p-6 rounded-xl mb-6 border border-gray-800"> | |
| <div class="flex flex-col md:flex-row md:items-center md:justify-between"> | |
| <div class="mb-4 md:mb-0"> | |
| <span class="bg-blue-900/50 text-blue-400 px-3 py-1 rounded-full text-sm font-medium">POST</span> | |
| <span class="ml-2 text-xl font-mono font-bold">/api/v1/webhook</span> | |
| </div> | |
| <button class="bg-gray-800 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition"> | |
| Try It Out | |
| </button> | |
| </div> | |
| <p class="text-gray-400 mt-4">Set up a webhook to receive real-time signal notifications</p> | |
| <div class="mt-6"> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Request Body</h4> | |
| <div class="bg-gray-800/50 rounded-lg p-4"> | |
| <pre class="text-sm overflow-x-auto"><code class="language-json">{ | |
| "url": "https://yourdomain.com/webhook", | |
| "events": ["new_signal", "signal_update"], | |
| "secret": "your_webhook_secret" | |
| }</code></pre> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Endpoint 3 --> | |
| <div class="glass-card endpoint-card p-6 rounded-xl mb-6 border border-gray-800"> | |
| <div class="flex flex-col md:flex-row md:items-center md:justify-between"> | |
| <div class="mb-4 md:mb-0"> | |
| <span class="bg-purple-900/50 text-purple-400 px-3 py-1 rounded-full text-sm font-medium">GET</span> | |
| <span class="ml-2 text-xl font-mono font-bold">/api/v1/analytics</span> | |
| </div> | |
| <button class="bg-gray-800 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition"> | |
| Try It Out | |
| </button> | |
| </div> | |
| <p class="text-gray-400 mt-4">Get performance analytics for signals and traders</p> | |
| <div class="mt-6"> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Response Example</h4> | |
| <div class="bg-gray-800/50 rounded-lg p-4"> | |
| <pre class="text-sm overflow-x-auto"><code class="language-json">{ | |
| "success_rate": 72.5, | |
| "avg_profit": 8.2, | |
| "top_traders": [ | |
| { | |
| "name": "CryptoWhale", | |
| "success_rate": 85.3, | |
| "total_signals": 142 | |
| } | |
| ] | |
| }</code></pre> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Authentication Section --> | |
| <section class="glass-card p-8 rounded-xl mb-16 bg-gradient-to-r from-primary-500/10 to-secondary-500/10 border border-primary-500/30"> | |
| <h2 class="text-3xl font-bold mb-6">Authentication</h2> | |
| <p class="text-lg text-gray-300 mb-6"> | |
| All API requests require authentication via API key. Include your API key in the <code class="bg-gray-800 px-2 py-1 rounded text-sm">X-API-KEY</code> header. | |
| </p> | |
| <div class="flex flex-col sm:flex-row gap-4"> | |
| <button class="bg-primary-500 hover:bg-primary-600 text-white px-6 py-3 rounded-lg font-medium transition transform hover:scale-105">Manage API Keys</button> | |
| <button class="border border-primary-500 text-primary-500 hover:bg-primary-500/10 px-6 py-3 rounded-lg font-medium transition">View Rate Limits</button> | |
| </div> | |
| </section> | |
| </main> | |
| <footer class="border-t border-gray-800 py-8 mt-12"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="flex items-center space-x-2 mb-4 md:mb-0"> | |
| <i data-feather="activity" class="text-primary-500"></i> | |
| <span class="text-xl font-bold">CryptoSignal Sleuth</span> | |
| </div> | |
| <div class="flex space-x-6"> | |
| <a href="#" class="hover:text-primary-500 transition"> | |
| <i data-feather="twitter" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="hover:text-primary-500 transition"> | |
| <i data-feather="github" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="hover:text-primary-500 transition"> | |
| <i data-feather="discord" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="hover:text-primary-500 transition"> | |
| <i data-feather="mail" class="w-5 h-5"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="mt-8 pt-8 border-t border-gray-800 flex flex-col md:flex-row justify-between"> | |
| <div class="mb-6 md:mb-0"> | |
| <p class="text-gray-400">© 2023 CryptoSignal Sleuth. All rights reserved.</p> | |
| </div> | |
| <div class="grid grid-cols-2 md:grid-cols-3 gap-8"> | |
| <div> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">Product</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Features</a></li> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Pricing</a></li> | |
| <li><a href="api-docs.html" class="text-gray-300 hover:text-primary-500 transition">API Docs</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">Company</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">About</a></li> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Blog</a></li> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Careers</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">Legal</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Privacy</a></li> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Terms</a></li> | |
| <li><a href="#" class="text-gray-300 hover:text-primary-500 transition">Cookie Policy</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Initialize Vanta.js globe background | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: "#d946ef", | |
| backgroundColor: "#111827", | |
| size: 1.00 | |
| }); | |
| // Initialize feather icons | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> |