Skip to content

Professional Trading Web Application with React + FastAPI | Real-time Market Data | Portfolio Management | Financial News | Team Collaboration Platform

Notifications You must be signed in to change notification settings

r4r00t-sh/369Algo

Repository files navigation

Webhook TradingView Platform

A comprehensive trading platform that integrates TradingView webhook alerts with broker APIs for automated order execution.

Features

  • Pixel-accurate UI: Replicates TradingView-style interface with dark theme
  • Webhook Ingestion: Secure TradingView webhook endpoint with HMAC validation
  • Broker Integration: Pluggable broker adapters (Fyers, Zerodha, Interactive Brokers)
  • Real-time Updates: WebSocket-based live market data and order status
  • User Management: Secure authentication, API key vault, role-based access
  • Audit & Compliance: Complete audit trail for all webhooks and orders
  • Risk Controls: Kill-switch, order limits, margin checks, paper trading

Tech Stack

  • Frontend: React + TypeScript + TailwindCSS + Recharts
  • Backend: Node.js + TypeScript + Express + WebSocket
  • Database: PostgreSQL + Redis
  • Queue: BullMQ for job processing
  • Auth: JWT + OAuth2
  • Deployment: Docker + Docker Compose

Quick Start

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • PostgreSQL 14+
  • Redis 7+

Installation

# Install dependencies
npm install

# Start services (PostgreSQL, Redis)
docker-compose up -d

# Optional: Start with development tools (pgAdmin, Redis Commander)
docker-compose --profile tools up -d

# Run migrations
cd backend && npm run migrate

# Start development servers
npm run dev

Frontend: http://localhost:3000 Backend API: http://localhost:4000

Project Structure

webhook-tradingview/
├── frontend/          # React frontend application
├── backend/           # Node.js backend API
├── shared/            # Shared TypeScript types
├── docker-compose.yml # Local development services
└── README.md

TradingView Webhook Setup

  1. In TradingView, create an alert with webhook URL: https://your-domain.com/api/webhook/tradingview
  2. Add custom header: X-Signature with HMAC-SHA256 signature
  3. Use the following payload format:
{
  "alert_id": "tv_123456",
  "time": "2025-12-02T14:42:11Z",
  "symbol": "NSE:NIFTY50",
  "strategy": {
    "order_action": "BUY",
    "order_contracts": 1,
    "order_type": "MARKET",
    "order_price": 25073.55
  },
  "meta": {
    "user_id": "user_abc",
    "strategy_name": "scalper_1"
  }
}

Broker Adapters

Currently supported:

  • Fyers (implemented)
  • Zerodha (planned)
  • Interactive Brokers (planned)

Security

  • All endpoints use HTTPS
  • HMAC signature verification for webhooks
  • Encrypted API key storage
  • Rate limiting on webhook endpoint
  • Role-based access control

Testing

# Run all tests
npm test

# Run E2E tests
npm run test:e2e

# Load testing
npm run test:load

Documentation

License

Proprietary - All rights reserved

About

Professional Trading Web Application with React + FastAPI | Real-time Market Data | Portfolio Management | Financial News | Team Collaboration Platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published