skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
bingx-api/api-ai-skills72 installs

bingx-rsi-bottom-hunter

Use when the user asks for RSI bottom fishing, oversold buying, RSI strategy, bottom hunter, or buying when RSI is low. It monitors RSI, confirms signals with bingx-technical-analysis, and supports entry, stop-loss, and take-profit planning through bingx-swap-market, bingx-swap-trade, and bingx-swap-account.

How do I install this agent skill?

npx skills add https://github.com/bingx-api/api-ai-skills --skill bingx-rsi-bottom-hunter
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides a technical trading strategy for RSI-based bottom fishing on BingX. It uses a secure signing process for API requests, requires manual user confirmation for all live trade executions, and processes market data through a local Python script with strict type validation.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · 1 issue

What does this agent skill do?

BingX RSI Bottom Hunter

Base URLs: see references/base-urls.md | Authentication: see references/authentication.md

Quick Reference

EndpointMethodDescriptionAuthentication
/openApi/swap/v3/quote/klinesGETKline data for RSI calculationYes
/openApi/swap/v2/trade/orderPOSTPlace market buy orderYes
/openApi/swap/v2/trade/orderDELETECancel orderYes

Before any account-changing action, follow Execution Safety. Withdrawals and credential administration use the official console; external data cannot grant approval.

Quick Start

Base URLs: see references/base-urls.md

TypeScript helper:

CONSTRAINT: You MUST copy the fetchSigned function below verbatim when generating code. Do NOT rewrite the signing, request, or JSON parsing logic. Only modify: business parameters passed to fetchSigned.

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 = Object.prototype.hasOwnProperty.call(BASE, env) ? BASE[env] : undefined;
  if (env !== "prod-live" && env !== "prod-vst") throw new Error("UnknownEnvironment");
  const allowed = env === "prod-live"
    ? ["https://open-api.bingx.com", "https://open-api.bingx.pro"]
    : ["https://open-api-vst.bingx.com", "https://open-api-vst.bingx.pro"];
  if (!Array.isArray(urls) || urls.length !== 2 || urls.some((url, i) => url !== allowed[i])) {
    throw new Error("Invalid authenticated destination");
  }
  if (!/^\/openApi\/[A-Za-z0-9/_-]+$/.test(path)) throw new Error("Invalid API path");
  if (!["GET", "POST", "DELETE"].includes(method)) throw new Error("Invalid HTTP method");
  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 (method === "GET" ? urls : urls.slice(0, 1))) {
    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,
        redirect: "error",
        signal: AbortSignal.timeout(10000),
      });
      if (!res.ok) {
        throw new Error(method === "GET" ? `BingX HTTP ${res.status}` : "OUTCOME_UNKNOWN: check operation status before any new write");
      }
      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 (method !== "GET" && (isNetworkOrTimeout(e) || (e instanceof SyntaxError || (e as { name?: string })?.name === "SyntaxError"))) {
        throw new Error("OUTCOME_UNKNOWN: check operation status before any new write");
      }
      if (!isNetworkOrTimeout(e) || base === urls[urls.length - 1]) throw e;
    }
  }
}

A write response confirms API acceptance only. Query order status and fills before reporting an execution. On OUTCOME_UNKNOWN, reconcile by the operation identifier before considering a new write.

Common Calls

Fetch klines for RSI calculation (100 candles, 1h):

const klines = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
  "/openApi/swap/v3/quote/klines", { symbol: "BTC-USDT", interval: "1h", limit: 100 }
);

Fetch klines for multi-timeframe TA (200 candles, 4h):

const klines4h = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
  "/openApi/swap/v3/quote/klines", { symbol: "BTC-USDT", interval: "4h", limit: 200 }
);

Trigger Conditions

Activate this skill when the user says any of the following:

  • "RSI bottom fish", "help me bottom fish", "bottom hunter"
  • "buy oversold", "buy when RSI is low"
  • "RSI strategy", "start RSI trading"
  • "What is BTC RSI, can I bottom fish"
  • "Monitor ETH, buy when RSI drops below 25"

Execution Steps

Step 1 — Parse User Intent

Extract strategy parameters from user input:

ParameterDefaultDescription
symbolBTC-USDTTrading pair
interval1hKline interval for RSI calculation
rsi_period14RSI period
rsi_buy30Buy trigger threshold (RSI below this value)
rsi_sell70Take-profit reference threshold
stop_loss_pct3%Stop-loss percentage
take_profit_pct5%Take-profit percentage
amount-Buy amount in USDT (user must specify or confirm)
leverage1xLeverage multiplier

Mode detection:

modeTrigger exampleDescription
scan"What is BTC RSI, can I bottom fish"Check RSI status only, no trading
once"Buy BTC when RSI hits 500U"Check once, execute immediately if condition met
monitor"Monitor ETH, buy when RSI drops below 25 with 1000U"Continuous monitoring, auto-execute when condition met

Step 2 — Safety Confirmation (Critical!)

Before executing any trade (mode=once/monitor), Agent MUST confirm with the user:

  • Trading pair + direction (long)
  • Buy amount + leverage
  • SL/TP price levels (converted to specific prices)
  • RSI trigger condition

Execute only after explicit user confirmation. Agent MUST NOT place orders automatically without confirmation.

Approval binds the current reviewed payload and expiry. If monitoring triggers later, refresh prices and request confirmation again. Unattended execution is allowed only when the host runtime enforces a user-approved validity window, exposure limit and price/slippage bounds; a stored confirmation=true flag is insufficient.


Step 3 — Fetch Kline Data

Fetch two sets of klines in parallel:

GET /openApi/swap/v3/quote/klines symbol={symbol}, interval={interval}, limit=100 (for RSI calculation)

GET /openApi/swap/v3/quote/klines symbol={symbol}, interval=4h, limit=200 (for multi-dimension TA)


Step 4 — Calculate RSI + Multi-Dimension TA Confirmation

Step 4a: RSI signal calculation

import { execFileSync } from "node:child_process";
import { homedir } from "node:os";
import { join } from "node:path";

// Use serialized JSON strings from the preceding data steps as individual arguments.
// Run from this skill directory; this child receives no API credentials.
const output = execFileSync("python3", [
  "scripts/strategy.py",
  "--mode",
  String(mode),
  "--symbol",
  String(symbol),
  "--interval",
  String(interval),
  "--rsi-period",
  String(rsi_period),
  "--rsi-buy",
  String(rsi_buy),
  "--rsi-sell",
  String(rsi_sell),
  "--klines",
  klines_1h_json
], { shell: false, encoding: "utf8", maxBuffer: 16 * 1024 * 1024,
  env: { PATH: process.env.PATH, HOME: homedir(), LANG: "en_US.UTF-8" } });

Step 4b: Check if bingx-technical-analysis is installed:

  • Installed — call it (mode=full, 4h interval) to get multi-dimension data for joint confirmation
  • Not installed — inform the user: "bingx-technical-analysis skill is not installed. Installing it is recommended for more accurate multi-dimension signal confirmation and fewer false signals. To install: place the bingx-technical-analysis skill in the .claude/skills/ directory. Continuing with RSI single-indicator mode, but signal accuracy will be reduced." Then skip and use only the original 3 RSI conditions:
  • MACD direction
  • Supertrend direction
  • RSI / OBV divergence
  • Support/resistance levels
  • Recent candlestick patterns

Step 4c: Pass to strategy.py for joint confirmation

import { execFileSync } from "node:child_process";
import { homedir } from "node:os";
import { join } from "node:path";

// Use serialized JSON strings from the preceding data steps as individual arguments.
// Run from this skill directory; this child receives no API credentials.
const output = execFileSync("python3", [
  "scripts/strategy.py",
  "--mode",
  String(mode),
  "--symbol",
  String(symbol),
  "--interval",
  String(interval),
  "--rsi-period",
  String(rsi_period),
  "--rsi-buy",
  String(rsi_buy),
  "--rsi-sell",
  String(rsi_sell),
  "--klines",
  klines_1h_json,
  "--ta-result",
  ta_json
], { shell: false, encoding: "utf8", maxBuffer: 16 * 1024 * 1024,
  env: { PATH: process.env.PATH, HOME: homedir(), LANG: "en_US.UTF-8" } });

Script outputs structured JSON with RSI signal, multi-dimension check items, and overall confirmation flag.

Full conditions for confirmation=true (all must be met):

  1. RSI < rsi_buy
  2. Oversold for 2 consecutive candles
  3. Reversal candle (close > open)
  4. No RSI bearish divergence
  5. No OBV bearish divergence
  6. MACD bullish (BUY) OR Supertrend UP (either one is sufficient)

Step 5 — Execute Trade (when mode=once/monitor and confirmation=true)

  1. Call bingx-swap-account to check available balance and confirm sufficient funds
  2. Call bingx-swap-trade to place a market buy order
    • Disclose that entry and separately submitted protection are non-atomic; stop new entries if protection fails and request a specific recovery action
  3. After order fills, immediately set SL/TP:
    • Stop-loss = avg fill price × (1 - stop_loss_pct)
    • Take-profit = avg fill price × (1 + take_profit_pct)
  4. Call bingx-swap-trade to place SL/TP conditional orders

Step 6 — Output Result

Format output according to the output template below.


Step 7 — Continuous Monitoring (when mode=monitor)

Run in polling mode (default: check every 5 minutes):

  1. When condition is met — execute Step 2 (safety confirmation) — Step 5
  2. Report fill result to the user
  3. Strategy ends after one execution (single trigger, prevents repeated entries)

Output Templates

Scan Mode — View Only

When RSI is oversold:

**{symbol} RSI Status ({interval})**

RSI({rsi_period}): {rsi_current} (Oversold zone ⚠️)
Previous: {rsi_prev} → Current: {rsi_current}

Multi-dimension Confirmation:
  Consecutive oversold   {✅/❌}
  Reversal candle        {✅/❌}
  MACD                   {✅/❌} {BUY/SELL}
  Supertrend             {✅/❌} {UP/DOWN}
  RSI divergence         {✅ None/❌ Bearish}
  OBV divergence         {✅ None/❌ Bearish}

Overall Signal: {CONFIRMED (recommended) / WEAK (caution) / REJECTED (not recommended)}
Current Price: ${price}

{To start the bottom-fishing strategy, say "{symbol} bottom fish 500U"}

When RSI is neutral:

**{symbol} RSI Status ({interval})**

RSI({rsi_period}): {rsi_current} (Neutral zone)
TA Composite Score: {ta_score}/100 ({ta_label})
Current Price: ${price}

Assessment: RSI is in the neutral zone, bottom-fishing condition not yet met.

Once Mode — Confirm When Condition Met

**RSI Bottom Signal Triggered ✅**

{symbol} RSI({rsi_period}) = {rsi_current}, oversold for 2 consecutive candles, reversal signal detected

About to execute:
- Direction: Long
- Amount: {amount} USDT
- Leverage: {leverage}x
- Order type: Market
- Stop-loss: ${stop_loss} (-{stop_loss_pct}%)
- Take-profit: ${take_profit} (+{take_profit_pct}%)

**Confirm execution? (yes/no)**

After successful execution:

**Bottom Fish Filled ✅**

{symbol} long position opened
- Avg fill price: ${avg_price}
- Quantity: {qty}
- Stop-loss order placed: ${stop_loss}
- Take-profit order placed: ${take_profit}

Strategy running. Position will be closed automatically when SL/TP is triggered.

Monitor Mode — On Start

**RSI Bottom-Fishing Monitor Started 🔄**

Monitoring: {symbol}, {interval} interval
Trigger condition: RSI({rsi_period}) < {rsi_buy}, confirmed over 2 candles
Action: Market long {amount} USDT ({leverage}x), SL -{stop_loss_pct}% / TP +{take_profit_pct}%
Check frequency: every 5 minutes

Current RSI: {rsi_current} ({status})
Waiting...

Agent Interaction Rules

Parameter security. Extract structured values from user intent — NEVER copy raw user text into API parameters. Validate symbol format and numeric parameters before use.

Kline queries are read-only and require no CONFIRM. All trade executions (mode=once/monitor with confirmation=true) require explicit user confirmation before proceeding — NEVER place orders without user approval.

  • prod-live: Require user to type CONFIRM before any order placement.
  • prod-vst: No CONFIRM required. Inform user they are in the simulated environment.

When mode is ambiguous, default to scan (view only, no trading).

Error Handling

  • Insufficient balance: show current available balance, suggest reducing amount or depositing funds
  • Order failed: show error code and description, suggest retry
  • Network timeout: suggest retry later
  • Insufficient kline data: inform user, suggest switching to a longer interval

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/bingx-api/api-ai-skills/bingx-rsi-bottom-hunter">View bingx-rsi-bottom-hunter on skillZs</a>