MesoLive API
MesoLive exposes its automation API via SignalR hubs. The recommended integration path is the MesoLive Python SDK, which provides a typed async interface for the same hub methods.
SignalR is a real-time communication protocol that supports request-response interactions, server callbacks, and server-streaming updates.
It supports both request-response interactions and server-streaming updates, making it ideal for the dynamic nature of options trading.
SignalR is developed and supported by Microsoft and has robust client libraries for various programming languages, including Python.
Getting started
Authentication
All hubs use JWT Bearer authentication. Create a MesoLive API key in the MesoLive Portal and pass it as the bearer token. This is different from the MesoSim API key used for MesoSim and Q-API.
See Accessing the APIs.
Hubs and URLs
| Hub | URL path | What it is for | Python client |
|---|---|---|---|
| Control | /hubs/control/v2 | Accounts, strategies, positions, orders, idempotency | MesoLiveControlHubClient |
| Data | /hubs/data/v1 | Live snapshots and server-streaming market/portfolio data | MesoLiveDataHubClient |
| Risk Graph | /hubs/riskgraph/v1 | Risk Graph snapshots and streams | MesoLiveRiskGraphHubClient |
| Historical Data | /hubs/historicaldata/v1 | Persisted NAV and metric time series | MesoLiveHistoricalDataHubClient |
| Event | /hubs/event/v1 | Real-time callbacks plus event history/replay | MesoLiveEventHubClient |
Portal UI vs SDK/API differences
If you are also reading the MesoLive Portal user manual, statements like "human-in-the-loop", "click Transmit in TWS", or "no entry signal processing" apply to the Portal UI workflow.
For automation clients, use the SDK/API:
- Orders submitted via Control Hub
SendOrderare transmitted by the broker connector; no manual TWS Transmit click is required for IBKR/TWS. - Entry/Exit/Adjustment signals and Error events are delivered via the Event Hub, for example
OnEntrySignal.
Documentation
This portal documents:
- the Python SDK as the primary interface (how to automate trades)
- the SignalR method model only where it clarifies behavior (idempotency, job workflows, streaming semantics, edge cases)
You should only need to understand the underlying SignalR model if you want to understand the low-level mechanics of how the SDK works under the hood.
See the hub pages for details: