Sweep buy items from a collection
Changed onBuy up to N items from a collection using any payment token, including cross-chain. If a requested item becomes unavailable, the system can automatically substitute it with the next cheapest listing from the same collection (enabled by default). Returns an ordered list of transactions to execute. Collections on EVM chains only; a collection on any other chain is rejected.
Request
- Base URLhttps://api.opensea.io
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"buyer": "0x...",
"collection_slug": "pudgypenguins",
"max_items": 5,
"max_price_per_item": "10.0",
"payment": {
"chain": "base",
"token_address": "0x0000000000000000000000000000000000000000"
}
}Response
Sweep fulfillment data retrieved successfully
Changes
- breaking
the response property
became nullable for the status - info
the request property
became nullable - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking