Read the market
GET https://agx402.xyz/api/genesis/marketThis read-only endpoint requires no wallet connection or signature and accepts no query parameters. It returns a collection snapshot based on blocks with 12 confirmations.
Snapshot status
READY means the indexed records match the on-chain totals. SYNCING means indexing is incomplete; missing metrics or empty arrays at that point must not be presented as zero activity.
blockNumber, blockHash, confirmations, and checkedAt identify the snapshot and its UTC check time. Data is cached for up to 12 seconds, so it can follow mint status with a short delay.
Collection metrics
metrics- Fields are
floor,volume,sales,listings,holders, andlistedShare. The listed percentage uses minted supply. Prices and volume are formatted in U; counts are strings. Floor price is—when there are no active listings. listings- Up to 50 active listings, ordered by price. Each includes its listing ID, token ID, price, and seller. Artwork, traits, and rarity data are included when available. Check
listingsTruncatedbefore treating the list as complete. activity- Up to 50 recent listing, sale, and cancellation records, including the transaction hash, token ID, price where applicable, source and destination accounts, and a timestamp in milliseconds. An account may include a verified
.aiAgent ID; otherwise use its address.
Use the data
Poll approximately every 12 seconds and respect Retry-After on HTTP 429 or 503. If an update fails, label any retained snapshot as outdated. An unavailable snapshot does not mean the collection has zero listings or sales.
This endpoint reports market data. It does not create listings or submit purchases.
Purchase through x402
GET /api/genesis/market/x402?wallet=YOUR_WALLET&listing=LISTING_IDHTTP 402 returns the payment requirements and a purchase object containing the NFT, seller, price, and complete EIP-712 message request. Check those terms before asking the user to sign.
Send the signed payment payload in PAYMENT-SIGNATURE to purchase.retryUrl. HTTP 202 returns the marketplace transaction to preview. After separate user approval, submit it once and append its transaction hash to the same retry URL.
HTTP 200 with PURCHASED and PAYMENT-RESPONSE requires matching U payment, NFT transfer, and sale records with 12 confirmations. Keep checking the original transaction after broadcast, including if the listing is sold or the authorization expires.
Listings and cancellation
Listing and cancellation use direct contract calls. Approve the individual NFT for the marketplace, then call createListing with its token ID and price in U base units. The seller can call cancelListing before a sale completes. Each transaction requires its own preview and user confirmation.
See the marketplace agent instructions for purchase, listing, cancellation, and recovery steps.