Skip to content

perp-fees: fix GMX Subsquid schema + edgeX depth level - #1622

Merged
Flotapponnier merged 1 commit into
devfrom
fix/perp-fees-gmx-edgex
Jul 28, 2026
Merged

perp-fees: fix GMX Subsquid schema + edgeX depth level#1622
Flotapponnier merged 1 commit into
devfrom
fix/perp-fees-gmx-edgex

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problems found

Two venues have been failing silently for an unknown number of days:

GMX v2 — Subsquid schema change

The Subsquid gmx-synthetics-arbitrum subgraph removed the positionFeeFactor field. Every tick logs:

subsquid_failed: status_400: {"errors":[{"message":"Cannot query field \"positionFeeFactor\" on type \"MarketInfo\""}]}

The query still requested positionFeeFactorForNegativeImpact (which works) and positionFeeFactor as a fallback (removed). GraphQL rejects the entire query if any field is invalid.

Fix: remove positionFeeFactor from the query and its Go fallback branch.

edgeX — invalid depth level

The getDepth endpoint only accepts level=15 or level=200. The harness was requesting level=100, which returned:

{"code":"INVALID_DEPTH_LEVEL","data":null}

This parsed as data:[]empty_orderbook error on every tick.

Fix: switch to level=200 (200 levels, more depth than before).

Verification

Both APIs tested live before this PR:

  • level=200 → SUCCESS with 80+ bid/ask levels for ETH
  • GMX query without positionFeeFactor field should return valid fee factor

Deploy

After merging → main, rebuild and restart perp-fees on VPS:

ssh rescue@57.130.61.201 -p 8822
cd /opt/ocb && docker compose build perp-fees && docker compose up -d perp-fees

GMX: Subsquid removed positionFeeFactor field; query was 400ing on
every tick. Remove the dropped field and its Go fallback.

edgeX: depth endpoint only accepts level=15 or 200, not 100.
The invalid level returned empty_orderbook on every tick.
@Flotapponnier
Flotapponnier merged commit d7cb5f8 into dev Jul 28, 2026
1 check failed
Flotapponnier added a commit that referenced this pull request Jul 28, 2026
* perp-fees: delete gauges on asset_not_found (Lighter ghost metrics) (#1621)

* perp-fees: delete gauges on asset_not_found to prevent ghost metrics

* add mayan/squid/socket/across to provider registry and logo manifest

* perp-fees: fix GMX subsquid schema + edgeX depth level (#1622)

GMX: Subsquid removed positionFeeFactor field; query was 400ing on
every tick. Remove the dropped field and its Go fallback.

edgeX: depth endpoint only accepts level=15 or 200, not 100.
The invalid level returned empty_orderbook on every tick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant