MCPSERV.CLUB
OctoBot

OctoBot

Self-Hosted

Open-source, customizable crypto trading bot with evolution and strategy optimization.

Active(100)
4.9kstars
0views
Updated 6 days ago
OctoBot screenshot 1
1 / 4

Overview

Discover what makes OctoBot powerful

OctoBot is a **fully self‑hosted, open‑source cryptocurrency trading engine** written primarily in Python. Its core purpose is to provide a programmable, extensible platform where developers can design, back‑test, and deploy sophisticated trading strategies across multiple exchanges. Unlike consumer‑grade bots that expose a fixed set of features, OctoBot exposes its entire functionality through a **plugin‑driven “tentacles” architecture** that allows developers to inject custom logic at any stage of the trading pipeline.

Strategy Development

Back‑testing & Optimization

Exchange Connectivity

Event Hooks & Webhooks

Overview

OctoBot is a fully self‑hosted, open‑source cryptocurrency trading engine written primarily in Python. Its core purpose is to provide a programmable, extensible platform where developers can design, back‑test, and deploy sophisticated trading strategies across multiple exchanges. Unlike consumer‑grade bots that expose a fixed set of features, OctoBot exposes its entire functionality through a plugin‑driven “tentacles” architecture that allows developers to inject custom logic at any stage of the trading pipeline.

Technical Stack & Architecture

OctoBot is built on a Python 3.10+ codebase that leverages asynchronous programming (asyncio) for high‑throughput market data handling. The backbone is a lightweight event loop that orchestrates tentacles—independent modules responsible for data ingestion, strategy execution, risk management, and output. Each tentacle is a standard Python package that can be enabled or disabled via YAML configuration, enabling fine‑grained control over the bot’s behavior. Persistence is handled by SQLite for local storage of market data, trade logs, and configuration snapshots, while optional integration with PostgreSQL or MongoDB is supported for larger deployments.

The application exposes a RESTful API (Flask‑based) and WebSocket endpoints for real‑time monitoring, which developers can consume to build custom dashboards or integrate with third‑party analytics services. The API is fully documented in OpenAPI format, facilitating automatic client generation in languages such as Go, TypeScript, or Java.

Core Capabilities & Developer APIs

  • Strategy Development: Developers can write strategies as Python classes that inherit from BaseStrategy. The framework provides built‑in technical indicators (e.g., SMA, EMA, RSI) and supports integration with external ML models or LLMs (e.g., ChatGPT) via simple API wrappers.
  • Back‑testing & Optimization: A dedicated back‑tester runs strategies against historical OHLCV data fetched from exchanges or CSV files. The optimizer exposes a hyper‑parameter search API, allowing developers to perform grid or Bayesian searches programmatically.
  • Exchange Connectivity: The bot supports over 30 exchanges (Binance, Coinbase Pro, KuCoin, etc.) through a unified interface (ExchangeClient). Developers can implement custom exchange adapters by extending the base client.
  • Event Hooks & Webhooks: Custom actions can be triggered on events such as on_trade, on_order_filled, or on_signal. These hooks can emit HTTP callbacks, publish to MQTT topics, or write to a Redis queue.
  • Plugin System: The tentacle system is the heart of extensibility. Developers can ship new tentacles as pip‑installable packages, and OctoBot will load them automatically if present in the tentacles directory.

Deployment & Infrastructure

OctoBot is designed for container‑first deployments. A ready‑made Docker image (drakkarsoftware/octobot) is available on Docker Hub, and the repository includes a docker-compose.yml template that mounts configuration files, data volumes, and optional Redis or PostgreSQL services. For Kubernetes, the image can be deployed as a StatefulSet with persistent volumes for data retention.

Self‑hosting requirements are modest: a single CPU core, 2 GB RAM, and an SSD for database storage. However, the architecture scales horizontally by running multiple bot instances behind a load balancer, each maintaining its own strategy state. The asynchronous design ensures that even with high‑frequency market feeds, the event loop remains responsive.

Integration & Extensibility

OctoBot’s tentacle API exposes lifecycle callbacks (initialize, on_market_data, execute_strategy) that developers can override. This makes it trivial to plug in external services such as TradingView webhook listeners, custom risk‑management modules, or even a Telegram bot for on‑the‑fly alerts. The REST API can be extended by adding new endpoints to the Flask app, and the WebSocket stream supports custom event types.

For developers looking for deeper integration, OctoBot can emit metrics to Prometheus and logs to Loki or Elastic Stack. The configuration system supports environment variables, allowing seamless CI/CD pipelines that spin up fresh bot instances for testing.

Developer Experience

The project is accompanied by comprehensive documentation on the OctoBot website, including a developer guide that walks through creating a custom tentacle, writing a strategy, and deploying via Docker. The community is active on Telegram, Discord, and GitHub Discussions, providing quick support for integration questions. The open‑source license (MIT) removes any commercial restrictions, encouraging experimentation.

Use Cases

  • Algorithmic Trading Labs: Quant developers can prototype and back‑test strategies in a single, reproducible environment before moving to production.
  • Custom Exchange Bots: Enterprises can deploy a bot that interacts with multiple exchanges, applying unified risk rules and portfolio rebalancing logic.
  • Educational Platforms: Instructors can use OctoBot to demonstrate live trading concepts, with students writing their own tentacles in Python.
  • Research & Simulation: Researchers can run large‑scale Monte Carlo simulations by orchestrating multiple bot instances across a cluster, collecting performance metrics via the API.

Advantages

OctoBot offers unparalleled flexibility: its tentacle architecture allows developers to replace any component with minimal friction. The asynchronous design delivers high throughput without the need for heavy infrastructure, and the open‑source nature eliminates licensing costs. Compared to commercial bots that lock strategy logic into proprietary pipelines, OctoBot provides a

Open SourceReady to get started?

Join the community and start self-hosting OctoBot today