comprabtc
v0.1.1Non-custodial Bitcoin DCA for agent treasuries: approve USDT once, stack WBTC on Celo forever.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_wallet_status
Balances (USDT, CELO for gas, WBTC sats), remaining authorized budget (allowance) and the current DCA plan of a wallet. Free, read-only. ALWAYS call this before create_plan, renew_budget or cancel_plan.
| Parameter | Type | Description |
|---|---|---|
address | string | Wallet to inspect (defaults to the configured treasury wallet) |
get_portfolio
Bitcoin accumulated by a wallet's plan: execution history (each purchase with tx hash and sats), cost basis, live BTC price. Free, read-only, via the CompraBTC API.
| Parameter | Type | Description |
|---|---|---|
address | string | Wallet (defaults to the configured treasury wallet) |
create_plan
Create (or OVERWRITE) the treasury's Bitcoin DCA plan — signs 2 on-chain transactions: approve(total budget) + createPlan. Get explicit operator/human approval on the exact numbers first. Non-custodial: funds stay in the wallet; the verified contract enforces amount and interval; purchased WBTC arrives at this same wallet; fees ($0.005 + 1%) come OUT of each installment. First purchase executes within ~1 minute. amount_per_run: $0.10-$50 USDT (pool-depth safety cap). interval_seconds >= 3600 (hourly). budget = amount × installments, must be <= USDT balance.
| Parameter | Type | Description |
|---|---|---|
amount_per_run_usdt * | number | USDT per purchase (e.g. 1) |
interval_seconds * | integer | Seconds between purchases (3600=hourly, 86400=daily) |
total_budget_usdt * | number | Total USDT to authorize (allowance cap = installments × amount) |
renew_budget
Authorize a new total budget for the existing plan — signs one approve transaction. IMPORTANT: approve REPLACES the previous allowance (it does not add). Use when installments_left is low or purchases paused for exhausted budget.
| Parameter | Type | Description |
|---|---|---|
total_budget_usdt * | number | New total USDT to authorize |
cancel_plan
Stop the DCA plan immediately — signs cancelPlan() and, by default, also revokes the USDT allowance (approve 0) for a clean, double-locked exit. The WBTC already purchased stays in the wallet untouched.
| Parameter | Type | Description |
|---|---|---|
revoke_allowance | boolean | Also set the allowance to 0 (default true) |