OpenTradex — Paper Buy
Open a long paper position.
User arguments: $ARGUMENTS — expected form <rail> <symbol> <qty> [price].
Flow
- Validate the user gave you all four pieces (
rail,symbol,qty, optionalprice). If anything is missing, ask for exactly what's missing in one short sentence — don't re-ask fields the user already gave. - Pre-trade risk check: quote the open position count and current exposure:
!
node "${CLAUDE_PLUGIN_ROOT}/bin/tradex.js" riskIfopenPositions ≥ 5ordailyTotal ≤ -50, warn the user and confirm before proceeding. - Place the paper buy:
!
node "${CLAUDE_PLUGIN_ROOT}/bin/tradex.js" buy $ARGUMENTS - Echo the fill price, position id, and remind the user: "To close:
/opentradex-trade:sell <position-id>."
Rules
- This is paper-only. Never claim real fills.
- Price units: prediction markets (Kalshi/Polymarket) use 0–1 (probability); stocks (Alpaca) and crypto (Coinbase) use raw currency.
- If the rail isn't enabled, tell the user to run
/opentradex-trade:onboardfirst.