Skip to content

fix(info): skip spot markets with out-of-range token indices#302

Open
SAY-5 wants to merge 1 commit into
hyperliquid-dex:masterfrom
SAY-5:fix-301
Open

fix(info): skip spot markets with out-of-range token indices#302
SAY-5 wants to merge 1 commit into
hyperliquid-dex:masterfrom
SAY-5:fix-301

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Jun 2, 2026

Closes #301

The spotMeta API can return a spot market whose tokens indices are missing from the tokens list (e.g. market @367 references token 479 while the list only has indices 0..463). Since 0.23, the lookup raises a KeyError instead of an IndexError, but Info.__init__ still crashes on construction. This skips those markets so the rest of the universe loads normally.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@mfnatiq
Copy link
Copy Markdown

mfnatiq commented Jun 3, 2026

probably better fix here as some tokens might have been delisted so the array-based indexing would be wrong altogether: #277

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.

IndexError in Info.__init__: spot market with out-of-range token index crashes SDK initialization

2 participants