Skip to content

Commit 302b0ba

Browse files
feat: Add twak onramp to cli reference (#424)
* feat: Add twak onramp to cli reference * feat: Add note about sorting * chore: copilot comments
1 parent d9b0d27 commit 302b0ba

1 file changed

Lines changed: 97 additions & 0 deletions

File tree

agent-sdk/cli-reference.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,103 @@ Use `--quote-only` to preview without executing.
152152

153153
---
154154

155+
## onramp
156+
157+
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.
158+
159+
### onramp quote
160+
161+
Get fiat-to-crypto quotes from multiple providers.
162+
163+
```bash
164+
twak onramp quote --amount <fiat> --asset <id> [--currency <code>] \
165+
[--wallet <address>] [--password <pw>] [--json]
166+
```
167+
168+
| Flag | Description |
169+
|------|-------------|
170+
| `--amount` | Fiat amount, e.g. `100` |
171+
| `--asset` | Asset ID, e.g. `c60` for ETH |
172+
| `--currency` | Fiat currency (default: `USD`) |
173+
| `--wallet` | Override the destination address (defaults to your stored wallet's address on the asset's chain) |
174+
175+
Quotes are sorted lowest-spread-first; the top row is the provider giving the most crypto for the same fiat input.
176+
177+
### onramp buy
178+
179+
Open the provider checkout URL for a chosen quote.
180+
181+
```bash
182+
twak onramp buy --quote-id <id> [--asset <id>] [--wallet <address>] \
183+
[--password <pw>] [--json]
184+
```
185+
186+
| Flag | Description |
187+
|------|-------------|
188+
| `--quote-id` | Quote ID from `twak onramp quote` |
189+
| `--asset` | Crypto asset ID — required when `--wallet` is omitted (used to derive your destination address) |
190+
| `--wallet` | Override the destination address |
191+
192+
### onramp sell-quote
193+
194+
Get crypto-to-fiat quotes.
195+
196+
```bash
197+
twak onramp sell-quote --amount <crypto> --asset <id> [--currency <code>] \
198+
[--method <method>] [--wallet <address>] \
199+
[--password <pw>] [--json]
200+
```
201+
202+
| Flag | Description |
203+
|------|-------------|
204+
| `--amount` | Crypto amount to sell, e.g. `0.1` |
205+
| `--asset` | Asset ID being sold |
206+
| `--currency` | Fiat currency for the payout (default: `USD`) |
207+
| `--method` | Payout method: `ANY`, `card`, `bank_transfer` (default: `ANY`) |
208+
| `--wallet` | Override the source address (defaults to your stored wallet's address on the asset's chain) |
209+
210+
Sorted lowest-spread-first; the top row is the provider returning the most fiat for the same crypto input.
211+
212+
### onramp sell
213+
214+
Open the provider checkout URL to complete KYC and reveal the deposit address.
215+
216+
```bash
217+
twak onramp sell --quote-id <id> [--asset <id>] [--wallet <address>] \
218+
[--password <pw>] [--json]
219+
```
220+
221+
| Flag | Description |
222+
|------|-------------|
223+
| `--quote-id` | Quote ID from `twak onramp sell-quote` |
224+
| `--asset` | Crypto asset ID — required when `--wallet` is omitted (used to derive your source address) |
225+
| `--wallet` | Override the source address |
226+
227+
### onramp sell-confirm
228+
229+
Broadcast the on-chain payout to the provider's deposit address. Run this **after** completing KYC in the browser and copying the deposit address and exact amount the provider displayed.
230+
231+
```bash
232+
twak onramp sell-confirm --asset <id> --to <deposit-address> --amount <n> \
233+
[--memo <tag>] [--quote-id <id>] \
234+
[--max-usd <n>] [--skip-safety-check] \
235+
[--password <pw>] [--json]
236+
```
237+
238+
| Flag | Description |
239+
|------|-------------|
240+
| `--asset` | Asset being sold |
241+
| `--to` | Provider's deposit address (shown after KYC) |
242+
| `--amount` | Exact amount the provider displays — must match |
243+
| `--memo` | Memo / destination tag (Cosmos, XRP, Stellar, BNB Beacon) — funds can be unrecoverable without it when the chain requires one |
244+
| `--quote-id` | Optional. Recorded in the output for traceability; the on-chain tx is built from `--to` / `--amount`, not from this ID |
245+
| `--max-usd` | USD safety cap (default: 10000) |
246+
| `--skip-safety-check` | Bypass the USD cap |
247+
248+
The deposit address is **not under your control** — verify it byte-for-byte against what the provider displayed before broadcasting. Signing always happens locally; the browser flow has no access to your keys.
249+
250+
---
251+
155252
## price
156253

157254
```bash

0 commit comments

Comments
 (0)