From bingx-ai-skills
Queries BingX spot wallet deposit/withdrawal history, coin network configs/limits/fees, deposit addresses, and initiates withdrawals.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bingx-ai-skills:spot-walletThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Authenticated endpoints for BingX wallet deposits and withdrawals. All endpoints require HMAC SHA256 signature authentication.
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 | Initiate a withdrawal | 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 timeCONSTRAINT: 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. 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 network/timeout errors ONLY.
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;
}
}
}
fetchSigned verbatim -- do not simplify or rewritejson-bigint (JSONBigParse.parse) for response parsing -- not JSON.parseX-SOURCE-KEY: BX-AI-SKILL header on every requestisNetworkOrTimeout checkQuery 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
Initiate a withdrawal:
const result = await fetchSigned("prod-live", API_KEY, SECRET, "POST",
"/openApi/wallets/v1/capital/withdraw/apply", {
coin: "USDT",
network: "BEP20",
address: "0xYourAddress",
amount: 100,
walletType: 1,
}
);
// result.id — the unique withdrawal record ID
For full parameter descriptions and response schemas, see api-reference.md.
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.
The withdrawal endpoint (POST /openApi/wallets/v1/capital/withdraw/apply) is a write operation requiring CONFIRM on prod-live. All other endpoints are read-only.
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
- Initiate a withdrawal
- 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
You are about to initiate the following withdrawal on Production Live:
- Coin: USDT
- Network: BEP20
- Address: 0x...
- Amount: 100
- Source: Fund account (walletType=1)
Type CONFIRM to proceed, or anything else to cancel.
Execute the API call and return the key result fields to the user:
id (unique withdrawal record ID)npx claudepluginhub bingx-api/api-ai-skills --plugin bingx-ai-skillsQueries BingX spot and fund account balances, asset overviews, and transfers assets between accounts via authenticated REST API endpoints. Useful for BingX trading account management.
Queries exchange account balance, positions, order history, and manages API keys. Handles registration with referral links and tier upgrades for OKX, Binance, Bybit, Bitget.
Queries Revolut X account balances, open orders, order history, fills, and trade history via the revx CLI. Handles auth errors by invoking revx-auth.