open_gmx_position
Open a leveraged perpetual position on GMX V2 (Arbitrum) by specifying market, collateral, position size, and direction. Returns a transaction ID for tracking.
Instructions
Opens a leveraged perpetual position on GMX V2 (Arbitrum). Creates a MarketIncrease order that is executed by a GMX keeper after oracle price update. Specify the market (e.g. "ETH/USD"), collateral amount, position size in USD, and direction (long/short). Returns a transaction ID to track with get_transaction_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market | Yes | Market label (e.g. "ETH/USD", "BTC/USD") or market token address. | |
| is_long | Yes | true to go long (price goes up = profit), false to go short. | |
| chain_id | No | Chain ID. Default: 42161 (Arbitrum One). | |
| size_delta_usd | Yes | Position size in USD with 30 decimals (GMX precision). Example: "1000000000000000000000000000000000" for $1000. Tip: multiply desired USD amount by 10^30. | |
| acceptable_price | Yes | Max acceptable execution price with 30 decimals. For longs, set above current price. For shorts, set below. Example: use a 1% buffer above/below market price. | |
| collateral_token | Yes | Collateral token address. Use WETH for ETH-collateralized positions. | |
| collateral_amount | Yes | Collateral amount in human-readable units. Example: "0.5" for 0.5 WETH. |