Skip to content

fix: query actual GMX market count from DataStore instead of hardcoded limit#862

Closed
guibvieira wants to merge 1 commit intomasterfrom
fix/gmx-market-count-dynamic
Closed

fix: query actual GMX market count from DataStore instead of hardcoded limit#862
guibvieira wants to merge 1 commit intomasterfrom
fix/gmx-market-count-dynamic

Conversation

@guibvieira
Copy link
Contributor

Summary

  • The on-chain getMarkets() call used a hardcoded limit of 115, but the GMX DataStore now contains ~130+ entries (including swap-only, synthetic, and deprecated markets). Newer markets (e.g. SKY) were silently excluded, causing ValueError crashes when OrderArgumentParser tried to resolve them.
  • Now queries DataStore.getAddressCount(MARKET_LIST) first (one lightweight storage slot read), then fetches exactly that many markets — no more magic numbers to bump.

🤖 Generated with Claude Code

…d limit

The on-chain getMarkets() call used a hardcoded limit of 115, but the GMX
DataStore now contains ~130+ market entries (including swap-only, synthetic,
and deprecated markets). Newer markets like SKY were beyond position 115 and
silently excluded, causing ValueError when the OrderArgumentParser tried to
resolve them.

Now queries DataStore.getAddressCount(MARKET_LIST) first (one lightweight
storage slot read) then fetches exactly that many markets. This eliminates the
recurring need to bump a magic number as GMX lists new markets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Aviksaikat
Copy link
Collaborator

should be fixed with 417e243

@guibvieira
Copy link
Contributor Author

can I close this then @Aviksaikat ?

@Aviksaikat Aviksaikat closed this Mar 20, 2026
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.

2 participants