MainSequence Markets
ms-markets is the financial markets extension layer for the Main Sequence platform.
It provides the package foundation for reusable market-domain models, engines, and
application surfaces.
The import package is:
import msm
Intended Uses
- Build financial markets projects and applications on top of Main Sequence.
- Create a Main Sequence project foundation that can grow into agentic financial workflows and operational tools.
Initial Scope
- Market-domain ORM and persistence abstractions.
- Optional financial engines for pricing and analytics through
msm_pricing. - Core market lifecycle workflows through
msm. - Application-management helpers for dashboards, APIs, scheduled jobs, and platform deployment surfaces.
- Agent-ready project structure for future Main Sequence agent capabilities.
The initial core modules were migrated from mainsequence-sdk/mainsequence/markets
into src/msm.
Library Style
The general style of msm is to keep user-facing code typed and
domain-oriented. Application code operates on Pydantic row objects such as
Asset, Account, and OrderManager; schema code works with SQLAlchemy
*Table declarations such as AssetTable; timestamped facts live in DataNodes.
from msm.api.assets import Asset # row object — application code
from msm.models import AssetTable # SQLAlchemy declaration — schema code
The full runtime model — the three layers, start_engine() as attachment (not
schema creation), migrations-before-runtime, and MSM_AUTO_REGISTER_NAMESPACE —
is documented once in Core Concepts. Read it before the rest of
the docs.