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

# Horizon + Limitless

> Trade on Limitless, a prediction market on Base (chain ID 8453).

[Limitless](https://limitless.exchange) is a prediction market running on Base (chain ID 8453), a fork of Polymarket. Horizon supports the Limitless REST API with API key header authentication.

## Quick Setup

```python theme={null}
hz.run(
    name="limitless_mm",
    exchange=hz.Limitless(
        api_key="...",
        private_key="0x...",
        owner_id="...",
    ),
    mode="live",
    ...
)
```

## Credentials

<Tabs>
  <Tab title="Explicit">
    ```python theme={null}
    hz.Limitless(
        api_key="YOUR_API_KEY",
        private_key="0xYOUR_PRIVATE_KEY",
        owner_id="YOUR_OWNER_ID",
    )
    ```
  </Tab>

  <Tab title="Environment variables">
    ```bash theme={null}
    export LIMITLESS_API_KEY="..."
    export LIMITLESS_PRIVATE_KEY="0x..."
    export LIMITLESS_OWNER_ID="..."
    ```

    ```python theme={null}
    hz.Limitless()  # reads from env
    ```
  </Tab>
</Tabs>

All three credentials are required for live trading:

* **API key**: authenticates REST requests via header
* **Private key**: Ethereum private key for on-chain order signing on Base
* **Owner ID**: your account/owner identifier on Limitless

## Limitless Configuration

```python theme={null}
@dataclass
class Limitless:
    api_key: str | None = None
    private_key: str | None = None
    owner_id: str | None = None
    api_url: str = "https://api.limitless.exchange"
```

| Field         | Default                          | Description                                         |
| ------------- | -------------------------------- | --------------------------------------------------- |
| `api_key`     | `None`                           | API key for REST authentication                     |
| `private_key` | `None`                           | Ethereum private key for order signing (Base chain) |
| `owner_id`    | `None`                           | Account/owner identifier                            |
| `api_url`     | `https://api.limitless.exchange` | API base URL                                        |

## Environment Variables

| Variable                | Description          |
| ----------------------- | -------------------- |
| `LIMITLESS_API_KEY`     | API key              |
| `LIMITLESS_PRIVATE_KEY` | Ethereum private key |
| `LIMITLESS_OWNER_ID`    | Owner/account ID     |

## Example Strategy

```python theme={null}
import horizon as hz

def predict(ctx):
    return hz.Quote(bid=0.40, ask=0.60, size=5)

hz.run(
    name="limitless_simple",
    exchange=hz.Limitless(),  # from env vars
    markets=["will-eth-hit-5000"],
    pipeline=[predict],
    mode="live",
)
```

## Market Discovery

You can discover active Limitless markets using the standard discovery API:

```python theme={null}
markets = hz.discover_markets(exchange="limitless", limit=20)
top = hz.top_markets(exchange="limitless", limit=10)
```

## Multi-Exchange

Limitless can be used alongside other exchanges in multi-exchange setups:

```python theme={null}
hz.run(
    name="cross_venue",
    exchanges=[hz.Polymarket(), hz.Limitless()],
    markets=["will-btc-hit-100k"],
    pipeline=[predict],
    mode="live",
)
```

<Note>
  Limitless runs on Base (chain ID 8453), not Polygon like Polymarket. Ensure your private key has funds on the Base network for order signing and settlement.
</Note>
