Skip to content
TheChatArchiveThe Chat Archive
longcat-2.0Hugging Face Arena WebDev Preferences (2026)

Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション…

  1. User

    Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション)で遊べるようにして

    • 上場している全銘柄をドロップダウンメニューから選択できる事
    • HIP-3市場にも対応
    • 音を聞くだけで買い方が優勢なのか、売り方が優勢なのか分かるようにしたい
    • 注文サイズに応じた射倖心を煽る視覚効果
    • ドーパミンが溢れ出すビート
  2. Assistant

    Now I have a solid understanding of the Hyperliquid WebSocket API. Let me build this DDR-style rhythm game powered by Hyperliquid's real-time trade data. I'll create a multi-file implementation with WebSocket connectivity, Web Audio API for beats, and visual effects.

    Now let me create the main game component:

    Now let me create the order book visualization component:

    Now let me create the main App component that ties everything together:

    Let me fix those TypeScript errors:

    Now let me also update the CSS for some custom animations:

    Now let me also fix the useHyperliquidWS hook to handle the dex parameter properly for HIP-3 markets:

    Now let me also fix the getMarketInfo function in App.tsx to properly handle the HIP-3 market format:

    Now let me also fix the handleMarketChange to properly set the dex:

    Let me also check if there's an issue with the useMarketList hook - the spot market ID format might need fixing:

    Now let me also fix the unused import in GameLane:

    Good, the imports look clean now. Let me also check the useHyperliquidWS hook for any remaining issues:

    Let me now try to build the project:

    The project builds successfully. Let me also verify the final state of the key files to make sure everything is correct:

    Everything looks good. Let me do a final build to confirm:

    Build successful! Let me list the final project structure:

    The project is complete and builds successfully. Here's a summary of what was built:

    ⚡ HYPER BEAT - Hyperliquid Trade Rhythm Game

    A DDR-style rhythm game powered by Hyperliquid's real-time WebSocket trade data. Here's what it includes:

    Features:

    1. Real-time WebSocket Connection - Connects to wss://api.hyperliquid.xyz/ws to stream live trades and L2 order book data
    2. Full Market Support - Dropdown menu with all listed perpetuals, spot tokens, and HIP-3 builder-deployed markets
    3. DDR Gameplay - Trades spawn arrows (buy = ↑/→ green, sell = ↓/← red) that flow down the screen. Hit arrow keys to match them at the hit zone
    4. Audio Engine - Web Audio API synthesizes:
      • Kick drum for buy trades (deep, punchy)
      • Snare/clap for sell trades (sharp, cutting)
      • Bass drops for large trades (>$50k)
      • Chord stabs every 10 combo
    5. Buy/Sell Dominance - Background color shifts green (buy pressure) or red (sell pressure). Power meter shows real-time dominance ratio
    6. Visual Effects - Particle explosions on each trade, sized by trade value. Large trades create bigger, more intense effects
    7. Score & Combo System - Points scale with combo multiplier
    8. Order Book Display - Real-time L2 bids/asks on the left panel
    9. Trade Feed - Scrolling list of recent trades on the right panel

    Architecture:

    • src/types.ts - TypeScript interfaces
    • src/hooks/useHyperliquidWS.ts - WebSocket connection with auto-reconnect
    • src/hooks/useMarketList.ts - Fetches all markets (perps, spot, HIP-3)
    • src/hooks/useAudioEngine.ts - Web Audio synthesis
    • src/components/GameLane.tsx - Canvas-based DDR gameplay
    • src/components/ParticleEffect.tsx - Particle system
    • src/components/OrderBook.tsx - Order book visualization
    • src/components/TradeFeed.tsx - Trade history display
    • src/components/PowerMeter.tsx - Buy/sell dominance meter

    Files built: index.html, src/types.ts, src/hooks/useHyperliquidWS.ts, src/hooks/useMarketList.ts, src/hooks/useAudioEngine.ts, src/components/GameLane.tsx, src/components/OrderBook.tsx, src/components/TradeFeed.tsx, src/components/ParticleEffect.tsx, src/components/PowerMeter.tsx, src/App.tsx, src/index.css

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.