Metadata-Version: 2.4
Name: manor-strategy-sdk
Version: 0.1.0
Summary: Manor Strategy SDK — base class for building algorithmic trading strategies on the Manor platform
Project-URL: Homepage, https://github.com/your-org/manor-strategy-sdk
License: MIT
Keywords: manor,quant,strategy,trading
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Requires-Dist: websockets>=16.0
Description-Content-Type: text/markdown

# manor-strategy-sdk

Base class for building algorithmic trading strategies on the Manor platform.

## Installation

```bash
pip install manor-strategy-sdk
```

## Usage

```python
from manor_strategy_sdk import ManorStrategy

class MyStrategy(ManorStrategy):

    async def on_start(self):
        await self.subscribe("600519", "XSHG")

    async def on_tick(self, tick):
        price = tick["lastPrice"]
        result = await self.predict(model="lgb_v5", symbols=[
            {"market_code": "XSHG", "symbol": "600519"}
        ])
        for item in result.get("items", []):
            if item["score"] > 0.6:
                await self.buy("600519", "XSHG", price=price, quantity=100)
```

## Environment Variables

| Variable | Description | Default |
|---|---|---|
| `MANOR_WS_URL` | WebSocket address | `ws://127.0.0.1:8200/strategy-api/ws` |
| `MANOR_TOKEN` | Auth token | _(empty)_ |
| `MANOR_STRATEGY_ID` | Strategy ID (for logging) | _(none)_ |

## License

MIT
