8fd9da3c8d7271be7df8ed107e21dd00b4114856
Why
Trading BTC on every actionable signal leaves alpha on the table.
The same Trump post moves different assets very differently:
• "Strategic Reserve including SOL" → BTC +8%, SOL +33%
• "Tokenize Treasuries on ETH" → ETH +5%, BTC +2%
• "$TRUMP coin is GREATEST" → TRUMP +50%+, BTC ~0%
Picking the wrong asset is silent alpha leak.
What changed
• SYSTEM_PROMPT: new ASSET ROUTING section with 6 named categories
(direct_named / crypto_policy / macro_risk_on / macro_risk_off /
defi_thematic / meme_named) + asset-pick rules per category.
• Few-shot examples now show category + target_asset + expected_move.
• Output JSON adds: category, target_asset, target_chain,
expected_move_pct.
• Python normalization:
- HL_PERPS whitelist (current Hyperliquid perp universe).
- CHAIN_FALLBACK map: meme not on HL → trade chain native
(e.g. $FLOKI on Solana → SOL; ETH-chain meme not on HL → ETH).
- Safe default → BTC if everything else fails.
- expected_move_pct < 0.8 → coerce to hold (not worth fees).
- Legacy `asset` field kept aligned to BTC/ETH for the existing
price_impact tracker; alts leave it null until tracker is upgraded.
Note
Bot routing (bot_engine.py) NOT yet updated — it still trades whatever
`price_impact_asset` is, which is BTC/ETH only. The new fields are
emitted and stored in DB but consumed downstream in a follow-up.
This commit is "AI says the right thing" — making the bot ACT on it
is the next step.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 填 backend .env(生产值):
POSTGRES_PASSWORD=强密码 FRONTEND_URL=https://你的前端域名 ENCRYPTION_KEY=之前生成的那个 AI_API_KEY=sk-... ENVIRONMENT=production 2. 改前端 .env.local:
NEXT_PUBLIC_API_URL=https://api.你的域名.com NEXT_PUBLIC_WS_URL=wss://api.你的域名.com 启动:
cd backend docker compose up -d
Description
Languages
Python
99.6%
Shell
0.3%
Dockerfile
0.1%