Recipe Track Orderbook Depth

Monitor order book depth and bid-ask imbalance for liquidity signals.

yejiming 0e370c0 2 files · 1.2 KB Updated

File contents

Track Order Book Depth

PREREQUISITE: Load the following skills to execute this recipe: kraken-market-intel, kraken-ws-streaming

Monitor order book depth for a pair and detect bid-ask imbalance as a liquidity signal.

Steps

  1. Get a snapshot: kraken orderbook BTCUSD --count 25 -o json 2>/dev/null
  2. Sum bid volume (top 10 levels) and ask volume (top 10 levels)
  3. Calculate imbalance ratio: bid_volume / (bid_volume + ask_volume)
    • Ratio > 0.6: strong bid-side (buying pressure)
    • Ratio < 0.4: strong ask-side (selling pressure)
  4. Start streaming for continuous monitoring: kraken ws book BTC/USD --depth 10 -o json 2>/dev/null
  5. Parse each update and recalculate imbalance
  6. Alert when imbalance crosses threshold
  7. Optionally compare across pairs (one call per pair): kraken orderbook BTCUSD --count 10 -o json 2>/dev/null then kraken orderbook ETHUSD --count 10 -o json 2>/dev/null

yejiming/web3-awesome-skills/tree/main/skills/community/exchanges/kraken-official-recipe-track-orderbook-depth commit 0e370c0b4e

Frequently asked questions

npx skillmds@latest add yejiming/recipe-track-orderbook-depth