The RPC Module serves as the connective tissue between EdgeCore's trading engine and the outside world. Designed for institutional-grade deployment, it enables real-time monitoring, control, and bi-directional communication through secure channels including REST API, Telegram, Discord, and webhooks.
Purpose-Built for Live Operations
Unlike traditional command-line bots or siloed interfaces, EdgeCore's RPC Module gives traders and operations teams continuous access to live trading intelligence and control. Whether you're monitoring PnL, forcing trade entries, pulling historical performance data, or receiving error alerts, the RPC Module delivers low-latency interaction with the trading core—remotely and reliably.
Architecture Overview
- Core RPC Engine: Modular class-based implementation allowing unified control interface across all channels.
- RPC Manager: The message routing system coordinating communication between trading logic and external interfaces.
- Interface Handlers: Plug-and-play integrations for REST (FastAPI), Telegram (bot commands), Discord (channel alerts), and webhooks (push notifications).
- Authentication: Supports Basic Auth and JWT token-based authentication for REST API; authorized chat IDs for messaging platforms.
REST API Server
Built with FastAPI, the REST interface enables full control and insight over trading operations. Features include:
- Trade management (entry, exit, force cancel)
- Strategy control (start, stop, reload config)
- PnL and performance reporting
- Trade logs and system health endpoints
The API is designed with enterprise deployment in mind—offering secure authentication, CORS support, endpoint categorization, and versioning.
Telegram & Discord Integration
Receive real-time trade notifications, status updates, and error alerts directly into your preferred communication channel. Telegram also supports:
- Inline keyboard-based controls
- Command-based bot interaction (e.g. /status, /profit, /start)
- Controlled access via whitelisting
Discord functionality mirrors Telegram in structure and formatting, with native support for rich embeds and channel-based notifications.
Webhooks
Push trade lifecycle events (entries, exits, errors) to any external system via customizable webhooks. Format agnostic (JSON, text) and easy to configure for downstream integrations such as Slack, Zapier, or monitoring dashboards.
Event Types & Message Routing
The RPC system handles and routes:
- Status Messages: Real-time updates on trade count, portfolio health, uptime
- Trade Events: Entry/exit alerts, stop loss triggers, fill statuses
- Error Handling: Exchange downtime, API issues, failed executions
- Performance Reports: Aggregated profit metrics by pair or strategy
- Custom Strategy Signals: User-defined notifications from trading logic
All messages are processed via the RPC Manager for distribution to appropriate handlers.
Security Controls
- Role-based access for APIs and messaging platforms
- TLS support via reverse proxy
- Auth-protected endpoints with rate-limiting
- Configurable notification filtering to avoid sensitive data exposure
Use Cases
- Operations teams monitoring multiple bot instances across asset classes
- Traders needing instant trade override or manual intervention
- Data teams fetching performance reports for PnL attribution
- Analysts streaming custom model alerts via Telegram or Discord
- Engineering teams integrating EdgeCore with external reporting tools
Built for Extensibility
EdgeCore's RPC architecture is modular and pluggable. Developers can:
- Add custom endpoints via FastAPI
- Build new handlers for other chat platforms
- Extend message schemas with minimal friction
- Reuse RPCManager to plug into other system modules
This makes it suitable not just for internal use—but for building client-facing dashboards, portals, or broker interfaces on top of EdgeCore.
Conclusion
The RPC Module is the control tower for EdgeCore. It doesn’t just report. It acts. By integrating low-latency message handling with multi-channel communication and bulletproof security, it empowers institutional teams to manage live algorithmic trading systems with confidence, speed, and full transparency.