OpenSea Marketplace Agent for n8n: Complete Automation Guide
Integrating the OpenSea API with n8n through the OpenSea Marketplace Agent Tool allows you to automate NFT marketplace intelligence, trading signals, and data pipelines. This reference-style guide explains the workflow architecture, the exact OpenSea endpoints used, node configuration details, and key constraints so you can deploy a reliable, production-ready n8n automation.
1. Conceptual Overview
The OpenSea Marketplace Agent for n8n is a workflow that combines an AI-driven agent, persistent memory, and a set of HTTP Request tools mapped to OpenSea v2 API endpoints. The agent interprets natural language queries, selects the correct endpoint, and coordinates multi-step marketplace operations.
1.1 Primary Capabilities
- Monitor collection-level listings and offers in near real time
- Identify the best (lowest-priced) listings and best (highest) offers for specific NFTs
- Trigger automated alerts, dashboards, and trading strategies based on OpenSea data
- Maintain conversational or workflow context across multiple steps using agent memory
1.2 Typical Users and Scenarios
- Traders and quants building automated buy/sell signals
- Analysts aggregating collection and trait-level metrics
- Developers integrating OpenSea market data into dApps or internal tools
2. Workflow Architecture
The workflow is structured around a central agent that orchestrates requests to several dedicated HTTP tools. A high-level architecture looks like this:
- Trigger Node Entry point for the workflow. Common triggers:
- Webhook trigger for external HTTP calls
- Execute Workflow trigger for internal n8n calls
- Marketplace Agent Brain An AI/agent node that:
- Parses user intent from natural language or structured input
- Selects the appropriate OpenSea HTTP Request tool
- Maps user-friendly parameters to strict API parameters
- Marketplace Agent Memory A memory node or set of nodes that:
- Persist session context across multiple turns
- Store recent queries, collection slugs, and token identifiers
- Allow multi-step flows without repeating all parameters
- HTTP Request Tools Individual HTTP Request nodes, one per OpenSea endpoint, for:
- Collection listings and offers
- Best listing / best offer for a specific NFT
- Best listings across a collection
- Collection-wide offers
- Order queries by chain and protocol
- Order retrieval by hash
- Trait-specific offers
Each HTTP Request node is configured with OpenSea credentials, the correct HTTP method, and path parameters. The agent brain routes requests to these nodes and aggregates responses as needed.
3. OpenSea API Endpoints Covered
The template exposes a curated set of OpenSea v2 endpoints that cover the most common marketplace operations. All endpoints are called via HTTP GET and expect correctly formatted path and query parameters.
3.1 Collection Listings – All
- Endpoint:
/api/v2/listings/collection/{collection_slug}/all - Purpose: Return all active listings for a specific collection.
- Example use cases:
- Collection heatmaps and floor tracking
- Monitoring listing volume or seller behavior
3.2 Collection Offers – All
- Endpoint:
/api/v2/offers/collection/{collection_slug}/all - Purpose: Aggregate all active offers for a collection.
- Example use cases:
- Measuring demand and liquidity for a collection
- Informing bidding or accumulation strategies
3.3 Best Listing by NFT
- Endpoint:
/api/v2/listings/collection/{collection_slug}/nfts/{identifier}/best - Purpose: Retrieve the cheapest active listing for a specific token.
- Example use cases:
- Spotting immediate purchase opportunities
- Monitoring floor price for individual holdings
3.4 Best Listings by Collection
- Endpoint:
/api/v2/listings/collection/{collection_slug}/best - Purpose: Return the lowest-priced listings across a collection.
- Example use cases:
- Identifying underpriced NFTs in a collection
- Building bargain finder dashboards
3.5 Best Offer by NFT
- Endpoint:
/api/v2/offers/collection/{collection_slug}/nfts/{identifier}/best - Purpose: Retrieve the highest active offer for a specific token.
- Example use cases:
- Evaluating current demand for a token
- Comparing offers to listing prices for arbitrage
3.6 Collection Offers (Non “all” Variant)
- Endpoint:
/api/v2/offers/collection/{collection_slug} - Purpose: Fetch collection-wide offers that may have different filtering or aggregation semantics compared to the
/allvariant. - Example use cases:
- Detecting large collection-wide offers or buyout thresholds
- Measuring broad market interest in a collection
3.7 Item Offers & Listings by Chain and Protocol
- Endpoints:
/api/v2/orders/{chain}/{protocol}/offers/api/v2/orders/{chain}/{protocol}/listings
- Requirement:
{protocol}must beseaport. - Purpose: Retrieve chain-specific orders and listings with advanced filtering options.
- Typical query parameters (configured in the n8n HTTP Request node as needed):
maker(wallet address)payment_tokenlisted_aftertoken_ids- Other OpenSea-supported filters
- Example use cases:
- Chain-specific analytics (for example Ethereum vs matic)
- Filtering by maker or payment token for strategy-specific views
3.8 Get Order by Hash
- Endpoint:
/api/v2/orders/chain/{chain}/protocol/0x0000000000000068f116a894984e2db1123eb395/{order_hash} - Protocol address: Fixed to
0x0000000000000068f116a894984e2db1123eb395for this endpoint. - Purpose: Retrieve full details for a single order using its hash.
- Example use cases:
- Validating order parameters before execution
- Tracking the status of a specific order over time
3.9 Trait Offers
- Endpoint:
/api/v2/offers/collection/{collection_slug}/traits - Purpose: Query offers scoped to specific traits within a collection.
- Example use cases:
- Valuing rare attributes such as
Background: Blue - Building trait-level rarity and premium analysis
- Valuing rare attributes such as
4. n8n Node-by-Node Breakdown
4.1 Trigger Node
- Type: For example Execute Workflow or Webhook.
- Role: Accepts input payloads or user messages and forwards them to the agent brain.
- Configuration notes:
- Ensure input fields (for example
collection_slug,identifier,chain) are mapped consistently. - For webhook usage, validate and sanitize incoming parameters before passing to the agent.
- Ensure input fields (for example
4.2 Marketplace Agent Brain Node
- Type: Agent / AI node (for example OpenAI or similar, depending on your n8n setup).
- Inputs:
- Natural language query, for example
Find best listing for doodles #1234 - Optional structured parameters from previous nodes or memory
- Natural language query, for example
- Outputs:
- Routing decision to the correct HTTP Request tool
- Normalized parameters (for example mapping
doodlestocollection_slug,#1234toidentifier=1234)
- Behavior:
- Uses agent memory to fill missing parameters when possible.
- Handles multi-step conversations, for example “Now show me the best offer for the same token”.
4.3 Marketplace Agent Memory Node
- Type: Memory or data store node supported by your agent framework.
- Purpose:
- Persist conversation state, such as last used collection slug or token id.
- Avoid redundant OpenSea calls for repeated queries within a short time window.
4.4 HTTP Request Nodes (OpenSea Tools)
Each OpenSea endpoint is typically implemented as a dedicated HTTP Request node:
- Method:
GET - Base URL:
https://api.opensea.io - Path: One of the endpoints described in section 3
- Authentication: HTTP Header Auth using n8n credentials
Example mappings from natural language to HTTP nodes:
GET https://api.opensea.io/api/v2/listings/collection/boredapeyachtclub/all
GET https://api.opensea.io/api/v2/offers/collection/azuki/all
GET https://api.opensea.io/api/v2/listings/collection/doodles/nfts/1234/best
GET https://api.opensea.io/api/v2/orders/chain/ethereum/protocol/0x0000000000000068f116a894984e2db1123eb395/0x123abc...
In the workflow, the agent brain takes an input like Find best listing for doodles #1234, resolves it to:
collection_slug = doodlesidentifier = 1234
and then forwards these values to the /listings/collection/{collection_slug}/nfts/{identifier}/best HTTP Request node as path parameters.
5. Configuration Rules and Constraints
OpenSea endpoints are strict about parameter formats. To avoid errors, follow these rules when configuring your nodes or mapping parameters in the agent:
5.1 Chain Names
- Use the exact chain identifiers expected by OpenSea.
- Example: use
matic, notpolygon. - Ensure consistent casing as per OpenSea documentation.
5.2 Protocol Parameter
- For
/api/v2/orders/{chain}/{protocol}/offersand/listings, protocol must beseaport. - Do not substitute other protocol names in these endpoints within this template.
5.3 Protocol Address for Order-by-Hash
- The
protocolsegment in/api/v2/orders/chain/{chain}/protocol/0x0000000000000068f116a894984e2db1123eb395/{order_hash}is a fixed address. - Always use
0x0000000000000068f116a894984e2db1123eb395as provided.
5.4 Collection Slugs and Token Identifiers
{collection_slug}must match the exact slug used by OpenSea.{identifier}should be the token ID as recognized by the collection.- Typos or mismatches will typically result in
404 Not Found.
6. Error Handling and Troubleshooting
6.1 Common HTTP Status Codes
- 200 – Request succeeded and data is returned.
- 400 – Bad Request, usually due to invalid input or missing required parameters.
- 404 – Not Found, often caused by:
- Incorrect collection slug
- Invalid address or token ID
- Nonexistent resource
- 500 – Internal Server Error on OpenSea’s side, often transient.
6.2 Practical Troubleshooting Steps
- Validate that
collection_slugandidentifierare spelled correctly and exist on OpenSea. - Confirm that the chain parameter is one of the allowed values, for example
ethereum,matic, etc. - Ensure
protocol = seaportis used for the order and listing endpoints where required. - For intermittent 5xx responses:
- Implement retry logic in n8n using a separate workflow or error branch.
- Prefer exponential backoff rather than immediate retries.
7. Security and Performance Best Practices
7.1 Credentials and API Keys
- Store OpenSea API keys using n8n HTTP Header Auth credentials.
- Attach credentials in the HTTP Request nodes rather than hardcoding headers.
- Avoid logging or storing API keys in plain text within workflow executions.
