Skip to content

feat(trade): rank pair selector by 24h volume, hide untraded markets#123

Draft
fengtality wants to merge 1 commit into
mainfrom
feat/trade-pair-volume-ranking
Draft

feat(trade): rank pair selector by 24h volume, hide untraded markets#123
fengtality wants to merge 1 commit into
mainfrom
feat/trade-pair-volume-ranking

Conversation

@fengtality

Copy link
Copy Markdown
Contributor

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

  • 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 / older SDK, so the UI degrades to an alphabetical list.
  • PairSelector
    • ranks by volume and hides 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;
    • keeps the active pair and unknown-volume pairs (e.g. HIP-3 perps) visible;
    • shows an abbreviated 24h volume per row.

Dependencies

Built to extend to more exchanges (the backend is connector-agnostic; coverage is driven by the hummingbot-api endpoint).

Test plan

  1. Trade → Hyperliquid spot: pairs rank HYPE, UBTC, UZEC, … matching the Hyperliquid UI; AAPL-USDC and other 0-volume pairs hidden.
  2. hyperliquid_perpetual: HIP-3 pairs (XYZ:CL-USD, …) rank by their real volume.
  3. Binance/OKX: BTC-USDT/ETH-USDT lead the USDT group (no fiat-quote pairs floating to the top).
  4. An unsupported connector: selector falls back to the alphabetical list.

🤖 Generated with Claude Code

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>
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