Skip to main content

Documentation Index

Fetch the complete documentation index at: https://xpectrum.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Xmarket handles all resale activity on Xpectrum. It works with any XNS-1 compliant contract, so both XNS1 and Xcollection deployments are tradeable out of the box.

Listings

A seller creates a fixed-price listing via list(contract, token_id, price). Before listing, the seller must approve Xmarket as an operator on the token. A buyer purchases via buy(listing_id). Payment splits automatically at settlement:
RecipientShare
Platform2.5%
Creator (royalty)As set by the collection (max 10%)
SellerRemainder
If a listed token changes hands after listing, the stale listing auto-cancels on the next interaction with it.

Individual offers

A buyer submits an offer via make_offer(contract, token_id, expiry) with OCT attached. The OCT is locked in Xmarket for the offer duration. The token owner accepts via accept_offer(offer_id) or the buyer cancels via cancel_offer(offer_id) to reclaim their OCT. Offer amounts are publicly visible on-chain.

Collection offers

A collection offer targets any token in a collection, not a specific one. Submit via make_collection_offer(contract, expiry) with OCT attached. Collection offers use token_id = -1 internally. When a seller accepts via accept_collection_offer(offer_id, token_id), they specify which token fills the offer. Xmarket verifies ownership and marketplace approval at settlement time.
Collection offers are useful when you want to acquire any piece from a collection at a fixed price, without waiting for a specific token to be listed.

Pull-based proceeds

All proceeds are pull-based. Sellers, creators, and the platform collect via claim_proceeds(). This avoids the AML atomicity rule: if a call() fails, any prior transfer() in the same function reverts. With pull-based proceeds, your funds are never at risk from a failed downstream call.

Token lookup

Xmarket maintains a contract_token_to_listing index so the frontend can resolve active listings by NFT contract and token ID in a single view call via get_token_listing(contract, token_id).