binance-dca — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited binance-dca (Agent Skill) and scored it 87/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 3 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 3 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Systematic crypto accumulation made simple. Plan, execute, and track DCA strategies on Binance with confidence.
Dollar-Cost Averaging (DCA) is an investment strategy where you buy a fixed dollar amount of an asset at regular intervals, regardless of price. This approach:
This tool helps you plan, automate, and track your DCA strategy on Binance spot markets.
OpenClaw-DCA (or similar)⚠️ Security tips:
Never hardcode credentials. Always use environment variables:
export BINANCE_API_KEY="your-api-key-here"
export BINANCE_SECRET_KEY="your-secret-key-here"Make them permanent (optional, add to ~/.bashrc or ~/.zshrc):
echo 'export BINANCE_API_KEY="your-api-key-here"' >> ~/.bashrc
echo 'export BINANCE_SECRET_KEY="your-secret-key-here"' >> ~/.bashrc
source ~/.bashrcFor testnet (recommended for first-time users):
export BINANCE_BASE_URL="https://testnet.binance.vision"Get testnet API keys at: testnet.binance.vision
# Check balance (should not error)
bash scripts/dca.sh balance USDT
# Check BTC price
bash scripts/dca.sh price BTCUSDTIf you see prices/balances, you're ready!
bash scripts/dca.sh price BTCUSDT
# Output: BTCUSDT = 95234.50Works for any pair:
bash scripts/dca.sh price ETHUSDT
bash scripts/dca.sh price SOLUSDTbash scripts/dca.sh balance USDT
# Output: USDT: free=1000.00000000, locked=0.00000000Check any asset:
bash scripts/dca.sh balance BTC
bash scripts/dca.sh balance ETHScenario: You want to invest $600 over 3 months in BTC.
# $50 every week for 12 weeks
bash scripts/dca.sh plan 50 7 12 BTCUSDTOutput:
DCA Plan: BTCUSDT
==========================
Buy amount: $50 per buy
Frequency: every 7 days
Duration: 12 buys
Current: 95234.50
==========================
Total invest: $600.00
At cur. price: 0.00630245 BTC
Time span: 84 days (~2.8 months)
Scenario Analysis (if avg price over period is):
-30% -> avg $ 66,664.15 -> 0.00900000 BTC -> PnL: -$186.00 (-31.0%)
-20% -> avg $ 76,187.60 -> 0.00787500 BTC -> PnL: -$126.00 (-21.0%)
-10% -> avg $ 85,711.05 -> 0.00700000 BTC -> PnL: -$63.00 (-10.5%)
+0% -> avg $ 95,234.50 -> 0.00630245 BTC -> PnL: +$0.00 (+0.0%)
+10% -> avg $104,757.95 -> 0.00572727 BTC -> PnL: +$63.00 (+10.5%)
+20% -> avg $114,281.40 -> 0.00525000 BTC -> PnL: +$126.00 (+21.0%)
+50% -> avg $142,851.75 -> 0.00420000 BTC -> PnL: +$378.00 (+63.0%)
+100% -> avg $190,469.00 -> 0.00315122 BTC -> PnL: +$630.00 (+105.0%)What this tells you:
Use this to set realistic expectations before committing.
Market order (instant execution):
# Buy $50 worth of BTC at current market price
bash scripts/dca.sh buy BTCUSDT 50Output:
Placing MARKET buy: BTCUSDT for 50 USDT...
Order #123456789: FILLED
Filled: 0.00052500 BTCLimit order (wait for your price):
# Only buy if BTC drops to $94,000
bash scripts/dca.sh buy BTCUSDT 50 LIMIT 94000Output:
Placing LIMIT buy: BTCUSDT for 50 USDT...
Order #123456790: NEW
Filled: 0.00000000 BTC(Order will fill when price hits $94,000)
# Last 10 trades for BTCUSDT
bash scripts/dca.sh history BTCUSDT 10Output:
Last 10 trades for BTCUSDT:
---
1738752000 | BUY | qty=0.00052500 | price=95238.10 | fee=0.00000053 BNB
1738665600 | BUY | qty=0.00051234 | price=97567.20 | fee=0.00000051 BNB
...price [SYMBOL]Get current spot price for a trading pair.
bash scripts/dca.sh price BTCUSDT
bash scripts/dca.sh price ETHUSDT
bash scripts/dca.sh price SOLUSDTDefault: BTCUSDT if symbol is omitted.
balance [ASSET]Check free and locked balance for an asset.
bash scripts/dca.sh balance USDT
bash scripts/dca.sh balance BTC
bash scripts/dca.sh balance ETHOutput format: ASSET: free=X.XXXXXXXX, locked=Y.YYYYYYYY
Default: USDT if asset is omitted.
Use case: Check how much capital you have available before placing orders.
buy SYMBOL AMOUNT [TYPE] [PRICE]Place a buy order.
Arguments:
SYMBOL — Trading pair (e.g., BTCUSDT, ETHUSDT)AMOUNT — Amount in quote currency (USDT). The tool calculates how much BTC/ETH you get.TYPE — MARKET (default) or LIMITPRICE — Required for LIMIT ordersMarket order examples:
# Buy $50 worth of BTC instantly
bash scripts/dca.sh buy BTCUSDT 50
# Buy $100 worth of ETH instantly
bash scripts/dca.sh buy ETHUSDT 100Limit order examples:
# Buy $50 BTC only if price drops to $90,000
bash scripts/dca.sh buy BTCUSDT 50 LIMIT 90000
# Buy $200 ETH only if price hits $3,200
bash scripts/dca.sh buy ETHUSDT 200 LIMIT 3200Safety features:
history [SYMBOL] [LIMIT]Show recent trade history.
# Last 10 trades for BTCUSDT
bash scripts/dca.sh history BTCUSDT 10
# Last 20 trades for ETHUSDT
bash scripts/dca.sh history ETHUSDT 20
# Last 50 trades for SOLUSDT
bash scripts/dca.sh history SOLUSDT 50Defaults: BTCUSDT, limit 10
Output includes:
Use case: Track your DCA progress over time, calculate average entry price.
plan [AMOUNT] [FREQ_DAYS] [NUM_BUYS] [SYMBOL]Project a DCA plan with scenario analysis.
Arguments:
AMOUNT — Dollar amount per buy (default: 50)FREQ_DAYS — Days between buys (default: 7)NUM_BUYS — Number of buys (default: 12)SYMBOL — Trading pair (default: BTCUSDT)Examples:
# Default plan: $50 every 7 days, 12 buys
bash scripts/dca.sh plan
# Aggressive: $200 every 3 days, 30 buys
bash scripts/dca.sh plan 200 3 30 BTCUSDT
# Conservative: $25 every 14 days, 24 buys
bash scripts/dca.sh plan 25 14 24 BTCUSDT
# ETH DCA: $100 weekly for 6 months
bash scripts/dca.sh plan 100 7 26 ETHUSDTWhat you get:
Use this to:
✅ Good for:
❌ Not ideal for:
https://testnet.binance.vision before going livehistory to see your average entry priceplan and adaptConservative (1-2% per buy):
Moderate (3-5% per buy):
Aggressive (5-10% per buy):
Never go above 10% per buy — leaves no room for unexpected dips or expenses.
Pro tip: Match DCA frequency to your income schedule (weekly paycheck → weekly DCA).
Run DCA buys automatically via system cron:
# Every Monday at 9:00 AM UTC, buy $50 BTC
0 9 * * 1 BINANCE_API_KEY=... BINANCE_SECRET_KEY=... /path/to/dca.sh buy BTCUSDT 50Limitations:
Use OpenClaw for intelligent DCA automation with alerts:
Example: Weekly BTC DCA with Telegram notifications
{
"name": "Weekly BTC DCA",
"schedule": {
"kind": "cron",
"expr": "0 9 * * 1",
"tz": "America/New_York"
},
"sessionTarget": "isolated",
"payload": {
"kind": "agentTurn",
"message": "Execute weekly DCA: buy $50 BTCUSDT via binance-dca skill. After execution, send me a summary: amount bought, price, total BTC accumulated so far (check history). If it fails, alert me immediately.",
"deliver": true,
"channel": "telegram"
}
}Benefits:
openclaw cron commandsSetup:
# Add the cron job (paste JSON above when prompted)
openclaw cron add
# List all jobs
openclaw cron list
# Run manually to test
openclaw cron run <jobId>
# Disable temporarily
openclaw cron update <jobId> --enabled falseBINANCE_API_KEY not setFix: Set environment variables before running:
export BINANCE_API_KEY="your-key"
export BINANCE_SECRET_KEY="your-secret"
bash scripts/dca.sh priceTimestamp for this request is outside of the recvWindowCause: Your system clock is out of sync with Binance servers.
Fix (Linux/macOS):
# Sync system time
sudo ntpdate -s time.nist.gov
# Or install/enable NTP
sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncdFix (Docker):
Add --cap-add SYS_TIME when running container, or sync host clock.
Signature for this request is not validCauses:
BINANCE_SECRET_KEYFix:
API request failedCauses:
BINANCE_BASE_URLFix:
curl -I https://api.binance.comexport BINANCE_BASE_URL="https://testnet.binance.vision"Account has insufficient balance for requested actionCause: Not enough USDT in your spot account.
Fix:
bash scripts/dca.sh balance USDTNEW status (limit order not filling)This is normal for limit orders. Status means:
NEW — Order placed, waiting for priceFILLED — Order executedPARTIALLY_FILLED — Partial executionCANCELED — You or system canceled itCheck order status:
# View recent orders to see if it filled later
bash scripts/dca.sh history BTCUSDT 20Cancel pending limit orders:
Use Binance web/app → Orders → Open Orders → Cancel.
A: Yes! Use any Binance spot pair:
bash scripts/dca.sh buy ETHUSDT 100
bash scripts/dca.sh buy SOLUSDT 50
bash scripts/dca.sh buy ADAUSDT 25Just replace BTCUSDT with your desired pair.
A: Binance sets minimums per pair (usually $10-$20). Check Binance docs or test with a small amount on testnet first.
A: Not directly. Binance.US has a separate API (https://api.binance.us). You'd need to change BINANCE_BASE_URL and test. Not officially supported.
A: Not currently. This is DCA (accumulation) only. For selling, use Binance web/app or modify the script (change side=BUY to side=SELL).
A: No. Zero data storage. All credentials are environment variables. The script makes direct API calls to Binance and exits.
A: Yes, but set up API keys separately on each. Consider using IP whitelist on your API key for security.
A: Just adjust the amount in your next manual/cron execution. DCA is flexible — no commitment to fixed amounts.
Example: Week 1-4 use $50, Week 5+ use $100.
Run history and average the price column:
bash scripts/dca.sh history BTCUSDT 50 | grep BUY | awk '{print $8}' | awk '{s+=$1; n++} END {print s/n}'Or use a spreadsheet: export history, paste prices, =AVERAGE().
🔒 API Key Safety:
DCA-Only)🔒 Credential Management:
.env files with keys to Gitchmod 600 ~/.bashrc🔒 Testnet First:
export BINANCE_BASE_URL="https://testnet.binance.vision"🔒 Start Small:
Adjust buy amounts based on price:
Buy more when BTC dips:
# If BTC < $90k, buy $100. Otherwise $50.
CURRENT=$(bash scripts/dca.sh price BTCUSDT | awk '{print $3}')
if (( $(echo "$CURRENT < 90000" | bc -l) )); then
bash scripts/dca.sh buy BTCUSDT 100
else
bash scripts/dca.sh buy BTCUSDT 50
fiUse limit orders to "buy the dip":
# Place limit orders 5%, 10%, 15% below current price
PRICE=$(bash scripts/dca.sh price BTCUSDT | awk '{print $3}')
LIMIT_5=$(echo "$PRICE * 0.95" | bc)
LIMIT_10=$(echo "$PRICE * 0.90" | bc)
LIMIT_15=$(echo "$PRICE * 0.85" | bc)
bash scripts/dca.sh buy BTCUSDT 50 LIMIT $LIMIT_5
bash scripts/dca.sh buy BTCUSDT 50 LIMIT $LIMIT_10
bash scripts/dca.sh buy BTCUSDT 50 LIMIT $LIMIT_15DCA into multiple coins:
# Weekly: $30 BTC, $20 ETH, $10 SOL
bash scripts/dca.sh buy BTCUSDT 30
bash scripts/dca.sh buy ETHUSDT 20
bash scripts/dca.sh buy SOLUSDT 10Track all DCA buys to a log file:
#!/bin/bash
LOGFILE="$HOME/dca-log.txt"
DATE=$(date '+%Y-%m-%d %H:%M:%S')
bash scripts/dca.sh buy BTCUSDT 50 | tee -a "$LOGFILE"
echo "[$DATE] DCA executed" >> "$LOGFILE"Then analyze with:
grep "Filled:" ~/dca-log.txtFound a bug? Have a feature idea? Want to add support for other exchanges?
MIT License — Free to use, modify, and distribute.
Disclaimer: This tool is provided as-is. Use at your own risk. The authors are not responsible for trading losses, API issues, or incorrect usage. Always test on testnet first and never invest more than you can afford to lose.
Built with ❤️ for long-term crypto accumulation.
Questions? Feedback? Tag @fpsjago on ClawHub or OpenClaw Discord.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.