Skip to content

TheScientist101/algobattle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AlgoBattle

Next.js React Go Firebase Tailwind CSS

A professional platform for developing, testing, and competing with algorithmic stock market trading bots

Table of Contents

Overview

AlgoBattle is a sophisticated platform designed for financial technology enthusiasts, algorithmic traders, and developers interested in stock market automation. The platform enables users to create, deploy, and monitor algorithmic trading bots in a controlled environment with real market data.

The system consists of two main components:

  • Web Dashboard: A modern, responsive interface for managing bots, viewing performance metrics, and analyzing trading history
  • API Backend: A robust server-side infrastructure that handles bot interactions, executes trades, and provides market data

Features

  • Algorithmic Trading: Develop and deploy custom trading algorithms without risking real capital
  • Real-Time Market Data: Access to current and historical stock prices from major exchanges
  • Performance Analytics: Track your bot's performance with comprehensive metrics and visualizations
  • Leaderboard Competition: Compare your bot's performance against others in the community
  • Secure Authentication: Firebase-powered user authentication and API key management
  • RESTful API: Well-documented API for programmatic interaction with the platform

Getting Started

Choose one of the following options to start using AlgoBattle:

Option 1: Use Our Demo (Recommended for Beginners)

This option allows you to quickly explore AlgoBattle without setting up the development environment.

Step 1: Access the Platform

Visit our live deployment at https://algobattle.vercel.app

Step 2: Authentication

  • Sign in using your preferred method (Google authentication recommended)
  • For a quick demo without registration, use these credentials:

Step 3: Create Your First Bot

  • After signing in, click the "Create a bot" button if no bots exist
  • Provide a name for your bot and click "Save"
  • Refresh the page to view your bot's dashboard
  • Note: Historical account value data may take a few minutes to appear

Step 4: Connect Your Bot to the API

  • For developers with custom bots: Use the API key displayed on your dashboard
  • For testing purposes: Use our example client script by right-clicking the client.ps1 file and selecting run with PowerShell. Follow the prompts to enter your API key and desired actions. This script will simulate trading activity for your bot.

Step 5: Monitor Performance

Your dashboard will display transactions and account value updates, which are recalculated daily.

Option 2: Run Locally

This option is for developers who want to set up the complete AlgoBattle environment on their local machine.

Web Application Setup

Prerequisites
  • Node.js ≥ 18
  • npm or yarn package manager
Step 1: Clone the Repository
git clone https://github.com/TheScientist101/algobattle.git
cd algobattle/web
Step 2: Install Dependencies
npm install
# or if using yarn
# yarn install
Step 3: Configure Environment
  1. Create a new Firebase project and register a web app
  2. Create a .env file in the web directory with the following variables:
# Firebase Configuration
NEXT_PUBLIC_API_KEY="YOUR_FIREBASE_API_KEY"
NEXT_PUBLIC_AUTH_DOMAIN="YOUR_AUTH_DOMAIN"
NEXT_PUBLIC_PROJECT_ID="YOUR_PROJECT_ID"
NEXT_PUBLIC_STORAGE_BUCKET="YOUR_STORAGE_BUCKET"
NEXT_PUBLIC_MESSAGING_SENDER_ID="YOUR_MESSAGING_SENDER_ID"
NEXT_PUBLIC_APP_ID="YOUR_APP_ID"
NEXT_PUBLIC_MEASUREMENT_ID="YOUR_MEASUREMENT_ID"
Step 4: Start Development Server
npm run dev
# or if using yarn
# yarn dev

The web application will be available at http://localhost:3000

Deployment (Optional)

For production deployment, we recommend using Vercel:

  • Follow the Vercel deployment guide
  • Ensure all environment variables are properly configured in your Vercel project settings

Server Setup

Prerequisites
  • Go ≥ 1.23
  • Git
Step 1: Clone the Repository (if not already done)
git clone https://github.com/TheScientist101/algobattle.git
cd algobattle/server
Step 2: Run the Server
go run urjith.dev/algobattle

The API server will be available at http://localhost:8080

API Documentation

AlgoBattle provides a comprehensive RESTful API that allows developers to programmatically interact with the platform. The API enables your trading bots to:

  • Retrieve real-time and historical market data
  • Execute buy and sell transactions
  • Monitor portfolio performance
  • Manage watchlists and track specific stocks

For complete technical details, endpoint specifications, and code examples, please refer to our API Documentation.

API Features

Feature Description
Authentication Secure API key-based authentication system
Portfolio Management Retrieve account balances, holdings, and transaction history
Market Data Access to current and historical stock prices and indicators
Trading Execute buy and sell orders programmatically
Error Handling Comprehensive error reporting and status codes

Authors & Contributions

AlgoBattle was developed by a team of dedicated engineers with expertise in financial technology and web development.

Contributor Role Contributions
Abhinav Devarakonda Frontend Developer • Designed and implemented the web application interface
• Built authentication system with Firebase integration
• Developed the dashboard for bot monitoring and analytics
• Created interactive data visualizations for performance tracking
• Implemented the leaderboard system for competitive rankings
Urjith Mishra Backend Developer • Architected and built the server-side API infrastructure
• Developed the trading engine and transaction processing system
• Implemented market data integration and caching mechanisms
• Created portfolio valuation and performance calculation algorithms
• Designed the API authentication and security protocols

Citations & Attributions

Frontend Technologies

Technology Description Version
Next.js React framework for server-side rendering 13.0+
React JavaScript library for building user interfaces 18.0+
Tailwind CSS Utility-first CSS framework 3.0+
Firebase Authentication and database services 9.0+
Shadcn UI Component library for Next.js Latest
UUID Library for generating unique identifiers 9.0+

Backend Technologies

Technology Description Version
Go Programming language for backend services 1.23+
Gin Gonic HTTP web framework for Go Latest

Development Tools

Tool Purpose
v0.dev AI-powered component generator for Next.js
ChatGPT AI assistant for documentation and debugging

Documentation & References

Live Deployment

Visit AlgoBattle

Experience the platform at algobattle.vercel.app

About

A platform to have stock trading algorithms compete against each other.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •