feat(trade): rank pair selector by 24h volume, hide untraded markets#123
Draft
fengtality wants to merge 1 commit into
Draft
feat(trade): rank pair selector by 24h volume, hide untraded markets#123fengtality wants to merge 1 commit into
fengtality wants to merge 1 commit into
Conversation
The Hyperliquid spot connector exposes every market in spotMeta.universe,
including hundreds of permissionless tokenized-equity listings (AAPL-USDC,
TSLA-USDC, …) that have a real market entry but never trade (dayNtlVlm=0). They
polluted the trade-pair selector.
- backend: GET /servers/{name}/market/pair-volumes?connector= proxies the new
hummingbot-api 24h-volume endpoint (via hummingbot_api_client). Best-effort —
returns an empty map for unsupported connectors / old SDK so the UI degrades to
an alphabetical list.
- PairSelector: rank by volume and hide listed-but-untraded pairs (volume 0).
Ranking is quote-aware (group by quote, then volume desc) so fiat-quoted pairs
don't dominate by raw quote-volume; single-quote exchanges (Hyperliquid, all
USDC) become a pure volume ranking. Active pair and unknown-volume pairs (e.g.
HIP-3 perps) stay visible. Each row shows an abbreviated 24h volume.
Requires hummingbot-api-client >= 1.5.4 for live volumes (degrades gracefully
without it).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ranks the trade-pair selector by 24h volume and hides listed-but-untraded markets.
Motivation: the Hyperliquid spot connector exposes every market in
spotMeta.universe, including hundreds of permissionless tokenized-equity listings (AAPL-USDC,TSLA-USDC, …) that have a market entry but never trade (dayNtlVlm=0). They polluted the selector, and there was no volume signal to order by.Changes
GET /servers/{name}/market/pair-volumes?connector=— proxies the new hummingbot-api 24h-volume endpoint viahummingbot_api_client. Best-effort: returns an empty map for unsupported connectors / older SDK, so the UI degrades to an alphabetical list.0);Dependencies
GET /market-data/volumes/{connector}— hummingbot/hummingbot-api PR #173.hummingbot_api_client >= 1.5.4(get_24h_volumes) — hummingbot/hummingbot-api-client PR Hyperliquid Perpetual - Unable to use HIP-3 trading pair for creating grid_strike and pmm_mister #21. Degrades gracefully without it (no ranking, no crash).Built to extend to more exchanges (the backend is connector-agnostic; coverage is driven by the hummingbot-api endpoint).
Test plan
HYPE,UBTC,UZEC, … matching the Hyperliquid UI;AAPL-USDCand other 0-volume pairs hidden.hyperliquid_perpetual: HIP-3 pairs (XYZ:CL-USD, …) rank by their real volume.BTC-USDT/ETH-USDTlead the USDT group (no fiat-quote pairs floating to the top).🤖 Generated with Claude Code