From bingx-ai-skills
Analyzes cryptocurrency markets using 78 indicators and 62 candlestick patterns via pandas-ta-classic. Computes RSI, MACD, EMA, Bollinger Bands, KDJ, SuperTrend, support/resistance, divergence, and multi-timeframe scores.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bingx-ai-skills:bingx-technical-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Base URLs:** see [`references/base-urls.md`](../references/base-urls.md) | **Authentication:** see [`references/authentication.md`](../references/authentication.md)
Base URLs: see references/base-urls.md | Authentication: see references/authentication.md
| Endpoint | Method | Description | Authentication |
|---|---|---|---|
/openApi/swap/v3/quote/klines | GET | OHLCV kline data | Yes |
/openApi/swap/v2/quote/premiumIndex | GET | Funding rate & mark price | Yes |
/openApi/swap/v2/quote/openInterest | GET | Open interest | Yes |
Base URLs: see references/base-urls.md
TypeScript helper:
CONSTRAINT: You MUST copy the
fetchSignedfunction below verbatim when generating code. Do NOT rewrite the signing, request, or JSON parsing logic. Only modify: (1)BASEURL entries for custom environments, (2) business parameters passed tofetchSigned.
import * as crypto from "crypto";
import JSONBig from "json-bigint";
const JSONBigParse = JSONBig({ storeAsString: true });
const BASE = {
"prod-live": ["https://open-api.bingx.com", "https://open-api.bingx.pro"],
"prod-vst": ["https://open-api-vst.bingx.com", "https://open-api-vst.bingx.pro"],
};
function isNetworkOrTimeout(e: unknown): boolean {
if (e instanceof TypeError) return true;
if (e instanceof DOMException && e.name === "AbortError") return true;
if (e instanceof Error && e.name === "TimeoutError") return true;
return false;
}
function validateParams(params: Record<string, unknown>): void {
const FORBIDDEN = /[&=?#\r\n]/;
for (const [k, v] of Object.entries(params)) {
const s = String(v);
if (FORBIDDEN.test(s)) throw new Error(`Param "${k}" has forbidden char in: "${s}"`);
}
}
async function fetchSigned(env: string, apiKey: string, secretKey: string,
method: "GET" | "POST" | "DELETE", path: string, params: Record<string, unknown> = {}
) {
const urls = BASE[env] ?? BASE["prod-live"];
const all = { ...params, timestamp: Date.now() };
validateParams(all);
const qs = Object.keys(all).sort().map(k => `${k}=${all[k]}`).join("&");
const sig = crypto.createHmac("sha256", secretKey).update(qs).digest("hex");
const signed = `${qs}&signature=${sig}`;
for (const base of urls) {
try {
const url = method === "POST" ? `${base}${path}` : `${base}${path}?${signed}`;
const res = await fetch(url, {
method,
headers: { "X-BX-APIKEY": apiKey, "X-SOURCE-KEY": "BX-AI-SKILL",
...(method === "POST" ? { "Content-Type": "application/x-www-form-urlencoded" } : {}) },
body: method === "POST" ? signed : undefined,
signal: AbortSignal.timeout(10000),
});
const json = JSONBigParse.parse(await res.text());
if (json.code !== 0) throw new Error(`BingX error ${json.code}: ${json.msg}`);
return json.data;
} catch (e) {
if (!isNetworkOrTimeout(e) || base === urls[urls.length - 1]) throw e;
}
}
}
Fetch klines for technical analysis (200 candles, 4h):
const klines = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/swap/v3/quote/klines", { symbol: "BTC-USDT", interval: "4h", limit: 200 }
);
Fetch funding rate:
const funding = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/swap/v2/quote/premiumIndex", { symbol: "BTC-USDT" }
);
Fetch open interest:
const oi = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/swap/v2/quote/openInterest", { symbol: "BTC-USDT" }
);
Activate this skill when the user says any of the following:
Extract from user input:
Call bingx-swap-market to get OHLCV:
GET /openApi/swap/v3/quote/klines symbol={symbol}, interval={interval}, limit=200
If mode=score (multi-timeframe required), fetch 4 intervals in parallel: 15m, 1h, 4h, 1d
Also fetch auxiliary data: GET /openApi/swap/v2/quote/premiumIndex (funding rate) GET /openApi/swap/v2/quote/openInterest (open interest)
Pass kline JSON to the Python script (located in the skill's scripts/ directory):
python3 scripts/analyze.py
--mode {mode}
--symbol {symbol}
--interval {interval}
--klines '{klines_json}'
Script returns a structured JSON result.
Organize output based on mode:
full — full analysis report (see output template below) indicator — single indicator value + signal + one-line interpretation pattern — list of recently identified patterns score — composite score + multi-timeframe overview
Always append at the end of every output: ⚠️ Technical analysis is based on historical data only and does not constitute investment advice.
📊 {symbol} {interval} Technical Analysis
━━ Composite Score ━━
{total}/100 — {label}
Trend {trend}/100 | Momentum {momentum}/100 | Volume {volume}/100 | Pattern {pattern}/100
━━ Multi-Timeframe ━━
15m: {score_15m}({label_15m}) | 1h: {score_1h}({label_1h}) | 4h: {score_4h}({label_4h}) | 1d: {score_1d}({label_1d})
━━ Key Indicators ━━
RSI(14) {rsi_value} {rsi_signal}
MACD {histogram} {macd_signal} {macd_detail}
EMA {ema_detail}
ADX {adx_value} {adx_signal}
Supertrend {st_signal} {st_value}
BB %B {pctb} {bb_detail}
━━ Candlestick Patterns ━━
{pattern_list or "No significant patterns detected in the last 5 candles"}
━━ Divergence ━━
RSI: {rsi_div} | MACD: {macd_div} | OBV: {obv_div}
━━ Support / Resistance ━━
▲ {r1} — {r1_type}
● {current_price} — current price
▼ {s1} — {s1_type}
⚠️ Technical analysis is based on historical data only and does not constitute investment advice.
{symbol} {interval} {indicator_name} = {value}
Signal: {signal} — {one_line_interpretation}
{symbol} {interval} Recent Candlestick Patterns:
● {pattern_name} — {bars_ago} bars ago, {type} signal
{bullish_count} bullish and {bearish_count} bearish patterns detected in the last 5 candles.
{symbol} Composite Score: {total}/100 — {label}
Multi-Timeframe Overview:
15m: {score_15m} {label_15m} | 1h: {score_1h} {label_1h} | 4h: {score_4h} {label_4h} | 1d: {score_1d} {label_1d}
{one-line summary of multi-timeframe confluence}
Parameter security. Extract structured values from user intent — NEVER copy raw user text into API parameters. Validate symbol format (^[A-Z0-9]+-[A-Z]+$) and interval against allowed values before calling the API.
All endpoints used by this skill are read-only market data queries. No CONFIRM required in any environment.
When the user's request is vague (e.g. "analyze BTC"), default to mode=full and interval=4h. If mode can be inferred from keywords ("RSI" → indicator, "pattern" → pattern, "score" → score), infer it automatically without asking.
pip install pandas-ta-classic scipy pandas and retrynpx claudepluginhub bingx-api/api-ai-skills --plugin bingx-ai-skillsComputes technical indicators (SMA, EMA, RSI, MACD, BBands, ATR, VWAP, ADX, Stoch) and evaluates trigger conditions over Phoenix candle history.
Generates BUY/SELL trading signals with confidence scores using RSI, MACD, Bollinger Bands and more for crypto/stocks watchlists. Scans, ranks opportunities, adds stop-loss/take-profit.
Runs a comprehensive multi-agent crypto analysis with phased execution for any cryptocurrency symbol. Useful for market, technical, and sentiment analysis.