Open a position (market entry + optional bracket)
open_positionEnter a NEW position with a MARKET order, sized by base size OR quote notionalUsd (exactly one required; notionalUsd converts at the oracle price and is floored to the step size). Optionally attach a reduce-only stopLossPrice and/or takeProfitPrice as conditional orders in the SAME call (the bracket, placed with the opposite/closing side and a 500 bps execution bound past the trigger). slippageBps caps the entry fill vs oracle (default 500). Returns the entry confirmation plus any bracket order ids. Bracket legs are placed only if the entry broadcast succeeds; each is reduce-only so it can only close, never flip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| size | No | Position size in base units. | |
| market | Yes | Market ticker, e.g. BTC-USD | |
| confirm | No | ||
| notionalUsd | No | Position size in quote USD (converted at oracle). Use instead of size. | |
| slippageBps | No | Max slippage vs oracle for the entry, in bps (default 500). | |
| stopLossPrice | No | Attach a reduce-only stop-loss trigger at this price. | |
| takeProfitPrice | No | Attach a reduce-only take-profit trigger at this price. |