crypto-watch-skill
by @burceasn
Cryptocurrency and precious metals market data analysis, supporting K-line, funding rate, open interest, long/short ratio, liquidation data, option data, fea...
clawhub install crypto-watch-skillπ About This Skill
name: crypto-skill description: Cryptocurrency and precious metals market data analysis, supporting K-line, funding rate, open interest, long/short ratio, liquidation data, option data, fear and greed index for digital assets including Bitcoin, Ethereum, BNB, ZEC, SOL, and Gold. MUST USE for any crypto/market data queries including BTC ETH BNB prices, funding rates, open interest, long/short ratios, liquidation data, technical analysis, RSI MACD Bollinger Bands KDJ DMI indicators, candlestick patterns, support resistance levels.
Crypto Data Skill
Real-time cryptocurrency market data access from OKX exchange with technical analysis capabilities.
Skill Scope & Boundaries
This Skill PROVIDES Following Data:
This Skill does NOT HANDLE
All interpretations, signals, and trade decisions are Agent-level responsibilities.
Trigger Conditions
MUST load this Skill when:
Project Structure
crypto-skill/
βββ SKILL.md # This file
βββ requirements.txt # Python dependencies
β
βββ scripts/
β βββ cli.py # CLI implementation
β βββ crypto_data.py # OKX API wrapper
β βββ technical_analysis.py # TA indicator engine
β
βββ references/
βββ INDICATORS.md # Technical indicator guide
βββ STRATEGY.md # Trading strategy guidelines
Usage
Design Trading Strategy
Always refer toSTRATEGY.md every time the user ask for a strategy. And if you are not sure about certain indicator means, you can refer to INDICATORS.md. Both these files are in the references folder.Python CLI Interface
# Get K-line data
python scripts/cli.py candles BTC-USDT --bar 1H --limit 100Get funding rate
python scripts/cli.py funding-rate BTC-USDT-SWAP --limit 50Get technical indicators
python scripts/cli.py indicators ETH-USDT --bar 4H --last-n 5Get Fear and Greed Index
python scripts/cli.py fear-greed --days 30
Available Commands
1. candles - K-Line Data
python scripts/cli.py candles [--bar BAR] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Trading pair, e.g., "BTC-USDT" |
| --bar | 1H | Period: 1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W |
| --limit | 100 | Data count (max 100) |
Returns: JSON array with datetime, open, high, low, close, vol
2. funding-rate - Funding Rate
python scripts/cli.py funding-rate [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Perpetual contract, e.g., "BTC-USDT-SWAP" |
| --limit | 100 | Data count (max 100) |
Returns: JSON array with datetime, fundingRate, realizedRate, type
3. open-interest - Open Interest
python scripts/cli.py open-interest [--period PERIOD] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Perpetual contract, e.g., "BTC-USDT-SWAP" |
| --period | 1H | Granularity: 5m, 1H, 1D |
| --limit | 100 | Data count (max 100) |
Returns: JSON array with datetime, oiCcy, oiUsd, type
4. long-short-ratio - Long/Short Ratio
python scripts/cli.py long-short-ratio [--period PERIOD] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| ccy | (required) | Currency, e.g., "BTC", "ETH" |
| --period | 1H | Granularity: 5m, 1H, 1D |
| --limit | 100 | Data count (max 100) |
5. liquidation - Liquidation Data
python scripts/cli.py liquidation [--state STATE] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Perpetual contract, e.g., "BTC-USDT-SWAP" |
| --state | filled | Order state: "filled" or "unfilled" |
| --limit | 100 | Data count (max 100) |
Returns: datetime, side (sell=long liquidated, buy=short liquidated), bkPx, sz
6. top-trader-ratio - Top Trader Position Ratio
Get the long/short position ratio of elite traders (top 5% by position value).
python scripts/cli.py top-trader-ratio [--period PERIOD] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Perpetual contract, e.g., "BTC-USDT-SWAP" |
| --period | 5m | Granularity: 5m, 15m, 30m, 1H, 2H, 4H, 6H, 12H, 1D |
| --limit | 100 | Data count (max 100) |
Returns: JSON array with datetime, longShortPosRatio
Interpretation:
> 1: Top traders hold more long positions< 1: Top traders hold more short positions= 1: Equal long/short positions7. option-ratio - Option Call/Put Ratio
python scripts/cli.py option-ratio [--period PERIOD] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| ccy | (required) | Currency, e.g., "BTC", "ETH" |
| --period | 8H | Granularity: 8H or 1D |
| --limit | 100 | Data count (max 100) |
Returns: JSON array with datetime, oiRatio, volRatio
Interpretation:
oiRatio > 1: More call options held (bullish sentiment)oiRatio < 1: More put options held (bearish sentiment)8. fear-greed - Fear and Greed Index
python scripts/cli.py fear-greed [--days DAYS]
| Parameter | Default | Description |
|-----------|---------|-------------|
| --days | 7 | Days of history |
Returns: JSON array with date, value, value_classification
Interpretation:
0-24: Extreme Fear - Potential buying opportunity25-49: Fear50-74: Greed75-100: Extreme Greed - Potential selling signal9. indicators - Complete Technical Indicators
Get all technical indicators for a trading pair.
python scripts/cli.py indicators [--bar BAR] [--limit LIMIT] [--last-n N]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Trading pair, e.g., "BTC-USDT" |
| --bar | 1D | K-line period |
| --limit | 100 | K-lines to fetch (max 100) |
| --last-n | 10 | Return only latest N rows (0 = all) |
Returns: JSON array with columns:
open, high, low, close, volumema5, ma10rsi14macd_dif, macd_dea, macd_hist10. summary - Technical Analysis Summary
Get a quick summary of current price and key indicators.
python scripts/cli.py summary [--bar BAR] [--limit LIMIT]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Trading pair |
| --bar | 1D | K-line period |
| --limit | 100 | K-lines for calculation |
Returns: JSON object with asset, indicators, data_summary
11. support-resistance - Support and Resistance Levels
python scripts/cli.py support-resistance [--bar BAR] [--limit LIMIT] [--window N]
| Parameter | Default | Description |
|-----------|---------|-------------|
| inst_id | (required) | Trading pair |
| --bar | 1D | K-line period |
| --limit | 100 | K-lines |
| --window | 5 | Window for finding extrema |
Returns: JSON object with:
current_pricesupport_levelsresistance_levelsfibonacci_retracementprice_rangeSupported Trading Pairs
| Code | Spot | Perpetual Contract | |------|------|-------------------| | BTC | BTC-USDT | BTC-USDT-SWAP | | ETH | ETH-USDT | ETH-USDT-SWAP | | BNB | BNB-USDT | BNB-USDT-SWAP | | ZEC | ZEC-USDT | ZEC-USDT-SWAP | | SOL | SOL-USDT | SOL-USDT-SWAP | | XAU | - | XAU-USDT-SWAP |
Usage Examples
# Get BTC 1-hour K-lines
python scripts/cli.py candles BTC-USDT --bar 1H --limit 100Get ETH funding rate
python scripts/cli.py funding-rate ETH-USDT-SWAP --limit 50Get BTC liquidation data
python scripts/cli.py liquidation BTC-USDT-SWAP --state filled --limit 100Get top trader position ratio
python scripts/cli.py top-trader-ratio BTC-USDT-SWAP --period 1H --limit 24Get option call/put ratio
python scripts/cli.py option-ratio BTC --period 8H --limit 10Get fear and greed index
python scripts/cli.py fear-greed --days 30Get technical indicators
python scripts/cli.py indicators BTC-USDT --bar 4H --last-n 5Get support and resistance levels
python scripts/cli.py support-resistance ETH-USDT --bar 1D
Parameter Extraction Rules
| User Says | Extract As | |-----------|------------| | "BTC price", "Bitcoin" | inst_id = "BTC-USDT" | | "ETH technical analysis", "Ethereum" | inst_id = "ETH-USDT" | | "1-hour timeframe", "hourly chart" | bar = "1H" | | "4-hour", "4H" | bar = "4H" | | "daily chart", "daily level" | bar = "1D" | | "weekly chart" | bar = "1W" | | "funding rate", "funding" | Use funding-rate with SWAP contract | | "open interest", "OI" | Use open-interest with SWAP contract | | "long/short ratio" | Use long-short-ratio with CCY | | "elite positions", "whale positions" | Use top-trader-ratio with SWAP | | "option ratio", "call/put" | Use option-ratio with CCY | | "fear and greed", "sentiment index" | Use fear-greed |
Integration Flow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SKILL.md (You Are Here) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. scripts/cli.py β Fetch raw market data and caculate indicatorsβ
β 2. references/INDICATORS.md β Signal interpretation β
β 3. references/STRATEGY.md β Trade decision policy β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Workflow:
1. Fetch Data: Use python scripts/cli.py
2. Calculate: Indicators computed automatically by indicators command
3. Interpret: Reference INDICATORS.md for signal meaning
4. Decide: Follow STRATEGY.md for trade execution rules
π‘ Examples
Design Trading Strategy
Always refer toSTRATEGY.md every time the user ask for a strategy. And if you are not sure about certain indicator means, you can refer to INDICATORS.md. Both these files are in the references folder.Python CLI Interface
# Get K-line data
python scripts/cli.py candles BTC-USDT --bar 1H --limit 100Get funding rate
python scripts/cli.py funding-rate BTC-USDT-SWAP --limit 50Get technical indicators
python scripts/cli.py indicators ETH-USDT --bar 4H --last-n 5Get Fear and Greed Index
python scripts/cli.py fear-greed --days 30