Skip to main content

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.

Why SignalR?

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

HubURL pathWhat it is forPython client
Control/hubs/control/v2Accounts, strategies, positions, orders, idempotencyMesoLiveControlHubClient
Data/hubs/data/v1Live snapshots and server-streaming market/portfolio dataMesoLiveDataHubClient
Risk Graph/hubs/riskgraph/v1Risk Graph snapshots and streamsMesoLiveRiskGraphHubClient
Historical Data/hubs/historicaldata/v1Persisted NAV and metric time seriesMesoLiveHistoricalDataHubClient
Event/hubs/event/v1Real-time callbacks plus event history/replayMesoLiveEventHubClient

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 SendOrder are 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: