You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-sdk/cli-reference.md
+98Lines changed: 98 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,51 @@ Use `--quote-only` to preview without executing.
152
152
153
153
---
154
154
155
+
## automate
156
+
157
+
Create and manage DCA (dollar-cost-average) and limit-order automations. Both run as scheduled swaps under your stored wallet.
158
+
159
+
### automate add
160
+
161
+
Create a DCA automation by passing `--interval`; create a limit order by passing `--price` (and optional `--condition`). The two flags are mutually exclusive — exactly one must be supplied.
|`--from`| Source asset ID, e.g. `c60_t0xA0b8...` for USDC on Ethereum |
173
+
|`--to`| Destination asset ID, e.g. `c60` for ETH |
174
+
|`--amount`| Amount of source token per run |
175
+
|`--chain`| Source chain (default: `ethereum`) |
176
+
|`--interval`| DCA interval — accepts `30s`, `5m`, `1h`, `7d`, etc. Creates a recurring swap. |
177
+
|`--price`| Target USD price for a limit order (mutually exclusive with `--interval`) |
178
+
|`--condition`| Limit-order trigger: `above` or `below` (default: `below`) |
179
+
|`--max-runs`| Stop after N executions |
180
+
|`--expires`| Expiry date in ISO 8601, e.g. `2026-04-01`|
181
+
182
+
### automate list
183
+
184
+
```bash
185
+
twak automate list [--json]
186
+
```
187
+
188
+
### automate pause / resume / delete
189
+
190
+
```bash
191
+
twak automate pause <id> [--json]
192
+
twak automate resume <id> [--json]
193
+
twak automate delete <id> [--json]
194
+
```
195
+
196
+
Use the `id` returned by `automate list`. Paused automations stop executing but stay in storage; deleted ones are removed.
197
+
198
+
---
199
+
155
200
## onramp
156
201
157
202
Buy crypto with fiat (onramp) or sell crypto for fiat (offramp) through third-party providers. Quotes are aggregated; the user completes KYC and payment in the provider's hosted browser flow. Available providers depend on the user's region.
Pay for HTTP endpoints that respond with `402 Payment Required`. The client signs an on-chain payment authorization (EIP-3009 gasless preferred over Permit2) and retries the request with the proof attached as a `PAYMENT-SIGNATURE` header.
458
+
459
+
### x402 quote
460
+
461
+
Preview the payment options an endpoint offers. Read-only — no wallet password required.
Renders a table of available routes (chain + asset + amount + transfer method) sorted preferred-first, plus a `Next:` line with the exact `twak x402 request` command to run. Use the same `--method`/`--body` you plan to pay with — the server may emit a different challenge per verb.
|`--max-payment`| Required. Max payment to auto-approve, in atomic units of the chosen asset (e.g. `10000` = 0.01 USDC at 6dp). |
484
+
|`--method`| HTTP method (default: `GET`). Body is stripped on `GET`/`HEAD`. |
485
+
|`--body`| Raw request body. Sent with `Content-Type: application/json`. |
486
+
|`--prefer-network`| Restrict route to a chain — TWAK key (`base`, `bsc`, …) or CAIP-2 (`eip155:8453`). |
487
+
|`--prefer-method`| Restrict to `eip3009` (gasless) or `permit2-exact`. |
488
+
|`--prefer-asset`| Restrict to a contract address or a token-name substring (e.g. `Tether`, `USDC`). |
489
+
|`--yes`| Skip the per-payment confirmation prompt. Still capped by `--max-payment`. |
490
+
|`--auto-approve`| Skip the one-time Permit2 `approve(Permit2, MAX)` prompt (you pay gas). Independent of `--yes`. |
491
+
492
+
Only `https://` URLs are accepted; loopback/private IPs are rejected before any network call. EIP-3009 wins by default whenever offered with valid `extra.name`/`extra.version` metadata. Common live routes: USDC on `base` (recommended), USDC/USDT on `bsc`.
493
+
494
+
### x402 info
495
+
496
+
```bash
497
+
twak x402 info
498
+
```
499
+
500
+
Prints inline help for the x402 subcommands.
501
+
502
+
### Server side
503
+
504
+
To gate your own REST endpoints behind x402, see `twak serve --x402` below.
505
+
506
+
---
507
+
410
508
## serve
411
509
412
510
Start an MCP server (stdio) or REST API server for AI agent integrations.
0 commit comments