Skip to content

feat(market-data): add get_24h_volumes(connector_name)#21

Draft
fengtality wants to merge 1 commit into
mainfrom
feat/market-data-24h-volumes
Draft

feat(market-data): add get_24h_volumes(connector_name)#21
fengtality wants to merge 1 commit into
mainfrom
feat/market-data-24h-volumes

Conversation

@fengtality

Copy link
Copy Markdown
Contributor

Summary

Adds MarketDataRouter.get_24h_volumes(connector_name) wrapping the new hummingbot-api endpoint GET /market-data/volumes/{connector}.

Returns 24h quote-denominated volume per trading pair, keyed by Hummingbot trading pair (BASE-QUOTE) so it joins directly with get_trading_rules. A value of 0.0 marks a listed-but-untraded market (e.g. Hyperliquid's permissionless tokenized-equity spot pairs like AAPL-USDC), letting a client rank a pair selector by volume and hide the zombies.

r = await client.market_data.get_24h_volumes("hyperliquid")
# {"connector": "hyperliquid", "volumes": {"WOW-USDC": 409617350.0, "AAPL-USDC": 0.0, ...}}

Supported connectors: hyperliquid, hyperliquid_perpetual, binance, binance_perpetual, okx, okx_perpetual.

  • Bumps version 1.5.3 → 1.5.4.
  • The async sync-wrapper exposes it automatically (no per-method change needed).

Depends on

hummingbot-api endpoint GET /market-data/volumes/{connector} (hummingbot/hummingbot-api PR #171).

Test

Verified live against a running hummingbot-api: get_24h_volumes("hyperliquid") → 301 pairs, AAPL-USDC = 0.0, top pairs ranked by volume.

🤖 Generated with Claude Code

Wraps GET /market-data/volumes/{connector}, returning 24h quote volume per
trading pair keyed by Hummingbot trading pair (BASE-QUOTE). Lets clients rank a
pair selector by volume and hide listed-but-untraded markets (volume 0.0).

Bumps version to 1.5.4.

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