Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション…
- User
Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション)で遊べるようにして
- 上場している全銘柄をドロップダウンメニューから選択できる事
- HIP-3市場にも対応
- 音を聞くだけで買い方が優勢なのか、売り方が優勢なのか分かるようにしたい
- 注文サイズに応じた射倖心を煽る視覚効果
- ドーパミンが溢れ出すビート
- 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
useHyperliquidWShook to handle thedexparameter properly for HIP-3 markets:Now let me also fix the
getMarketInfofunction in App.tsx to properly handle the HIP-3 market format:Now let me also fix the
handleMarketChangeto properly set the dex:Let me also check if there's an issue with the
useMarketListhook - 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
useHyperliquidWShook 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:
- Real-time WebSocket Connection - Connects to
wss://api.hyperliquid.xyz/wsto stream live trades and L2 order book data - Full Market Support - Dropdown menu with all listed perpetuals, spot tokens, and HIP-3 builder-deployed markets
- DDR Gameplay - Trades spawn arrows (buy = ↑/→ green, sell = ↓/← red) that flow down the screen. Hit arrow keys to match them at the hit zone
- 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
- Buy/Sell Dominance - Background color shifts green (buy pressure) or red (sell pressure). Power meter shows real-time dominance ratio
- Visual Effects - Particle explosions on each trade, sized by trade value. Large trades create bigger, more intense effects
- Score & Combo System - Points scale with combo multiplier
- Order Book Display - Real-time L2 bids/asks on the left panel
- Trade Feed - Scrolling list of recent trades on the right panel
Architecture:
src/types.ts- TypeScript interfacessrc/hooks/useHyperliquidWS.ts- WebSocket connection with auto-reconnectsrc/hooks/useMarketList.ts- Fetches all markets (perps, spot, HIP-3)src/hooks/useAudioEngine.ts- Web Audio synthesissrc/components/GameLane.tsx- Canvas-based DDR gameplaysrc/components/ParticleEffect.tsx- Particle systemsrc/components/OrderBook.tsx- Order book visualizationsrc/components/TradeFeed.tsx- Trade history displaysrc/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 - Real-time WebSocket Connection - Connects to
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.