open_position
Open a new pair position on Pear Protocol. Specify execution type, leverage, USD value, slippage, and long/short asset compositions with weights.
Instructions
Open a new pair position on Pear Protocol. Specify executionType (MARKET / TRIGGER / TWAP / LADDER / TP / SL / SYNC), leverage (1-100), usdValue (≥1), slippage (0.001-0.1), and the long/short asset compositions (arrays of { asset, weight }). Optionally attach stopLoss/takeProfit and TWAP/TRIGGER/LADDER parameters. WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| executionType | Yes | ||
| leverage | Yes | ||
| usdValue | Yes | ||
| slippage | Yes | ||
| longAssets | Yes | ||
| shortAssets | Yes | ||
| triggerValue | No | ||
| triggerType | No | ||
| direction | No | ||
| twapDuration | No | ||
| twapIntervalSeconds | No | ||
| randomizeExecution | No | ||
| ladderConfig | No | ||
| stopLoss | No | ||
| takeProfit | No | ||
| referralCode | No |