Skip to content

Developer Guide

Build and extend PolyBot with custom strategies, venues, and AI models.

Architecture

PolyBot uses a multi-service architecture with NNG messaging:

Dashboard (Vue.js)
       |
   FastAPI Gateway
       |
+------+------+
|      |      |
Scanner Executor Analytics
       |
   Strategies

Full architecture documentation

Extending PolyBot

Custom Strategies

Build your own trading strategies:

class MyStrategy(BaseStrategy):
    async def scan(self, update: PriceUpdate) -> list[Signal]:
        # Your alpha here
        ...

Custom strategy guide

Custom Venues

Add new trading venues:

class MyVenue(BaseVenue):
    async def place_order(self, order: Order) -> OrderResult:
        # Venue integration
        ...

Custom venue guide

AI Plugins

Integrate AI models for prediction:

class MyPlugin(AIModelPlugin):
    async def predict(self, context: MarketContext) -> Prediction:
        # Your model
        ...

AI plugin guide

API Reference

REST API documentation:

  • Markets, strategies, orders, positions
  • WebSocket for real-time updates
  • Authentication

API reference

Contributing

We welcome contributions!