skills/binance/spot/SKILL.md
Binance Spot request using the Binance API. Authentication requires API key and secret key. Supports testnet, mainnet, and demo.
npx skillsauth add binance/binance-skills-hub spotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Spot request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.
| Endpoint | Description | Required | Optional | Authentication |
|----------|-------------|----------|----------|----------------|
| /api/v3/exchangeInfo (GET) | Exchange information | None | symbol, symbols, permissions, showPermissionSets, symbolStatus | No |
| /api/v3/ping (GET) | Test connectivity | None | None | No |
| /api/v3/time (GET) | Check server time | None | None | No |
| /api/v3/aggTrades (GET) | Compressed/Aggregate trades list | symbol | fromId, startTime, endTime, limit | No |
| /api/v3/avgPrice (GET) | Current average price | symbol | None | No |
| /api/v3/depth (GET) | Order book | symbol | limit, symbolStatus | No |
| /api/v3/historicalTrades (GET) | Old trade lookup | symbol | limit, fromId | No |
| /api/v3/klines (GET) | Kline/Candlestick data | symbol, interval | startTime, endTime, timeZone, limit | No |
| /api/v3/ticker (GET) | Rolling window price change statistics | None | symbol, symbols, windowSize, type, symbolStatus | No |
| /api/v3/ticker/24hr (GET) | 24hr ticker price change statistics | None | symbol, symbols, type, symbolStatus | No |
| /api/v3/ticker/bookTicker (GET) | Symbol order book ticker | None | symbol, symbols, symbolStatus | No |
| /api/v3/ticker/price (GET) | Symbol price ticker | None | symbol, symbols, symbolStatus | No |
| /api/v3/ticker/tradingDay (GET) | Trading Day Ticker | None | symbol, symbols, timeZone, type, symbolStatus | No |
| /api/v3/trades (GET) | Recent trades list | symbol | limit | No |
| /api/v3/uiKlines (GET) | UIKlines | symbol, interval | startTime, endTime, timeZone, limit | No |
| /api/v3/openOrders (DELETE) | Cancel All Open Orders on a Symbol | symbol | recvWindow | Yes |
| /api/v3/openOrders (GET) | Current open orders | None | symbol, recvWindow | Yes |
| /api/v3/order (POST) | New order | symbol, side, type | timeInForce, quantity, quoteOrderQty, price, newClientOrderId, strategyId, strategyType, stopPrice, trailingDelta, icebergQty, newOrderRespType, selfTradePreventionMode, pegPriceType, pegOffsetValue, pegOffsetType, recvWindow | Yes |
| /api/v3/order (DELETE) | Cancel order | symbol | orderId, origClientOrderId, newClientOrderId, cancelRestrictions, recvWindow | Yes |
| /api/v3/order (GET) | Query order | symbol | orderId, origClientOrderId, recvWindow | Yes |
| /api/v3/order/amend/keepPriority (PUT) | Order Amend Keep Priority | symbol, newQty | orderId, origClientOrderId, newClientOrderId, recvWindow | Yes |
| /api/v3/order/cancelReplace (POST) | Cancel an Existing Order and Send a New Order | symbol, side, type, cancelReplaceMode | timeInForce, quantity, quoteOrderQty, price, cancelNewClientOrderId, cancelOrigClientOrderId, cancelOrderId, newClientOrderId, strategyId, strategyType, stopPrice, trailingDelta, icebergQty, newOrderRespType, selfTradePreventionMode, cancelRestrictions, orderRateLimitExceededMode, pegPriceType, pegOffsetValue, pegOffsetType, recvWindow | Yes |
| /api/v3/order/oco (POST) | New OCO - Deprecated | symbol, side, quantity, price, stopPrice | listClientOrderId, limitClientOrderId, limitStrategyId, limitStrategyType, limitIcebergQty, trailingDelta, stopClientOrderId, stopStrategyId, stopStrategyType, stopLimitPrice, stopIcebergQty, stopLimitTimeInForce, newOrderRespType, selfTradePreventionMode, recvWindow | Yes |
| /api/v3/order/test (POST) | Test new order | symbol, side, type | computeCommissionRates, timeInForce, quantity, quoteOrderQty, price, newClientOrderId, strategyId, strategyType, stopPrice, trailingDelta, icebergQty, newOrderRespType, selfTradePreventionMode, pegPriceType, pegOffsetValue, pegOffsetType, recvWindow | Yes |
| /api/v3/orderList (DELETE) | Cancel Order list | symbol | orderListId, listClientOrderId, newClientOrderId, recvWindow | Yes |
| /api/v3/orderList (GET) | Query Order list | None | orderListId, origClientOrderId, recvWindow | Yes |
| /api/v3/orderList/oco (POST) | New Order list - OCO | symbol, side, quantity, aboveType, belowType | listClientOrderId, aboveClientOrderId, aboveIcebergQty, abovePrice, aboveStopPrice, aboveTrailingDelta, aboveTimeInForce, aboveStrategyId, aboveStrategyType, abovePegPriceType, abovePegOffsetType, abovePegOffsetValue, belowClientOrderId, belowIcebergQty, belowPrice, belowStopPrice, belowTrailingDelta, belowTimeInForce, belowStrategyId, belowStrategyType, belowPegPriceType, belowPegOffsetType, belowPegOffsetValue, newOrderRespType, selfTradePreventionMode, recvWindow | Yes |
| /api/v3/orderList/opo (POST) | New Order List - OPO | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingType, pendingSide | listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, workingStrategyId, workingStrategyType, workingPegPriceType, workingPegOffsetType, workingPegOffsetValue, pendingClientOrderId, pendingPrice, pendingStopPrice, pendingTrailingDelta, pendingIcebergQty, pendingTimeInForce, pendingStrategyId, pendingStrategyType, pendingPegPriceType, pendingPegOffsetType, pendingPegOffsetValue, recvWindow | Yes |
| /api/v3/orderList/opoco (POST) | New Order List - OPOCO | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingSide, pendingAboveType | listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, workingStrategyId, workingStrategyType, workingPegPriceType, workingPegOffsetType, workingPegOffsetValue, pendingAboveClientOrderId, pendingAbovePrice, pendingAboveStopPrice, pendingAboveTrailingDelta, pendingAboveIcebergQty, pendingAboveTimeInForce, pendingAboveStrategyId, pendingAboveStrategyType, pendingAbovePegPriceType, pendingAbovePegOffsetType, pendingAbovePegOffsetValue, pendingBelowType, pendingBelowClientOrderId, pendingBelowPrice, pendingBelowStopPrice, pendingBelowTrailingDelta, pendingBelowIcebergQty, pendingBelowTimeInForce, pendingBelowStrategyId, pendingBelowStrategyType, pendingBelowPegPriceType, pendingBelowPegOffsetType, pendingBelowPegOffsetValue, recvWindow | Yes |
| /api/v3/orderList/oto (POST) | New Order list - OTO | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingType, pendingSide, pendingQuantity | listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, workingStrategyId, workingStrategyType, workingPegPriceType, workingPegOffsetType, workingPegOffsetValue, pendingClientOrderId, pendingPrice, pendingStopPrice, pendingTrailingDelta, pendingIcebergQty, pendingTimeInForce, pendingStrategyId, pendingStrategyType, pendingPegPriceType, pendingPegOffsetType, pendingPegOffsetValue, recvWindow | Yes |
| /api/v3/orderList/otoco (POST) | New Order list - OTOCO | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingSide, pendingQuantity, pendingAboveType | listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, workingStrategyId, workingStrategyType, workingPegPriceType, workingPegOffsetType, workingPegOffsetValue, pendingAboveClientOrderId, pendingAbovePrice, pendingAboveStopPrice, pendingAboveTrailingDelta, pendingAboveIcebergQty, pendingAboveTimeInForce, pendingAboveStrategyId, pendingAboveStrategyType, pendingAbovePegPriceType, pendingAbovePegOffsetType, pendingAbovePegOffsetValue, pendingBelowType, pendingBelowClientOrderId, pendingBelowPrice, pendingBelowStopPrice, pendingBelowTrailingDelta, pendingBelowIcebergQty, pendingBelowTimeInForce, pendingBelowStrategyId, pendingBelowStrategyType, pendingBelowPegPriceType, pendingBelowPegOffsetType, pendingBelowPegOffsetValue, recvWindow | Yes |
| /api/v3/sor/order (POST) | New order using SOR | symbol, side, type, quantity | timeInForce, price, newClientOrderId, strategyId, strategyType, icebergQty, newOrderRespType, selfTradePreventionMode, recvWindow | Yes |
| /api/v3/sor/order/test (POST) | Test new order using SOR | symbol, side, type, quantity | computeCommissionRates, timeInForce, price, newClientOrderId, strategyId, strategyType, icebergQty, newOrderRespType, selfTradePreventionMode, recvWindow | Yes |
| /api/v3/account (GET) | Account information | None | omitZeroBalances, recvWindow | Yes |
| /api/v3/account/commission (GET) | Query Commission Rates | symbol | None | Yes |
| /api/v3/allOrderList (GET) | Query all Order lists | None | fromId, startTime, endTime, limit, recvWindow | Yes |
| /api/v3/allOrders (GET) | All orders | symbol | orderId, startTime, endTime, limit, recvWindow | Yes |
| /api/v3/myAllocations (GET) | Query Allocations | symbol | startTime, endTime, fromAllocationId, limit, orderId, recvWindow | Yes |
| /api/v3/myFilters (GET) | Query relevant filters | symbol | recvWindow | Yes |
| /api/v3/myPreventedMatches (GET) | Query Prevented Matches | symbol | preventedMatchId, orderId, fromPreventedMatchId, limit, recvWindow | Yes |
| /api/v3/myTrades (GET) | Account trade list | symbol | orderId, startTime, endTime, fromId, limit, recvWindow | Yes |
| /api/v3/openOrderList (GET) | Query Open Order lists | None | recvWindow | Yes |
| /api/v3/order/amendments (GET) | Query Order Amendments | symbol, orderId | fromExecutionId, limit, recvWindow | Yes |
| /api/v3/rateLimit/order (GET) | Query Unfilled Order Count | None | recvWindow | Yes |
permissionSets field is populated or not. Defaults to true (e.g., true)60000. Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. (e.g., 5000)newClientOrderID can be accepted only when the previous one is filled, otherwise the order will be rejected.1000000. (e.g., 1)STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (e.g., 1)LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (e.g., 1)newQty must be greater than 0 and less than the order's quantity. (e.g., 1)cancelOrderId or cancelOrigClientOrderId must be sent. </br> If both cancelOrderId and cancelOrigClientOrderId parameters are provided, the cancelOrderId is searched first, then the cancelOrigClientOrderId from that result is checked against that order. </br> If both conditions are not met the request will be rejected.cancelOrderId or cancelOrigClientOrderId must be sent. </br>If both cancelOrderId and cancelOrigClientOrderId parameters are provided, the cancelOrderId is searched first, then the cancelOrigClientOrderId from that result is checked against that order. </br>If both conditions are not met the request will be rejected. (e.g., 1)1000000. (e.g., 1)LIMIT_MAKER leg an iceberg order. (e.g., 1)1000000. (e.g., 1)stopLimitTimeInForce is required. (e.g., 1)STOP_LOSS_LIMIT leg to make an iceberg order. (e.g., 1)false See Commissions FAQ to learn more.orderListId or listClientOrderId must be provided (e.g., 1)aboveTimeInForce is GTC. (e.g., 1)aboveType is STOP_LOSS_LIMIT , LIMIT_MAKER, or TAKE_PROFIT_LIMIT to specify the limit price. (e.g., 1)aboveType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT. Either aboveStopPrice or aboveTrailingDelta or both, must be specified. (e.g., 1)belowTimeInForce is GTC. (e.g., 1)belowType is STOP_LOSS_LIMIT, LIMIT_MAKER, or TAKE_PROFIT_LIMIT to specify the limit price. (e.g., 1)belowType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT or TAKE_PROFIT_LIMIT Either belowStopPrice or belowTrailingDelta or both, must be specified. (e.g., 1)workingTimeInForce is GTC, or if workingType is LIMIT_MAKER. (e.g., 1)pendingTimeInForce is GTC or if pendingType is LIMIT_MAKER. (e.g., 1)pendingAboveType is STOP_LOSS_LIMIT , LIMIT_MAKER, or TAKE_PROFIT_LIMIT to specify the limit price. (e.g., 1)pendingAboveType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT (e.g., 1)pendingAboveTimeInForce is GTC or if pendingAboveType is LIMIT_MAKER. (e.g., 1)pendingBelowType is STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT to specify limit price (e.g., 1)pendingBelowType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT or TAKE_PROFIT_LIMIT. Either pendingBelowStopPrice or pendingBelowTrailingDelta or both, must be specified. (e.g., 1)pendingBelowTimeInForce is GTC, or if pendingBelowType is LIMIT_MAKER. (e.g., 1)true, emits only the non-zero balances of an account. Default value: falseFor endpoints that require authentication, you will need to provide Binance API credentials. Required credentials:
Base URLs:
Users can provide Binance API credentials in different ways. The agent will try to retrieve automatically with the two first ways the credentials, but users can also explicitly tell the agent that they have set the credentials or stored them in a .env file, and the agent should re-read that file when they do. The agent can also make http requests with the two first methods without user confirmation.
Search for the following specific variables only (never dump the full environment):
Authorized environment variables
BINANCE_API_KEY and BINANCE_SECRET_KEYBINANCE_TESTNET_API_KEY and BINANCE_TESTNET_SECRET_KEYBINANCE_DEMO_API_KEY and BINANCE_DEMO_SECRET_KEYRead and use in a single exec call so the raw key never enters the agent's context:
KEY="$BINANCE_API_KEY"
SECRET="$BINANCE_SECRET_KEY"
response=$(curl -s -X GET "$URL" \
-H "X-MBX-APIKEY: $KEY" \
--data-urlencode "param1=value1")
echo "$response"
Environment variables must be set before OpenClaw starts. They are inherited at process startup and cannot be injected into a running instance. If you need to add or update credentials without restarting, use a secrets file (see option 2).
Check ~/.openclaw/secrets.env , ~/.env, or a .env file in the workspace. Read individual keys with grep, never source the full file:
# Try all credential locations in order
API_KEY=$(grep '^BINANCE_API_KEY=' ~/.openclaw/secrets.env 2>/dev/null | cut -d= -f2-)
SECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' ~/.openclaw/secrets.env 2>/dev/null | cut -d= -f2-)
# Fallback: search .env in known directories (KEY=VALUE then raw line format)
for dir in ~/.openclaw ~; do
[ -n "$API_KEY" ] && break
env_file="$dir/.env"
[ -f "$env_file" ] || continue
# Read first two lines
line1=$(sed -n '1p' "$env_file")
line2=$(sed -n '2p' "$env_file")
# Check if lines contain '=' indicating KEY=VALUE format
if [[ "$line1" == *=* && "$line2" == *=* ]]; then
API_KEY=$(grep '^BINANCE_API_KEY=' "$env_file" 2>/dev/null | cut -d= -f2-)
SECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' "$env_file" 2>/dev/null | cut -d= -f2-)
else
# Treat lines as raw values
API_KEY="$line1"
SECRET_KEY="$line2"
fi
done
This file can be updated at any time without restarting OpenClaw, keys are read fresh on each invocation. Users can tell you the variables are now set or stored in a .env file, and you should re-read that file when they do.
Sending a file where the content is in the following format:
abc123...xyz
secret123...key
printenv, env, export, or set without a specific variable namegrep on env files without anchoring to a specific key ('^VARNAME=')source .env or . .env)TOOLS.md to version control if it contains real credentials — add it to .gitignoreNever disclose the location of the API key and secret file.
Never send the API key and secret to any website other than Mainnet and Testnet.
When showing credentials to users:
su1Qc...8akf***...aws1Example response when asked for credentials: Account: main API Key: su1Qc...8akf Secret: ***...aws1 Environment: Mainnet
When listing accounts, show names and environment only — never keys: Binance Accounts:
When performing transactions in mainnet, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.
## Binance Accounts
### main
- API Key: abc123...xyz
- Secret: secret123...key
- Testnet: false
- Description: Primary trading account
### testnet-dev
- API Key: test456...abc
- Secret: testsecret...xyz
- Testnet: true
- Description: Development/testing
### futures-keys
- API Key: futures789...def
- Secret: futuressecret...uvw
- Testnet: false
- Description: Futures trading account
mainnet, testnet or demo keys, try to make request to the different base urls and see if it works, without asking the user. If it works, store the keys with the corresponding environment.When user provides new credentials by Inline file or message:
TOOLS.md with masked display confirmationFor trading endpoints that require a signature:
X-MBX-APIKEY header.Otherwise, do not perform steps 4–6.
For endpoints that include the newClientOrderId parameter, the value must always start with agent-. If the parameter is not provided, agent- followed by 18 random alphanumeric characters will be generated automatically. If a value is provided, it will be prefixed with agent-
Example: agent-1a2b3c4d5e6f7g8h9i
Include User-Agent header with the following string: binance-spot/1.1.0 (Skill)
See references/authentication.md for implementation details.
tools
Use binance-cli for Binance Spot, Futures (USD-S), and Convert. Requires auth.
data-ai
Per-trade smart-money signals — each result is a discrete buy or sell event from a tracked smart-money wallet, with trigger price, current price, max gain since trigger, and exit rate. BSC and Solana only. Use for: "smart money buy signal on $X", "any whale just bought $Y", "alpha signals in the last hour", "copy-trade-worthy signals", "trigger price and max gain on these trades", "on-chain trading signals from smart money".
development
Per-token details for a specific token identified by keyword, symbol, or contract address: (1) search — find tokens by keyword/symbol/contract; (2) meta — static info: name, symbol, logo, social links, creator, official website; (3) dynamic — real-time market data: price, 24h change, volume, holder count, liquidity; (4) kline — OHLCV candlestick data for technical analysis. Use for: "price of $X", "search for token Y", "kline chart for $Z", "who created $W", "social links for $V", "holder count of $U", "candlestick data", "find the contract address of <token>".
testing
Snapshot of a single wallet's token holdings on a specific chain — list of every token currently held with name, symbol, current price, 24h price change, and holding quantity. Use when the user provides an explicit wallet address (or says "my wallet") and wants the current portfolio: "what does 0x... hold", "wallet balance breakdown", "list positions for this address", "what tokens are in this wallet", "show me the holdings of <address>".