feat(agents): rename Smart-Money Flow agent to Derive Options Trader - #202
feat(agents): rename Smart-Money Flow agent to Derive Options Trader#202fengtality wants to merge 2 commits into
Conversation
- Agent identity is now options-first: the Derive options positioning read (25D risk reversal, put/call OI, IV term structure, net GEX) is the core signal, with the options_flow routine and Derive public API reference documented at agent level. - The smart-money capital-flow content (cross-market regime + Solana on-chain pulse) moves out of AGENT.md into a renamed smart_money_flow strategy (was derive_flow_trader), which now also reads options_flow each tick as a confirmation/sizing input and tie-breaker. - Add options_flow routine and options_oracle_operator strategy; set both strategies to a 5-minute cadence and agent_key claude-acp:sonnet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Greptile SummaryThe PR renames Smart-Money Flow to Derive Options Trader and reorganizes its strategies around options positioning.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| agents/derive_options_trader/routines/options_flow.py | Adds the Derive options composite and now handles missing GEX and per-expiry API failures without corrupting or discarding available signals. |
| agents/derive_options_trader/strategies/options_oracle_operator/strategy.md | Defines the pure options-positioning strategy and consistently limits executor leverage to the configured 2× maximum. |
| agents/derive_options_trader/strategies/smart_money_flow/strategy.md | Rehomes the capital-flow strategy and adds options-based confirmation and sizing. |
| agents/derive_options_trader/AGENT.md | Establishes the renamed agent identity, shared options methodology, strategies, and risk discipline. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Derive Options Trader tick] --> B[Run options_flow]
B --> C{Strategy}
C -->|Options Oracle| D[Trade from options composite]
C -->|Smart Money Flow| E[Run onchain_flow]
E --> F[Confirm flow with options composite]
D --> G[Apply sizing and 2x leverage limit]
F --> G
G --> H[Create or manage SOL-USDC executor]
Reviews (2): Last reviewed commit: "Merge origin/main; align with main's ris..." | Re-trigger Greptile
Merge resolution: keep the derive_options_trader rename, port main's smart-money-flow refactor (PR #200) into the renamed files — identity/playbook split note, max_position_size_quote risk key (main's risk engine does not know max_total_exposure_quote), total_amount_quote call shape, leftover-position rule, cheat sheets. Review fixes (Greptile P1s): - Leverage: never request 3x — the gate does not clamp leverage; 2x everywhere. - options_flow: neutral 1.0x GEX amplifier when no liquid expiry (never amplify on missing data). - options_flow: raise_for_status + per-expiry return_exceptions so one failed expiry no longer discards the rest; total API failure returns a controlled "Derive API unavailable" result, and both strategies document how to react. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Tested this on my server — the agent works as designed. Quick rundown:
We'll keep testing with real orders and observing the signals and executions as we go. |
#202 renames the smart_money_flow agent to derive_options_trader and moves both strategies from the opencode custom endpoint onto claude-acp:sonnet. It was branched from main before #203 added the GeckoTerminal rate-gate guard, so its onchain_flow routine trips that test once #203 lands. Folded in here and fixed in the following commit rather than left to break main after merge. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt84XBEMVxbbyMG8fDxDKj
#202 was branched from main before #203 landed, so its files miss two gates that #203 adds and that this branch now sits behind: - `options_flow.py` failed `black --check` and `isort --check`, which #203's CI enforces repo-wide. Formatting only. - `options_flow.py` line 433 wrote a Markdown underscore escape as `\_` inside a non-raw string. Python does not recognise `\_`, so it kept the two characters but raised SyntaxWarning (an error in a future version). Doubled to `\\_`: identical rendered output, no warning. The GeckoTerminal rate-gate guard needed no fix here. #202 only *renamed* `onchain_flow.py`; #203 had already rewritten that file to call `pool_data.gecko_request`, so the merge took the rename with the rate-gated content and `test_nobody_hand_builds_a_geckoterminal_url` passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt84XBEMVxbbyMG8fDxDKj
|
Folded into #204 ( Why it moved rather than merging on its own: this branch was cut from
Also fixed while folding in: Everything else carried over unchanged: the Merge order is #203 → hummingbot/hummingbot-api-client#25 (released) → #204. |
- `options_flow.py` failed `black --check` and `isort --check`, which #203's CI enforces repo-wide. Formatting only. - `options_flow.py` line 433 wrote a Markdown underscore escape as `\_` inside a non-raw string. Python does not recognise `\_`, so it kept the two characters but raised SyntaxWarning (an error in a future version). Doubled to `\\_`: identical rendered output, no warning. The GeckoTerminal rate-gate guard needed no fix here. #202 only *renamed* `onchain_flow.py`; #203 had already rewritten that file to call `pool_data.gecko_request`, so the merge took the rename with the rate-gated content and `test_nobody_hand_builds_a_geckoterminal_url` passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt84XBEMVxbbyMG8fDxDKj
Summary
smart_money_flowagent toderive_options_traderand makes options-market positioning its core identity: the Derive options read (25D risk reversal, put/call OI ratio, IV term structure, net GEX), theoptions_flowroutine, and the Derive public API reference now live at agent level inAGENT.md.AGENT.mdinto the strategy renamedsmart_money_flow(wasderive_flow_trader). That strategy now also runsoptions_flowevery tick and uses the options composite as a confirmation/sizing input (full size on agreement, half size on strong disagreement, tie-breaker when the flow read is ambiguous).options_flowroutine and theoptions_oracle_operatorstrategy (pure options positioning).frequency_sec: 300) and run onagent_key: claude-acp:sonnet(the smart_money_flow strategy previously ran on the opencode custom endpoint).smart_money_flow:smart_money_playbook→derive_options_trader:smart_money_playbook; the playbook now documents the options-confirmation rule.Runtime state (strategy
sessions/, emptylearnings.md) is intentionally not committed, consistent with the rest of the repo.Test plan
manage_trading_agentlists the agent under slugderive_options_traderwith strategiessmart_money_flowandoptions_oracle_operatormanage_skill(action="read", name="derive_options_trader:smart_money_playbook")resolvesagent.experiment) a tick of each strategy: both calloptions_flow; smart_money_flow also callsonchain_flow🤖 Generated with Claude Code