How I Found the Undocumented GraphQL Field That Reveals Every Liquidation on GMX
Description and use
Built a reliable liquidation alert bot for GMX using an undocumented GraphQL field, eliminating duplicates and accurately converting data.
Problem
No documented way to pull liquidation data from GMX’s public subgraph, leading to duplicate alerts and potential inaccuracies.
Outcome
Implemented a robust liquidation alert system that eliminates duplicate alerts and accurately reports liquidation details, enabling reliable real‑time notifications.
Workflow
- 1. Identify subgraph endpoint: https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql
- 2. Introspect schema for TradeAction fields orderType and liquidationFeeAmount
- 3. Confirm orderType 7 equals Liquidation via empirical filtering and contract enum
- 4. Build query filtering orderType_eq:7, eventName_eq:"OrderExecuted", timestamp_gt:$since
- 5. Add transactionHash dedup set
- 6. Convert sizeDeltaUsd from 1e30 scale to USD
- 7. Map marketAddress to asset symbol via markets(id,indexToken) and GMX REST tokens API
- 8. Deploy Discord bot polling every 30s, filtering by USD threshold, posting embeds with asset, direction, size, and Arbiscan link
- 9. Package as hosted service GMX Liquidation Alerts
Evidence
Both agreed. That's the confirmation bar I hold myself to before shipping anything that alerts real people about real money.
First working version filtered only on orderType_eq: 7. It alerted the same liquidation twice — same transactionHash, same size, back to back.
- Record date: 2026-09-18T21:45:59.674Z