API Reference
This page is a compact reference that maps Python SDK methods to the underlying SignalR hub methods and payload models.
note
All SDK methods are async. The SDK raises MesoLiveApiException for any non-Success status code.
Control Hub (/hubs/control/v1)
Control Hub SignalR reference
SDK Client: mesolive_sdk.MesoLiveControlHubClient
| Python SDK | Hub method | Args model | Idempotent | Notes |
|---|---|---|---|---|
get_idempotency_record | GetIdempotencyRecord | GetIdempotencyRecordArgs | ✓ (read) | Recover outcomes after unknown results |
list_agents | ListAgents | ListAgentsArgs | Connected providers/connectors | |
list_accounts | ListAccounts | ListAccountsArgs | Paged; token is opaque | |
get_account | GetAccount | GetAccountArgs | ||
create_strategy | CreateStrategy | CreateStrategyArgs | Requires StrategyDefinition payload | |
update_strategy | UpdateStrategy | UpdateStrategyArgs | ||
rename_strategy | RenameStrategy | RenameStrategyArgs | ||
delete_strategy | DeleteStrategy | DeleteStrategyArgs | ||
list_strategies | ListStrategies | ListStrategiesArgs | Paged; filter by ActiveOnAccounts | |
get_strategy | GetStrategy | GetStrategyArgs | ||
list_positions | ListPositions | ListPositionsArgs | Filter by LiveStrategyId, LiveExecPlanId, BrokerAccountId | |
get_position | GetPosition | GetPositionArgs | Detailed view (legs, vars, pricing blocks) | |
list_legs | ListLegs | ListLegsArgs | Paged | |
get_leg | GetLeg | GetLegArgs | ||
get_legs | GetLegs | GetLegsArgs | Batch get | |
start_prepare_position_entry | StartPreparePositionEntry | PreparePositionEntryArgs | ✓ | Returns JobId |
get_prepare_position_entry_status | GetPreparePositionEntryStatus | GetPreparePositionEntryStatusArgs | Poll job status | |
cancel_prepare_position_entry | CancelPreparePositionEntry | CancelPreparePositionEntryArgs | ✓ | Best-effort cancel |
start_prepare_position_exit | StartPreparePositionExit | PreparePositionExitArgs | ✓ | Returns JobId |
get_prepare_position_exit_status | GetPreparePositionExitStatus | GetPreparePositionExitStatusArgs | ||
cancel_prepare_position_exit | CancelPreparePositionExit | CancelPreparePositionExitArgs | ✓ | |
start_prepare_position_adjustment | StartPreparePositionAdjustment | PreparePositionAdjustmentArgs | ✓ | Returns JobId |
get_prepare_position_adjustment_status | GetPreparePositionAdjustmentStatus | GetPreparePositionAdjustmentStatusArgs | ||
cancel_prepare_position_adjustment | CancelPreparePositionAdjustment | CancelPreparePositionAdjustmentArgs | ✓ | |
apply_paper_fills | ApplyPaperFills | ApplyPaperFillsArgs | ✓ | Paper accounts (MesoLive) |
send_order | SendOrder | SendOrderArgs | ✓ | Usually called per leg group |
cancel_order | CancelOrder | CancelOrderArgs | ✓ | Rejects cancel for filled orders |
get_order | GetOrder | GetOrderArgs | ||
list_orders | ListOrders | ListOrdersArgs | Paged by ExecPlanId | |
list_executions | ListExecutions | ListExecutionsArgs | ||
get_execution | GetExecution | GetExecutionArgs | ||
get_executions | GetExecutions | GetExecutionsArgs | Batch get |
Data Hub (/hubs/data/v1)
Data Hub SignalR reference
SDK Client: mesolive_sdk.MesoLiveDataHubClient
| Python SDK | Hub method | Args model | Returns | Provider required? |
|---|---|---|---|---|
stream_position_data | StreamPositionData | StreamPositionDataArgs | AsyncIterator[PositionDataEntry] | |
get_position_snapshot | GetPositionSnapshot | GetPositionSnapshotArgs | GetPositionSnapshotResult | |
stream_leg_data | StreamLegData | StreamLegDataArgs | AsyncIterator[LegDataEntry] | |
get_leg_snapshot | GetLegSnapshot | GetLegSnapshotArgs | GetLegSnapshotResult | |
stream_legs_data | StreamLegsData | StreamLegsDataArgs | AsyncIterator[LegsDataEntry] | |
get_legs_snapshot | GetLegsSnapshot | GetLegsSnapshotArgs | GetLegsSnapshotResult | |
stream_combo_contracts_data | StreamComboContractsData | StreamComboContractsDataArgs | AsyncIterator[ComboContractsDataEntry] | ✓ |
get_combo_contracts_snapshot | GetComboContractsSnapshot | GetComboContractsSnapshotArgs | GetComboContractsSnapshotResult | ✓ |
stream_contract_data | StreamContractData | StreamContractDataArgs | AsyncIterator[ContractDataEntry] | ✓ |
get_contract_snapshot | GetContractSnapshot | GetContractSnapshotArgs | GetContractSnapshotResult | ✓ |
stream_underlying_data | StreamUnderlyingData | StreamUnderlyingDataArgs | AsyncIterator[UnderlyingDataEntry] | ✓ |
get_underlying_snapshot | GetUnderlyingSnapshot | GetUnderlyingSnapshotArgs | GetUnderlyingSnapshotResult | ✓ |
Event Hub (/hubs/event/v1)
Event Hub SignalR reference
SDK Client: mesolive_sdk.MesoLiveEventHubClient
Client to server APIs
| Python SDK | Hub method | Args model | Returns |
|---|---|---|---|
subscribe_to_strategies | SubscribeToStrategies | SubscribeToStrategiesArgs | SubscribeToStrategiesResult |
unsubscribe_from_strategies | UnsubscribeFromStrategies | UnsubscribeFromStrategiesArgs | UnsubscribeFromStrategiesResult |
get_latest_event_seq_id | GetLatestEventSeqId | GetLatestEventSeqIdArgs | GetLatestEventSeqIdResult |
get_events_since | GetEventsSince | GetEventsSinceArgs | GetEventsSinceResult |
Server to client callbacks
Register handlers using:
on_entry_signal(EntrySignalEvent)on_exit_signal(ExitSignalEvent)on_adjustment_signal(AdjustmentSignalEvent)on_order_update(OrderUpdateEvent)on_position_update(PositionUpdateEvent)on_leg_update(LegUpdateEvent)on_agent_status_change(AgentStatusEvent)on_error(ErrorEvent)on_position_entry_preparation_completed(PositionEntryPreparationCompletedEvent)on_position_entry_preparation_failed(PositionEntryPreparationFailedEvent)on_position_exit_preparation_completed(PositionExitPreparationCompletedEvent)on_position_exit_preparation_failed(PositionExitPreparationFailedEvent)on_position_adjustment_preparation_completed(PositionAdjustmentPreparationCompletedEvent)on_position_adjustment_preparation_failed(PositionAdjustmentPreparationFailedEvent)on_auto_update_vars_adjustment_started(AutoUpdateVarsAdjustmentStartedEvent)on_auto_update_vars_adjustment_completed(AutoUpdateVarsAdjustmentCompletedEvent)on_auto_update_vars_adjustment_failed(AutoUpdateVarsAdjustmentFailedEvent)