How I Found the Undocumented GraphQL Field That Reveals Every Liquidation on GMX
Описание и применение
Создан надежный бот для оповещений о ликвидациях на GMX, использующий скрытое поле GraphQL, устраняющий дубли и корректно преобразующий данные.
Задача
No documented way to pull liquidation data from GMX’s public subgraph, leading to duplicate alerts and potential inaccuracies.
Результат
Implemented a robust liquidation alert system that eliminates duplicate alerts and accurately reports liquidation details, enabling reliable real‑time notifications.
Рабочий процесс
- 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
Доказательства
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.
- Дата записи: 2026-09-18T21:45:59.674Z