- Add unified coinhunter_shim.py that accepts subcommands (pre/gate/review/rotate-log) - Update SKILL.md gate pseudocode to read optional ~/.coinhunter/platform.json - Split cron/setup examples into Hermes and OpenClaw variants across docs - Introduce platform.json schema in user-data-layout.md - Remove stale auto_trader.py/run_trader.sh references from auto-trading-guide.md - Keep legacy shims as backward-compatible wrappers
167 lines
3.0 KiB
Markdown
167 lines
3.0 KiB
Markdown
# User Data Layout
|
|
|
|
Store private coinhunter data outside the skill directory.
|
|
|
|
## Root directory
|
|
|
|
Use:
|
|
|
|
```text
|
|
~/.coinhunter/
|
|
```
|
|
|
|
This keeps personal accounts, positions, and watchlists out of packaged skill artifacts.
|
|
|
|
## Layout
|
|
|
|
```text
|
|
~/.coinhunter/
|
|
├── config.json
|
|
├── platform.json
|
|
├── accounts.json
|
|
├── positions.json
|
|
├── watchlist.json
|
|
├── notes.json
|
|
└── cache/
|
|
```
|
|
|
|
## File roles
|
|
|
|
### config.json
|
|
Store user-level defaults.
|
|
|
|
Suggested fields:
|
|
- `default_exchange`
|
|
- `default_quote_currency`
|
|
- `timezone`
|
|
- `preferred_chains`
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"default_exchange": "bybit",
|
|
"default_quote_currency": "USDT",
|
|
"timezone": "Asia/Shanghai",
|
|
"preferred_chains": ["solana", "base"]
|
|
}
|
|
```
|
|
|
|
### platform.json
|
|
Optional cross-platform runtime configuration. When absent, the framework defaults to Hermes behavior.
|
|
|
|
Suggested fields:
|
|
- `platform` — runtime name (`"hermes"` or `"openclaw"`)
|
|
- `scripts_dir` — where platform shims are deployed
|
|
- `env_file` — path to the environment file for secrets
|
|
- `cron_command` — command array used by the external gate to trigger a job
|
|
- `delivery` — default delivery channel (`"telegram"`, `"webhook"`, etc.)
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"platform": "openclaw",
|
|
"scripts_dir": "~/.openclaw/scripts",
|
|
"env_file": "~/.openclaw/.env",
|
|
"cron_command": ["openclaw", "trigger"],
|
|
"delivery": "webhook"
|
|
}
|
|
```
|
|
|
|
### accounts.json
|
|
Store exchange accounts and balances.
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"accounts": [
|
|
{
|
|
"id": "bybit-main",
|
|
"exchange": "bybit",
|
|
"label": "Bybit Main",
|
|
"currency": "USDT",
|
|
"cash_balance": 0,
|
|
"available_cash": 0,
|
|
"updated_at": null,
|
|
"note": ""
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### positions.json
|
|
Store coin positions.
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"positions": [
|
|
{
|
|
"account_id": "bybit-main",
|
|
"symbol": "BTCUSDT",
|
|
"base_asset": "BTC",
|
|
"quote_asset": "USDT",
|
|
"market_type": "spot",
|
|
"quantity": 0,
|
|
"avg_cost": 0,
|
|
"opened_at": null,
|
|
"updated_at": null,
|
|
"note": ""
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### watchlist.json
|
|
Store watched coins.
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"watchlist": [
|
|
{
|
|
"symbol": "FARTCOIN",
|
|
"chain": "solana",
|
|
"contract_address": null,
|
|
"source": "manual",
|
|
"status": "watching",
|
|
"added_at": null,
|
|
"note": ""
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### notes.json
|
|
Store discretionary notes and thesis fragments.
|
|
|
|
Example:
|
|
|
|
```json
|
|
{
|
|
"notes": [
|
|
{
|
|
"symbol": "FARTCOIN",
|
|
"title": "Why this stays on radar",
|
|
"body": "Good liquidity, strong meme spread, only for high-risk observation.",
|
|
"updated_at": null
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### cache/
|
|
Store disposable API results or normalized snapshots. Never treat this as source-of-truth portfolio state.
|
|
|
|
## Rules
|
|
|
|
- Keep personal data only under `~/.coinhunter/`
|
|
- Never write personal account or position data into `skills/coinhunter/`
|
|
- Treat `cache/` as disposable
|
|
- Prefer stable IDs for accounts like `bybit-main`
|
|
- For meme coins, include `chain` and `contract_address` when known
|