Skip to main content

GMX V2 GM / GLV deposit · withdraw · cancel

GET 

/v1/actions/vaults/gmx

Build calldata for GMX V2 GM-market / GLV liquidity actions (Arbitrum 42161, Avalanche 43114). These are async: each call returns a single ExchangeRouter (GM) / GlvRouter (GLV) multicall transaction (plus any ERC-20 approval to the GMX Router), and a keeper executes the request a few seconds later. The deposit/withdraw tx must carry a native executionFee (the keeper's gas reimbursement) — GMX reverts if it's underpaid.

Actions

  • deposit (default) — add liquidity. Needs longToken + shortToken (the market legs), payAsset (the token paid in), amount, executionFee.
  • withdraw — remove liquidity (burn GM/GLV tokens). Needs amount (GM/GLV tokens), executionFee.
  • cancel — cancel a still-pending deposit/withdrawal ticket. Needs request=deposit|withdrawal and the 32-byte key (from /v1/data/vaults/gmx).

GM vs GLV (kind)

  • gm (default) — a single GM market; market defaults to vault.
  • glv — an auto-rebalancing GLV vault; you must name the GM market within the GLV.

Request

Responses

A single ExchangeRouter/GlvRouter multicall transaction (plus any Router approval). A keeper executes the request shortly after.