Skip to content

Feature: CoinMarketCap (CMC) API integration #10

Description

@cubo-ai

Feature Request: CoinMarketCap (CMC) API Integration

Current State

The skill has CMC_API_KEY in .env but doesn't use it yet.

Request

Integrate CoinMarketCap API for market intelligence.

Proposed Commands

# Market overview
python hyperliquid_tools.py cmc top 20          # Top 20 by market cap
python hyperliquid_tools.py cmc trending        # Trending searches/coins

# Specific coin data  
python hyperliquid_tools.py cmc BTC             # BTC market data
python hyperliquid_tools.py cmc SOL --history 7d  # 7-day price history

# Market metrics
python hyperliquid_tools.py cmc dominance       # BTC.D, ETH.D, etc.
python hyperliquid_tools.py cmc fear-greed      # Alternative fear/greed

# Compare with Hyperliquid
python hyperliquid_tools.py cmc compare SOL     # CMC vs HL price/volume

Use Cases for AI Agents

  1. Find alpha in overlooked assets:

    • High volume on HL but low CMC rank = early discovery
    • CMC trending but not on HL yet = potential listing play
  2. Volume analysis:

    • CMC volume vs HL volume = where the real liquidity is
    • Volume spike on CMC before HL price move = lead indicator
  3. Macro positioning:

    • BTC dominance rising = altcoin caution
    • ETH dominance falling = rotate to SOL ecosystem
  4. Fear/Greed validation:

    • Cross-reference with Polymarket sentiment
    • Confirm extreme readings before contrarian trades

Example Output

[1m[96mCMC MARKET DATA: SOL[0m
============================================================

[1mRank:[0m #5  [1mMarket Cap:[0m $38.2B  [1mVolume 24h:[0m $2.1B

[1mPrice Action:[0m
  Current: $84.73
  Change 24h: [92m+2.4%[0m
  Change 7d: [91m-8.2%[0m
  ATH: $259.96 ([91m-67.4%[0m from ATH)

[1mSupply:[0m
  Circulating: 486M SOL
  Total: 586M SOL

[1mHyperliquid Comparison:[0m
  CMC Price:    $84.73
  HL Price:     $84.81
  Spread:       [92m+0.09%[0m (fair)
  
  CMC Volume:   $2.1B
  HL Volume:    $295M ([92m14% of total[0m)

[1mSignal:[0m
[93mHigh HL volume share = institutional perp preference[0m

API Endpoints to Use

  • /v1/cryptocurrency/listings/latest — Top coins by market cap
  • /v1/cryptocurrency/quotes/latest — Specific coin data
  • /v1/global-metrics/quotes/latest — Dominance, total market cap
  • /v1/cryptocurrency/trending/gainers-losers — Momentum

Priority

Low-Medium — Nice to have for broader market context. Not critical since HL has good native data, but CMC adds cross-exchange validation and macro signals.

Implementation Notes

  • CMC free tier: 10k calls/month (plenty for heartbeat)
  • Cache results to avoid rate limits
  • Use existing CMC_API_KEY from .env

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions