Metadata-Version: 2.4
Name: manifoldbot
Version: 0.1.0
Summary: A self-contained Python module for creating intelligent trading bots that monitor data sources, analyze content with ChatGPT, and automatically trade on Manifold Markets
Home-page: https://github.com/petercotton/manifoldbot
Author: ManifoldBot Contributors
Author-email: Peter Cotton <peter@example.com>
License: MIT License
        
        Copyright (c) 2025 Peter Cotton
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/petercotton/manifoldbot
Project-URL: Repository, https://github.com/petercotton/manifoldbot
Project-URL: Issues, https://github.com/petercotton/manifoldbot/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: feedparser>=6.0.10
Requires-Dist: pydantic>=2.5.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: openai>=1.3.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.7.0; extra == "dev"
Provides-Extra: translate
Requires-Dist: deepl>=1.12.0; extra == "translate"
Requires-Dist: googletrans==4.0.0rc1; extra == "translate"
Provides-Extra: cli
Requires-Dist: rich>=13.7.0; extra == "cli"
Requires-Dist: click>=8.1.0; extra == "cli"
Provides-Extra: all
Requires-Dist: manifoldbot[cli,dev,translate]; extra == "all"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# ManifoldBot

A self-contained Python module for creating intelligent trading bots that monitor data sources, analyze content with ChatGPT, and automatically trade on Manifold Markets.

## Quick Start

### 1. Install the Package

**Option A: Using the installation script (recommended)**
```bash
./install.sh
```

**Option B: Manual installation**
```bash
pip install -e .
```

**Option C: Install from PyPI (when published)**
```bash
pip install manifoldbot
```

### 2. Set Up Environment Variables

Create a `.env` file in the project root with your API keys:
```bash
# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Manifold Markets API Configuration
MANIFOLD_API_KEY=your_manifold_api_key_here
```

### 3. Create a Bot Configuration

Create a `bot_config.yaml` file (see examples in PLAN.md):
```yaml
name: "My Trading Bot"
description: "Monitors data sources and trades on Manifold Markets"

data_sources:
  - type: "web"
    name: "Example Source"
    url: "https://example.com"
    selector: ".content"
    poll_interval: 900  # 15 minutes

ai:
  model: "gpt-4o-mini"
  confidence_threshold: 0.75

manifold:
  market_slug: "your-market-slug"
  comment_only: true  # Start with comments only
```

### 4. Run the Bot

```bash
manifoldbot start --config bot_config.yaml
```

Or create a config file first:
```bash
manifoldbot init --output my_bot.yaml
# Edit my_bot.yaml with your settings
manifoldbot start --config my_bot.yaml
```

## Features

- 🤖 **AI-Powered Analysis**: Uses ChatGPT to analyze content and make trading decisions
- 📊 **Multiple Data Sources**: Web scraping, RSS feeds, and API integrations
- 🎯 **Manifold Integration**: Full Manifold Markets API support
- ⚙️ **Easy Configuration**: YAML-based configuration system
- 🔒 **Secure**: Environment variables for API keys
- 🚀 **Deploy Anywhere**: Local, Docker, or GitHub Actions

## Requirements

- Python 3.8+
- OpenAI API key
- Manifold Markets API key

## Documentation

For detailed documentation, examples, and architecture information, see [PLAN.md](PLAN.md).

## Development

This project is based on the [oreacle-bot](https://github.com/microprediction/oreacle-bot) architecture but with cleaner separation of concerns and a more generic, reusable design.

## License

See [LICENSE](LICENSE) file for details.
