opensea

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenSea (NFT Marketplace Data + Seaport Trades)

OpenSea(NFT市场数据 + Seaport交易)

OpenSea is the dominant NFT marketplace. This skill queries marketplace data — listings, offers, sales / events, floor prices, drops, traits — and executes Seaport trades via the official
@opensea/cli
. For NFT metadata (name, image, traits, ownership) outside the marketplace context, use Alchemy's NFT API instead. For pure cross-chain token swaps (no marketplace context), use the
lifi
ecosystem skill.
Primary tool
npx @opensea/cli@latest <command>
(or
npm install -g @opensea/cli
)
REST API base
https://api.opensea.io/api/v2
Auth
OPENSEA_API_KEY
header — instant via
POST /api/v2/auth/keys
, or signup at the developer portal
Optional Privy
PRIVY_APP_ID
/
PRIVY_APP_SECRET
/
PRIVY_WALLET_ID
for write / fulfillment flows
ChainsEthereum, Base, Arbitrum, Optimism, Polygon, and more
OpenSea是主流的NFT交易市场。本技能可查询市场数据——挂单、报价、交易/事件、地板价、发售活动、属性——并通过官方
@opensea/cli
执行Seaport交易。若需获取市场场景外的NFT元数据(名称、图片、属性、所有权),请使用Alchemy的NFT API。对于纯跨链代币兑换(无NFT市场需求),请使用
lifi
生态技能。
核心工具
npx @opensea/cli@latest <command>
(或
npm install -g @opensea/cli
REST API基础地址
https://api.opensea.io/api/v2
身份验证
OPENSEA_API_KEY
请求头——可通过
POST /api/v2/auth/keys
即时获取,或在开发者门户注册获取
可选Privy配置写入/履约流程需
PRIVY_APP_ID
/
PRIVY_APP_SECRET
/
PRIVY_WALLET_ID
支持链Ethereum、Base、Arbitrum、Optimism、Polygon等

When to use this skill

何时使用该技能

Use
opensea
when any of the following are true:
  • The user wants marketplace data — listings, offers, floor prices, sales history, collection stats
  • The user wants to buy / sell an NFT via Seaport (fulfill listing or accept offer)
  • The user wants to search across OpenSea (collections / NFTs / tokens / accounts)
  • The user wants to monitor events — sales, transfers, mints, listings, offers — for a collection or NFT
  • The user wants to explore drops or build a mint transaction for a SeaDrop contract
  • The user wants token discovery in the OpenSea-curated context (top, trending, by group)
当满足以下任一条件时,使用
opensea
技能:
  • 用户需要市场数据——挂单、报价、地板价、交易历史、藏品统计
  • 用户希望通过Seaport买卖NFT(履约挂单或接受报价)
  • 用户希望在OpenSea内搜索(藏品/NFT/代币/账户)
  • 用户希望监控事件——藏品或NFT的交易、转移、铸造、挂单、报价、属性报价、藏品报价
  • 用户希望探索发售活动或为SeaDrop合约构建铸造交易
  • 用户希望在OpenSea curated语境下进行代币发现(热门、趋势、分组)

When NOT to use this skill (handoff)

何时不使用该技能(转接)

NeedUse instead
NFT metadata (name, image, traits, ownership lookup) outside a marketplace context
alchemy-api
(NFT API) — broader coverage, fewer rate limits
Pure cross-chain token swap (no NFT marketplace need)
lifi
(ecosystem skill) — broader bridge / DEX aggregation
Token spot prices for valuation
alchemy-api
(Prices API)
Token metadata, search, list by chain (general)
alchemy-api
(Token API)
Current wallet balances (token + native)
alchemy-api
(Portfolio / Token API)
Transaction history (transfers in / out)
alchemy-api
(Transfers API)
Live blockchain reads (block #, gas,
eth_call
)
alchemy-cli
(live) or
alchemy-api
(JSON-RPC)
Pre-execution simulation
alchemy-api
(Simulation API)
Account abstraction (bundlers, gas managers)
alchemy-api
Smart wallet / embedded wallet flows
alchemy-api
(Wallets / Account Kit)
需求替代方案
市场场景外的NFT元数据读取(名称、图片、属性、所有权查询)
alchemy-api
(NFT API)——覆盖范围更广,速率限制更少
纯跨链代币兑换(无NFT市场需求)
lifi
(生态技能)——聚合更多跨链桥与去中心化交易所
用于估值的代币现货价格
alchemy-api
(Prices API)
通用代币元数据、搜索、按链列出
alchemy-api
(Token API)
当前钱包余额(代币+原生币)
alchemy-api
(Portfolio / Token API)
交易历史(转入/转出)
alchemy-api
(Transfers API)
实时区块链读取(区块号、Gas、
eth_call
alchemy-cli
(实时)或
alchemy-api
(JSON-RPC)
执行前模拟
alchemy-api
(Simulation API)
账户抽象(打包器、Gas管理器)
alchemy-api
智能钱包/嵌入式钱包流程
alchemy-api
(Wallets / Account Kit)

Scope contract

范围约定

This skill covers (
scope_in
):
  • Marketplace data:
    opensea listings best
    ,
    opensea listings best-for-nft
    ,
    opensea offers best-for-nft
    ,
    opensea offers all
    ,
    opensea collections stats
    ,
    opensea collections trending
    ,
    opensea collections top
    ,
    opensea collections traits
  • Seaport trades: fulfillment data for buying (
    opensea-fulfill-listing.sh
    ) and selling (
    opensea-fulfill-offer.sh
    ); creating listings / offers via
    opensea-post.sh
    with the Seaport order structure
  • Events / monitoring:
    opensea events list
    ,
    events by-collection
    ,
    events by-nft
    ,
    events by-account
    — sale / transfer / mint / listing / offer / trait_offer / collection_offer
  • Drops + minting:
    opensea drops list
    ,
    opensea drops get
    ,
    opensea drops mint
  • Search:
    opensea search
    across collections / NFTs / tokens / accounts
  • Account utilities:
    opensea accounts resolve
    (ENS / username / address)
This skill does NOT cover (
scope_out
):
  • General NFT metadata reads (name, image, traits, ownership, contract metadata) outside the marketplace context → handoff:
    alchemy-api
    (NFT API). OpenSea's NFT data is marketplace-flavored and rate-limited; Alchemy's NFT API is broader and cheaper for pure metadata.
  • Pure cross-chain token swaps (no NFT marketplace use case) → handoff:
    lifi
    (ecosystem skill). OpenSea's swap aggregator works, but
    lifi
    covers more bridges and chains.
  • Token spot prices for valuation / display → handoff:
    alchemy-api
    (Prices API)
  • General token metadata, search, list → handoff:
    alchemy-api
    (Token API)
  • Wallet balances (token + native) → handoff:
    alchemy-api
    (Portfolio / Token API)
  • Transaction transfer history → handoff:
    alchemy-api
    (Transfers API)
  • Live RPC reads → handoff:
    alchemy-cli
    or
    alchemy-api
    (JSON-RPC)
  • Pre-execution simulation → handoff:
    alchemy-api
    (Simulation API)
  • Account abstraction → handoff:
    alchemy-api
    (Wallets / Bundler / Gas Manager)
  • Embedded / smart wallet onboarding → handoff:
    alchemy-api
    (Account Kit)
  • Signed tx submission → user wallet (or Privy if configured for OpenSea write flows)
本技能覆盖范围(
scope_in
):
  • 市场数据
    opensea listings best
    opensea listings best-for-nft
    opensea offers best-for-nft
    opensea offers all
    opensea collections stats
    opensea collections trending
    opensea collections top
    opensea collections traits
  • Seaport交易:购买(
    opensea-fulfill-listing.sh
    )和出售(
    opensea-fulfill-offer.sh
    )的履约数据;通过
    opensea-post.sh
    结合Seaport订单结构创建挂单/报价
  • 事件/监控
    opensea events list
    events by-collection
    events by-nft
    events by-account
    ——交易/转移/铸造/挂单/报价/属性报价/藏品报价
  • 发售活动+铸造
    opensea drops list
    opensea drops get
    opensea drops mint
  • 搜索
    opensea search
    跨藏品/NFT/代币/账户搜索
  • 账户工具
    opensea accounts resolve
    (ENS/用户名/地址解析)
本技能不覆盖范围(
scope_out
):
  • 市场场景外的通用NFT元数据读取(名称、图片、属性、所有权、合约元数据)→ 转接:
    alchemy-api
    (NFT API)。OpenSea的NFT数据带有市场属性且速率限制严格;Alchemy的NFT API覆盖范围更广,纯元数据读取成本更低。
  • 纯跨链代币兑换(无NFT市场场景)→ 转接:
    lifi
    (生态技能)。OpenSea的兑换聚合器可用,但
    lifi
    覆盖更多跨链桥和链。
  • 用于估值/展示的代币现货价格→转接:
    alchemy-api
    (Prices API)
  • 通用代币元数据、搜索、列出→转接:
    alchemy-api
    (Token API)
  • 钱包余额(代币+原生币)→转接:
    alchemy-api
    (Portfolio / Token API)
  • 交易转移历史→转接:
    alchemy-api
    (Transfers API)
  • 实时RPC读取→转接:
    alchemy-cli
    alchemy-api
    (JSON-RPC)
  • 执行前模拟→转接:
    alchemy-api
    (Simulation API)
  • 账户抽象→转接:
    alchemy-api
    (Wallets / Bundler / Gas Manager)
  • 嵌入式/智能钱包注册→转接:
    alchemy-api
    (Account Kit)
  • 签名交易提交→用户钱包(或配置Privy用于OpenSea写入流程)

Setup

配置步骤

API key is required. Get one instantly via the auth endpoint (no signup) or register at the developer portal for higher limits:
bash
undefined
必须使用API密钥。可通过认证端点即时获取(无需注册),或在开发者门户注册以获取更高限额:
bash
undefined

Instant key (no signup needed)

即时获取密钥(无需注册)

export OPENSEA_API_KEY=$(curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key')
export OPENSEA_API_KEY=$(curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key')

Or set an existing key

或设置已有密钥

export OPENSEA_API_KEY="..."

export OPENSEA_API_KEY="..."


Install the CLI globally (optional — `npx @opensea/cli` works without install):

```bash
npm install -g @opensea/cli
For write / fulfillment flows that sign with Privy:
bash
export PRIVY_APP_ID="..."
export PRIVY_APP_SECRET="..."
export PRIVY_WALLET_ID="..."
Security: never expose
OPENSEA_API_KEY
or Privy credentials in client-side code. Server-side only.

全局安装CLI(可选——无需安装即可使用`npx @opensea/cli`):

```bash
npm install -g @opensea/cli
对于使用Privy签名的写入/履约流程:
bash
export PRIVY_APP_ID="..."
export PRIVY_APP_SECRET="..."
export PRIVY_WALLET_ID="..."
安全提示: 切勿在客户端代码中暴露
OPENSEA_API_KEY
或Privy凭证,仅在服务端使用。

Endpoint reference → references/marketplace.md

端点参考 → references/marketplace.md

Marketplace queries (most-used)

常用市场查询

TaskCLI
Best listings for a collection
opensea listings best <slug> [--limit <n>]
Best listing for a specific NFT
opensea listings best-for-nft <slug> <token_id>
Best offer for an NFT
opensea offers best-for-nft <slug> <token_id>
All listings on a collection
opensea listings all <slug> [--limit <n>]
All offers on a collection
opensea offers all <slug> [--limit <n>]
Trait offers
opensea offers traits <slug> --type <type> --value <value>
Collection stats (floor, volume)
opensea collections stats <slug>
Trending collections
opensea collections trending [--timeframe <tf>] [--chains <chains>]
Top collections by sort
opensea collections top [--sort-by <field>] [--chains <chains>]
Collection traits
opensea collections traits <slug>
任务CLI命令
藏品最优挂单
opensea listings best <slug> [--limit <n>]
特定NFT的最优挂单
opensea listings best-for-nft <slug> <token_id>
NFT的最优报价
opensea offers best-for-nft <slug> <token_id>
藏品所有挂单
opensea listings all <slug> [--limit <n>]
藏品所有报价
opensea offers all <slug> [--limit <n>]
属性报价
opensea offers traits <slug> --type <type> --value <value>
藏品统计数据(地板价、交易量)
opensea collections stats <slug>
趋势藏品
opensea collections trending [--timeframe <tf>] [--chains <chains>]
排序后的顶级藏品
opensea collections top [--sort-by <field>] [--chains <chains>]
藏品属性
opensea collections traits <slug>

Seaport trade execution

Seaport交易执行

TaskScript
Get fulfillment data to buy an NFT
opensea-fulfill-listing.sh <chain> <order_hash> <buyer>
Get fulfillment data to sell (accept offer)
opensea-fulfill-offer.sh <chain> <order_hash> <seller> <contract> <token_id>
Generic POST to OpenSea API
opensea-post.sh <path> <json_body>
任务脚本
获取购买NFT的履约数据
opensea-fulfill-listing.sh <chain> <order_hash> <buyer>
获取出售(接受报价)的履约数据
opensea-fulfill-offer.sh <chain> <order_hash> <seller> <contract> <token_id>
向OpenSea API发送通用POST请求
opensea-post.sh <path> <json_body>

Events / monitoring

事件/监控

TaskCLI
Recent events (filterable by type)
opensea events list [--event-type <type>]
Events for a collection
opensea events by-collection <slug> [--event-type <type>]
Events for a specific NFT
opensea events by-nft <chain> <contract> <token_id>
Events for an account
opensea events by-account <address>
Event types:
sale
,
transfer
,
mint
,
listing
,
offer
,
trait_offer
,
collection_offer
.
For real-time event streaming:
opensea-stream-collection.sh <slug>
(requires
websocat
).
任务CLI命令
近期事件(可按类型过滤)
opensea events list [--event-type <type>]
藏品相关事件
opensea events by-collection <slug> [--event-type <type>]
特定NFT相关事件
opensea events by-nft <chain> <contract> <token_id>
账户相关事件
opensea events by-account <address>
事件类型:
sale
transfer
mint
listing
offer
trait_offer
collection_offer
实时事件流:
opensea-stream-collection.sh <slug>
(需安装
websocat
)。

Drops + minting

发售活动+铸造

TaskCLI
List drops (featured / upcoming / recent)
opensea drops list [--type <type>]
Drop details + stages
opensea drops get <slug>
Build mint tx
opensea drops mint <slug> --minter <address> [--quantity <n>]
任务CLI命令
列出发售活动(精选/即将到来/近期)
opensea drops list [--type <type>]
发售活动详情+阶段
opensea drops get <slug>
构建铸造交易
opensea drops mint <slug> --minter <address> [--quantity <n>]

Search

搜索

TaskCLI
Search collections
opensea search <query> --types collection
Search NFTs
opensea search <query> --types nft
Search tokens
opensea search <query> --types token
Search accounts
opensea search <query> --types account
Multi-type search
opensea search <query> --types collection,nft,token
任务CLI命令
搜索藏品
opensea search <query> --types collection
搜索NFT
opensea search <query> --types nft
搜索代币
opensea search <query> --types token
搜索账户
opensea search <query> --types account
多类型搜索
opensea search <query> --types collection,nft,token

Quick examples

快速示例

Get the floor + 24h volume for Bored Apes

获取无聊猿的地板价+24小时交易量

bash
opensea collections stats boredapeyachtclub
bash
opensea collections stats boredapeyachtclub

Find the cheapest listing for a collection

查找藏品的最低挂单

bash
opensea listings best boredapeyachtclub --limit 1
bash
opensea listings best boredapeyachtclub --limit 1

Buy an NFT (fulfill a listing)

购买NFT(履约挂单)

bash
undefined
bash
undefined

1. Get the best listing for a specific NFT

1. 获取特定NFT的最优挂单

opensea listings best-for-nft boredapeyachtclub 1234
opensea listings best-for-nft boredapeyachtclub 1234

2. Get fulfillment data — order_hash from above response

2. 获取履约数据——order_hash来自上述响应

./scripts/opensea-fulfill-listing.sh ethereum 0xORDER_HASH 0xYOUR_WALLET
./scripts/opensea-fulfill-listing.sh ethereum 0xORDER_HASH 0xYOUR_WALLET

3. Sign + submit the returned tx data via your wallet

3. 通过钱包签名并提交返回的交易数据

undefined
undefined

Stream sales for a collection in real time

实时流式获取藏品交易事件

bash
./scripts/opensea-stream-collection.sh boredapeyachtclub
bash
./scripts/opensea-stream-collection.sh boredapeyachtclub

Filters to sale events; pipe through jq to format

过滤交易事件;可通过jq格式化输出

undefined
undefined

Search across types

跨类型搜索

bash
opensea search "cool cats" --types collection,nft --chains ethereum,base
bash
opensea search "cool cats" --types collection,nft --chains ethereum,base

Common gotchas

常见注意事项

  • API key is mandatory — even the "instant" tier requires one. The bare REST API will 401 without
    X-API-KEY
    .
  • OpenSea's NFT data overlaps with Alchemy's NFT API for metadata reads. Prefer Alchemy for general NFT metadata (name, image, traits, ownership across many wallets) — OpenSea is rate-limited harder and adds marketplace flavoring you may not want. Use OpenSea when the marketplace context (listings, offers, sales history, drops) is the actual need.
  • Token swap aggregator exists in the OpenSea API (
    opensea swaps quote
    ), but for pure swap flows without marketplace context,
    lifi
    aggregates more bridges + DEXs and is the better default. Use OpenSea swaps when the user is already in an NFT-buying flow that involves a token swap.
  • Privy is optional but required for end-to-end write flows. The skill returns fulfillment calldata; how it gets signed is up to the app (user wallet, Privy, or any other signer).
  • Order hashes from
    listings best-for-nft
    /
    offers best-for-nft
    are needed for fulfillment. Don't lose them between API calls.
  • Event streaming requires
    websocat
    ; if not installed, fall back to polling
    events by-collection
    with the same filters.
  • Slug vs. address: collections are addressed by slug (e.g.,
    boredapeyachtclub
    ), NFTs by
    (chain, contract, tokenId)
    . Don't mix.
  • 必须使用API密钥——即使是"即时" tier也需要。不带
    X-API-KEY
    的REST API请求会返回401错误。
  • OpenSea的NFT数据与Alchemy的NFT API存在重叠。通用NFT元数据读取(名称、图片、属性、多钱包所有权)优先使用Alchemy——OpenSea的速率限制更严格,且会添加不必要的市场属性。仅当确实需要市场语境(挂单、报价、交易历史、发售活动)时使用OpenSea。
  • OpenSea API包含代币兑换聚合器
    opensea swaps quote
    ),但无市场场景的纯兑换流程优先使用
    lifi
    ——它聚合了更多跨链桥和去中心化交易所,是更优选择。仅当用户处于涉及代币兑换的NFT购买流程时使用OpenSea兑换。
  • Privy是可选配置,但端到端写入流程需要它。本技能返回履约调用数据,签名方式由应用决定(用户钱包、Privy或其他签名器)。
  • 履约需要
    listings best-for-nft
    /
    offers best-for-nft
    返回的订单哈希
    。API调用间请勿丢失该哈希。
  • 事件流需要
    websocat
    ;若未安装,可退化为使用相同过滤器轮询
    events by-collection
  • Slug与地址的区别:藏品通过slug(如
    boredapeyachtclub
    )定位,NFT通过
    (chain, contract, tokenId)
    定位,请勿混淆。

Routing back to Alchemy

转接至Alchemy

If during a session the user's need shifts to surfaces this skill doesn't cover:
  • NFT metadata reads (name, image, traits, ownership) —
    alchemy-api
    (NFT API) is the right path. OpenSea's NFT API is marketplace-flavored and rate-limited; Alchemy's is broader and faster.
  • Token prices, balances, transfer history, general token metadata
    alchemy-api
  • Live RPC, gas, simulation, AA, Account Kit
    alchemy-cli
    (live) or
    alchemy-api
    (app code) or
    agentic-gateway
    (no API key)
  • Pure cross-chain token swaps
    lifi
    (ecosystem skill); covers 27 bridges + 31 DEXs across 60+ chains

Maintenance: OpenSea maintains
@opensea/cli
and the underlying API; this skill itself is maintained jointly by Alchemy and OpenSea. File issues against
alchemyplatform/skills
with
[ecosystem/opensea]
in the title.
若会话中用户需求超出本技能覆盖范围:
  • NFT元数据读取(名称、图片、属性、所有权)——
    alchemy-api
    (NFT API)是正确选择。OpenSea的NFT API带有市场属性且速率限制严格;Alchemy的覆盖范围更广、速度更快。
  • 代币价格、余额、转移历史、通用代币元数据——
    alchemy-api
  • 实时RPC、Gas、模拟、账户抽象、Account Kit——
    alchemy-cli
    (实时)或
    alchemy-api
    (应用代码)或
    agentic-gateway
    (无需API密钥)
  • 纯跨链代币兑换——
    lifi
    (生态技能);覆盖60+链上的27个跨链桥+31个去中心化交易所

维护说明: OpenSea维护
@opensea/cli
及底层API;本技能由Alchemy和OpenSea联合维护。请在
alchemyplatform/skills
提交问题,标题中包含
[ecosystem/opensea]