gdex_manage_position
Preview exiting a perpetual position (close/reduce) or selling spot tokens to USDC, then execute via gdex_execute_trade.
Instructions
Preview an exit for an existing position, against its live state: close/reduce a perp (reduce-only, correct side for longs and shorts) or sell a spot token back to USDC. Returns a preview; execute it with gdex_execute_trade.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex | No | ||
| coin | No | perp coin for close/reduce | |
| size | No | reduce: contracts to close | |
| chain | No | sell: chain | |
| action | Yes | ||
| amount | No | sell: token amount | |
| accountRef | Yes | ||
| slippagePct | No | ||
| tokenAddress | No | sell: token |