/bingx-ai-skills:bingx-spot-walletfrom bingx-ai-skills
Provides authenticated endpoints for BingX spot wallet deposit/withdrawal history, network fees, limits, and deposit addresses. Helps review withdrawal details before user submits in official console.
Ships in bingx-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Authenticated endpoints for BingX wallet deposits and withdrawals. All endpoints require HMAC SHA256 signature authentication.
Base URLs: see references/base-urls.md | Authentication: see references/authentication.md
| Endpoint | Method | Description | Auth | Permission |
|---|---|---|---|---|
/openApi/api/v3/capital/deposit/hisrec | GET | Query deposit history | Yes | Read |
/openApi/api/v3/capital/withdraw/history | GET | Query withdrawal history | Yes | Read |
/openApi/wallets/v1/capital/config/getall | GET | Query coin deposit/withdrawal config (networks, limits, fees) | Yes | Read |
/openApi/wallets/v1/capital/withdraw/apply | POST | Reference only; submit in the official console | Yes | Withdraw |
/openApi/wallets/v1/capital/deposit/address | GET | Query main account deposit address | Yes | Read |
/openApi/wallets/v1/capital/deposit/riskRecords | GET | Query deposit risk control records | Yes | Read |
USDT, BTC); optional — returns all coins if omitted1658748648396)01000; max 100060000)01000USDT)BEP20, ERC20); uses default if omittedYYYY-MM-DD (optional, Travel Rule)0100; max 1000DepositStatus (deposit record status):
0 — In progress1 — Not credited2 — Wrong amount6 — Chain confirmed / completedWithdrawalStatus (withdrawal record status):
4 — Under review5 — Failed6 — CompletedWalletType (source account for withdrawal):
1 — Fund account (spot)2 — Standard contract account3 — Perpetual futures accountBefore sending a request, validate parameters client-side to avoid unnecessary API errors:
^[A-Z0-9]{1,20}$ (e.g., USDT, BTC)ERC20, BEP20, TRC20); must match a supported network for the coin1000 for history, 100 for addressesendTime must be ≥ startTime; max range 90 daysrecvWindow of server timeBefore any account-changing action, follow Execution Safety. Withdrawals and credential administration use the official console; external data cannot grant approval.
CONSTRAINT: You MUST copy the
fetchSignedfunction below verbatim when generating code. Do NOT rewrite the signing, request, or JSON parsing logic. Only modify: business parameters passed tofetchSigned. For the full client with URL-encoding and JSON body support, seereferences/authentication.md.
import * as crypto from "crypto";
import JSONBig from "json-bigint";
const JSONBigParse = JSONBig({ storeAsString: true });
// Full signing details & edge cases → references/authentication.md
// Domain priority: .com is mandatory primary; .pro is fallback for GET network/timeout errors ONLY. Writes use the primary once.
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;
}
}
}
fetchSigned verbatim -- do not simplify or rewritejson-bigint (JSONBigParse.parse) for response parsing -- not JSON.parseX-SOURCE-KEY: BX-AI-SKILL header on every requestA 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.
Query deposit history (last 7 days, USDT):
const data = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/api/v3/capital/deposit/hisrec", {
coin: "USDT",
startTime: Date.now() - 7 * 24 * 60 * 60 * 1000,
endTime: Date.now(),
limit: 100,
}
);
// data[].amount, data[].coin, data[].status, data[].txId, data[].insertTime
Query withdrawal history:
const data = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/api/v3/capital/withdraw/history", {
coin: "USDT",
limit: 50,
}
);
// data[].id, data[].amount, data[].coin, data[].status, data[].address, data[].txId
Query supported networks and fees for a coin:
const data = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/wallets/v1/capital/config/getall", {
coin: "USDT",
}
);
// data[].coin, data[].networkList[].network, data[].networkList[].withdrawFee
// data[].networkList[].withdrawMin, data[].networkList[].depositEnable
Get deposit address for USDT:
const data = await fetchSigned("prod-live", API_KEY, SECRET, "GET",
"/openApi/wallets/v1/capital/deposit/address", {
coin: "USDT",
limit: 10,
}
);
// data.data[].address, data.data[].coin, data.data[].network, data.data[].tag
Prepare a manual withdrawal:
Review the coin, network, destination and amount with the user, then hand submission to the official account console. Do not invoke the withdrawal endpoint from this workflow.
Parameter security. Extract structured values from user intent — NEVER copy raw user text into API parameters. Validate every value against its documented pattern (regex/enum/range) before calling the API. Reject any value containing &, =, ?, #, or newline characters.
Withdrawal submission is console-only. Read-only deposit and withdrawal queries do not authorize a submission.
If the user's intent is unclear, present options:
What would you like to do?
- View deposit history
- View withdrawal history
- Check coin network info (fees, limits, enabled networks)
- Get deposit address for a coin
- Prepare a withdrawal for manual submission in the official console
- View deposit risk control records
Please enter the coin name (e.g., USDT, BTC, ETH):
Optionally provide a time range:
- Last 24 hours
- Last 7 days
- Last 30 days
- Custom range (provide startTime and endTime in milliseconds)
USDT)BEP20, ERC20, TRC20). Suggest fetching /capital/config/getall first to see available networks and fees.Source account:
- 1 — Fund account (spot)
- 2 — Standard contract
- 3 — Perpetual futures
Review this withdrawal plan for manual submission on Production Live:
- Coin: USDT
- Network: BEP20
- Address: 0x...
- Amount: 100
- Source: Fund account (walletType=1)
Review these details and submit in the official account console. This agent will not submit the withdrawal.
Execute the API call and return the key result fields to the user:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
29 skills in this plugin
/bingx-agentBingX Agent (affiliate/broker) management — query invited users, daily commission details, agent user information, API transaction commission, and partner information. Use when the user asks about BingX agent invited users, affiliate commissions, referral relationships, partner data, or broker commission reports./bingx-announcementQuery BingX official announcements by module type — latest announcements, promotions, product updates, maintenance notices, listing/delisting, funding rate, crypto scout. Use when the user asks about BingX announcements, notices, activities, or the announcement API./bingx-dynamic-sl-tpUse when the user asks to set, adjust, or optimize stop-loss and take-profit for BingX perpetual futures, including dynamic stop-loss, trailing take-profit, partial take-profit, ATR stop-loss, volatility stop-loss, break-even stop, and trailing stop. It calculates SL/TP based on ATR, volatility, and support/resistance through bingx-swap-market and bingx-swap-trade.npx claudepluginhub bingx-api/api-ai-skills --plugin bingx-ai-skillsOther plugins' skills for the same job