gmx-position

Installation
SKILL.md

GMX position

Return a market/position risk view or reconcile one GMX order. An API relay acknowledgement, onchain order creation and keeper execution are separate stages.

Read current market and account state

Collect chain, public account, market, side, collateral token, intended size and order type. Discover the precise market symbol/address through current GmxApiSdk reads in recipes. Keep spot-only markets, long/short collateral and market-token identities distinct. Use SDK v2 for new integration; SDK v1 is maintenance-only, not the preferred new implementation.

Read prices, market configuration, available trading capacity, current positions and orders. Confirm data age and JIT-aware capacity for the requested side/size. Measure collateral and margin with protocol math, retaining raw USD/token units. Include position fees, borrowing, signed funding, price impact, execution/keeper gas and any relay charges separately. A displayed leverage limit does not guarantee current capacity.

Bound the unsigned plan

For a proposed change show size delta, collateral delta, acceptable price, execution fee, trigger/limit conditions and expected remaining exposure. Identify whether this is increase, reduce or collateral-only, and whether collateral/output swaps occur. SDK prepare/sign/submit stages are not all reads; stop at reviewed preparation for research. Resolve current order/relay schema and contract deployments before any authorized handoff; never copy example private keys.

Track original identity

Preserve API requestId and the reviewed idempotency key, then any order key and transaction hashes. Query status for that original request. Relay accepted is not keeper filled; an order can remain pending, cancel or fail. Reconcile final order events, actual position size/collateral and fees. A stop order is contingent execution, not a guaranteed loss cap.

On timeout, rate limits or ambiguous acknowledgement inspect the original request and onchain order before resubmitting. Do not generate a fresh idempotency key to bypass uncertainty. Report partial fills or missing position evidence explicitly.

Installs
3
GitHub Stars
11
First Seen
Oct 31, 2026