← Protocols
X2Y2
NFT / Marketplace·Ethereum

X2Y2

01Description

Decentralized NFT marketplace on Ethereum with an off-chain orderbook + on-chain settlement. Provides `@x2y2-io/x2y2-sdk` for order creation/fulfillment and a partner REST API for collections, listings, offers, and events.

02Best for
  • 01Ethereum NFT marketplace integrations
  • 02creating/fulfilling X2Y2 orders
  • 03collection + listing reads
  • 04marketplace aggregators
03Install
  • pnpm add @x2y2-io/x2y2-sdk ethers
04Environment variables
VariableScopeDescription
X2Y2_API_KEYServerX2Y2 API key (issued via partner program). Server-only — required for both reads and order POSTs.
05Prompt snippet
Use `@x2y2-io/x2y2-sdk`: `const x2y2 = new X2Y2(X2Y2_API_KEY, network, signer)`, then `x2y2.list({ tokenAddress, tokenId, price, expirationTime })` to create a listing (the SDK signs the order and POSTs it to X2Y2's orderbook). Buy with `x2y2.buy({ orderId })` which fetches the latest order JSON and submits an on-chain `run` call to the X2Y2 marketplace contract (`0x74312363e45DCaBA76c59ec49a7Aa8A65a67EeD3`). REST endpoints live at `https://api.x2y2.org/v1/`: `GET /events`, `GET /offers`, `GET /orders`, all authenticated with header `X-API-Key`. Off-chain orders are EIP-712 signed; on-chain settlement is performed by the X2Y2 relayer.
06Gotchas
  • X2Y2 requires an API key for every API call (both read and write) — there is no anonymous tier; integrations must apply via the partner form.
  • Royalty enforcement is per-collection: X2Y2 lets users opt out of royalties on listings, so creator earnings are best-effort rather than guaranteed; pull the resolved royalty from the order object rather than trusting EIP-2981.
  • Marketplace protocol fee is currently 0.5% on sales — confirm via the SDK or `/v1/fees` endpoint before displaying "final price to seller" UI.
  • Chain coverage is Ethereum mainnet only; X2Y2 does not support L2s as of 2026.
  • On-chain settlement uses an X2Y2 relayer which packs orders — you cannot fulfill an X2Y2 order directly from a generic Seaport-style adapter; use the SDK's `buy`/`acceptOffer` or the marketplace contract's `run(input)` method.
  • Order signatures expire (`expirationTime`); always re-fetch the latest order JSON before sending the buy tx, otherwise the `run` call reverts with `INVALID_ORDER`.
07Alternatives