> For the complete documentation index, see [llms.txt](https://docs.doma.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.doma.xyz/agentic-commerce/skills/secondary-sales.md).

# Secondary Sales

The `secondary-sales` skill lets an AI agent buy listed domains on Doma's marketplace, accept offers, create listings or offers, and cancel orders. All flows are powered by [Seaport](https://github.com/ProjectOpenSea/seaport) NFT primitives.

## At a glance

|                 |                                                                                    |
| --------------- | ---------------------------------------------------------------------------------- |
| Manifest URL    | `https://doma.xyz/.well-known/skills/secondary-sales/SKILL.md`                     |
| Backing CLI     | `@doma-protocol/cli` (`doma marketplace …`)                                        |
| Wallet modes    | `agent` (Privy) and `private-key`                                                  |
| Trigger phrases | `buy domain`, `purchase domain`, `secondary sale`, `make offer`, `Doma`, `Seaport` |

## What it does

The skill encodes a complete buy / sell workflow:

1. Asks the user which network (mainnet / testnet).
2. Verifies prerequisites (CLI installed, wallet configured, sufficient funds + gas).
3. Fetches the active listing for the requested domain.
4. Surfaces price, currency, and expiry to the user for explicit confirmation.
5. Executes via `doma marketplace buy` (or `accept`, `cancel`, `offer`, `listing`).
6. Verifies ownership transfer and reports back.

## Prerequisites

* Node.js ≥ 20
* `@doma-protocol/cli` installed (`npm install -g @doma-protocol/cli`)
* A configured wallet (see [Wallet Modes](/agentic-commerce/doma-cli/wallet-modes.md))
* Sufficient balance in the listing's currency, plus gas

## Wallet mode notes

|                                          | `agent` | `private-key` |
| ---------------------------------------- | ------- | ------------- |
| `marketplace buy`                        | ✅       | ✅             |
| `marketplace accept`                     | ✅       | ✅             |
| `marketplace cancel --type on-chain`     | ✅       | ✅             |
| `marketplace offer` (gasless)            | ❌ today | ✅             |
| `marketplace listing` (gasless)          | ❌ today | ✅             |
| `marketplace cancel` (default off-chain) | ❌ today | ✅             |

The gasless paths use `eth_signTypedData_v4` and don't yet work in agent mode. See [Agentic Wallet → Known limitation](/agentic-commerce/agentic-wallet.md#known-limitation).

## Example prompt

After installing the skill (see [Discover & Use Skills](/agentic-commerce/agentroot/discover-and-use.md#install-a-skill)):

> "Buy `<your-domain>.fyi` on Doma using the listing currency."

The agent walks through:

1. Network selection.
2. Listing fetch (`doma marketplace get <your-domain>.fyi --format json`).
3. Confirmation: "List price is `5.00 USDTEST` (Doma testnet stablecoin), expires `<date>`. Buy now?"
4. Execution (`doma marketplace buy <your-domain>.fyi --yes --format json`).
5. Ownership verification (`doma domain <your-domain>.fyi`).

## Supported scenarios

| Scenario                            | Subcommand                           | Agent mode |
| ----------------------------------- | ------------------------------------ | ---------- |
| Fill an active listing              | `marketplace buy`                    | ✅          |
| Accept an offer made on your domain | `marketplace accept`                 | ✅          |
| Cancel a listing on-chain           | `marketplace cancel --type on-chain` | ✅          |
| Create a listing (gasless)          | `marketplace listing`                | ❌ today    |
| Make an offer on a domain (gasless) | `marketplace offer`                  | ❌ today    |
| Cancel a listing or offer off-chain | `marketplace cancel`                 | ❌ today    |

## Cross-references

* [Doma Marketplace](/doma-marketplace.md): protocol-level fees, currencies, and Seaport integration details.
* [Orderbook API](/api-reference/orderbook-api.md): direct REST API the CLI calls under the hood.
* [Commands → marketplace](/agentic-commerce/doma-cli/commands.md#marketplace): full command reference.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.doma.xyz/agentic-commerce/skills/secondary-sales.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
