Manor Strategy SDK — base class for building algorithmic trading strategies on the Manor platform
Project description
manor-strategy-sdk
Base class for building algorithmic trading strategies on the Manor platform.
Installation
pip install manor-strategy-sdk
Usage
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manor_strategy_sdk-0.1.0.tar.gz.
File metadata
- Download URL: manor_strategy_sdk-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
370bda0c03f0fcc5c9994f5485dd6562fcb952d941941ca67ff5441a4df0fd35
|
|
| MD5 |
7d5e5f9363ea22fb7f94d3cae15c949a
|
|
| BLAKE2b-256 |
479b412d63ff7e4b51bc431b1a0693ca288fc746c61a325069bcac2904457a45
|
File details
Details for the file manor_strategy_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: manor_strategy_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf3977bd5e6b4082545fcecec74632ed7117d9f2e505ecf9db8462feb49b6719
|
|
| MD5 |
374ba6e4e4e9f77a89143d942d357870
|
|
| BLAKE2b-256 |
10ce220c78901afe0b42279a3c594b1bd228fbeb6ecd1e108705a386cb121e31
|