> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaleidoswap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Market And Swaps

> Browse KaleidoSwap markets, request quotes, and run order, atomic, or local node swap flows from the CLI

## Market Data

The `market` group is the read-only entry point for pairs, quotes, routes, and maker metadata.

| Command                        | Purpose                         |
| ------------------------------ | ------------------------------- |
| `kaleido market assets`        | List tradeable assets           |
| `kaleido market pairs`         | List trading pairs              |
| `kaleido market quote <pair>`  | Request a quote                 |
| `kaleido market info`          | Show maker node information     |
| `kaleido market routes <pair>` | List route options              |
| `kaleido market analytics`     | Show maker-side order analytics |

### Quote examples

```bash theme={null}
kaleido market quote BTC/USDT --from-amount 100000
kaleido market quote BTC/USDT --to-amount 500 --from-layer BTC_LN --to-layer RGB_LN
```

Important quote options:

* `--from-amount` or `--to-amount`
* `--from-layer`
* `--to-layer`

Supported layer values include `BTC_LN`, `RGB_LN`, and `BTC_ONCHAIN` for market quotes.

## Swap Scopes

Swaps are split across two command groups:

| Scope         | Use case                                                               |
| ------------- | ---------------------------------------------------------------------- |
| `swap order`  | Create and track maker swap orders through the KaleidoSwap server      |
| `swap atomic` | Run maker-backed atomic swaps using your local node as taker           |
| `node swap`   | Drive low-level local RLN swap steps directly (under the `node` group) |

## Maker Order Flow

Use this flow when you want server-managed swap orders.

### Subcommands

| Command                                | Purpose                           |
| -------------------------------------- | --------------------------------- |
| `kaleido swap order create <pair>`     | Create an order from a live quote |
| `kaleido swap order decide <order-id>` | Submit a pending rate decision    |
| `kaleido swap order status <order-id>` | Check order status                |
| `kaleido swap order history`           | List historical orders            |

### Example

```bash theme={null}
kaleido swap order create BTC/USDT \
  --to-amount 5000000 \
  --receiver-address lnbcrt... \
  --receiver-format BOLT11
```

Useful options:

* `--from-amount` or `--to-amount`
* `--from-layer`
* `--to-layer`
* `--receiver-address`
* `--receiver-format`
* `--min-onchain-conf`
* `--refund-address`
* `--email`

## Atomic Swap Flow

Use `swap atomic` when the maker side is remote but execution uses your local node as taker.

### Subcommands

| Command                                     | Purpose                                         |
| ------------------------------------------- | ----------------------------------------------- |
| `kaleido swap atomic init <pair>`           | Initialize the atomic swap                      |
| `kaleido swap atomic execute`               | Execute the initialized swap                    |
| `kaleido swap atomic status <payment-hash>` | Track atomic swap status                        |
| `kaleido swap atomic run <pair>`            | Run init, whitelist, and execute in one command |

### Example

```bash theme={null}
kaleido swap atomic run BTC/USDT --to-amount 5000000
```

You can also provide:

* `--taker-pubkey`
* `--yes`
* explicit `--from-layer` and `--to-layer`

## Local Node Swap Flow

Use `node swap` for low-level RLN swap steps (these live under the `node` command group):

| Command                                   | Purpose                              |
| ----------------------------------------- | ------------------------------------ |
| `kaleido node swap pubkey`                | Print the taker public key           |
| `kaleido node swap init`                  | Start a local maker-init swap flow   |
| `kaleido node swap whitelist`             | Whitelist the swap on the taker side |
| `kaleido node swap execute`               | Execute after whitelisting           |
| `kaleido node swap status <payment-hash>` | Inspect status                       |
| `kaleido node swap list`                  | List swaps known to the node         |

This path is useful for debugging, demos, and lower-level protocol operations where you want each step exposed separately.

## Recommended Trade Flow

### Market-only

```bash theme={null}
kaleido market pairs
kaleido market quote BTC/USDT --from-amount 100000
kaleido swap order create BTC/USDT --to-amount 5000000 --receiver-address lnbcrt... --receiver-format BOLT11
```

### With a local node

```bash theme={null}
kaleido node unlock
kaleido node swap pubkey
kaleido swap atomic run BTC/USDT --from-amount 100000 --from-layer BTC_LN --to-layer RGB_LN
```

Use [Command Reference](/cli/command-reference) for the complete command map.
