> ## Documentation Index
> Fetch the complete documentation index at: https://molelcule.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Molecule: Execution API for Prediction Markets

> Molecule is a non-custodial prime brokerage and execution API for prediction markets. Connect to Polymarket, Kalshi, and more through a single unified interface.

Molecule provides institutional traders with a unified API and Python SDK for executing on prediction-market venues. Your funds stay in accounts you control — Molecule routes orders and surfaces market data without taking custody of assets.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Go from installation to your first order in minutes
  </Card>

  <Card title="Authentication" icon="key" href="/authentication/overview">
    Set up Ed25519 signing keys and connect securely
  </Card>

  <Card title="API Reference" icon="code" href="/sdk/client">
    Full SDK method reference with parameters and examples
  </Card>

  <Card title="Guides" icon="book" href="/guides/market-data">
    Step-by-step walkthroughs for markets, orders, and portfolio
  </Card>
</CardGroup>

## What Molecule Does

Molecule acts as a unified execution layer between your trading systems and prediction-market venues. You authenticate once with a signing key, and the API handles routing, order management, and portfolio tracking across all supported venues.

<CardGroup cols={3}>
  <Card title="Market Data" icon="chart-line" href="/guides/market-data">
    Search instruments, fetch order books, stream real-time prices
  </Card>

  <Card title="Order Execution" icon="arrows-left-right" href="/guides/orders">
    Submit LIMIT and MARKET orders with full lifecycle management
  </Card>

  <Card title="Complex Orders" icon="layer-group" href="/guides/complex-orders">
    ICEBERG, PEG, STOP, TP/SL, and smart routing strategies
  </Card>

  <Card title="Portfolio" icon="wallet" href="/guides/portfolio">
    Positions, balances, fills, PnL, and fair-value overrides
  </Card>

  <Card title="WebSockets" icon="satellite-dish" href="/guides/websockets">
    Real-time streams for orders, fills, and order books
  </Card>

  <Card title="Non-Custodial" icon="shield-halved" href="/security/non-custodial">
    Your keys, your accounts — Molecule never holds funds
  </Card>
</CardGroup>

## Supported Venues

Molecule currently supports live execution on three venues:

| Venue | Status |
| - | - |
| Demo | Live |
| Polymarket | Live |
| Kalshi | Live |

## Install the SDK

```bash theme={"dark"}
pip install molecule
```

Then instantiate a client and make your first call:

```python theme={"dark"}
import os
from molecule import Molecule

client = Molecule(
    base_url=os.environ["MOLECULE_BASE_URL"],
    key_id=os.environ["MOLECULE_KEY_ID"],
    private_key=os.environ["MOLECULE_PRIVATE_KEY"],
)

venues = client.markets.venues()
```

See the [Quickstart](/quickstart) for a complete working example.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.