Open futures position
open_futures_positionOpen paper futures positions with isolated margin and adjustable leverage. Supports atomic stop-loss and take-profit orders for risk management.
Instructions
Open (or add to) a mock futures position. Requires the trade:futures scope. Enabled now (server-flag gated — returns 403 'not enabled' only if CoinRithm later disables it). idempotencyKey is REQUIRED and must be unique per intent. leverage 1-20, marginMusd >= 10. Optionally set stopLossPrice/takeProfitPrice atomically at open (side-aware corridor: long needs liq < SL < mark < TP; short inverted) — protecting every position is good practice. Quote first and CONFIRM with the user. Paper trading only — virtual funds (50,000 mUSD). Not financial advice. Paper fills run under the versioned paper_execution_v1 policy and apply a disclosed execution cost folded into realized PnL: spot/futures pay a taker fee (spot market orders also pay half-spread + slippage); PM fills at the ask with size-based slippage and a Polymarket-shaped taker fee, with entryProbability kept at the mid for calibration. See the executionModel in quote/trade results — a rehearsal cost, not an exchange fill guarantee.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Futures direction: long benefits if price rises; short benefits if price falls. | |
| coinId | Yes | Coin UCID to open futures for. Use resolve_symbol first. | |
| leverage | Yes | Leverage multiplier (1-20x). | |
| agentTrace | No | Optional private trace metadata stored in the caller's ledger. | |
| marginMusd | Yes | Isolated margin in mUSD (>= 10). | |
| stopLossPrice | No | Optional resting stop-loss set atomically at open (USD trigger; fired by the per-minute worker). | |
| idempotencyKey | Yes | Unique per intent; reuse replays the original result. | |
| takeProfitPrice | No | Optional resting take-profit set atomically at open (USD trigger; fired by the per-minute worker). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when CoinRithm returned a successful 2xx response. | |
| body | No | Parsed CoinRithm response body, or raw text when the response is not JSON. | |
| httpStatus | Yes | HTTP status returned by CoinRithm, or 0 for network errors. | |
| ledgerStatus | No | Ledger write status header returned by CoinRithm, when present. | |
| ledgerEventId | No | Private AgentActionEvent id returned by /api/agent/*, when present. |