NFT marketplace on Avalanche, built by the Trader Joe team. Off-chain orderbook with on-chain settlement, EIP-712 signed maker orders, and a public REST API for collections, listings, offers, and activities.
- 01Avalanche NFT marketplace integrations
- 02creating/fulfilling Joepegs orders
- 03collection + listing reads
- 04C-Chain NFT trading flows
- # No published npm SDK; integrate via the public REST API + Joepegs marketplace contract using viem/ethers.
- pnpm add viem
| Variable | Scope | Description |
|---|---|---|
| JOEPEGS_API_KEY | Server | Joepegs API key (request via the partner program). Server-only — required for higher rate limits and POST endpoints. |
| NEXT_PUBLIC_AVALANCHE_RPC_URL | Client | Avalanche C-Chain RPC endpoint used to send Joepegs settlement transactions. |
Use the Joepegs public REST API at `https://api.joepegs.dev/v3/` with header `x-joepegs-api-key: JOEPEGS_API_KEY`. Read endpoints: `GET /collections/{address}`, `GET /collections/{address}/items`, `GET /orders?type=listing&collection=…`, `GET /activities`. To list, build an EIP-712 maker order matching the Joepegs marketplace schema (`MakerOrder` with `isOrderAsk`, `signer`, `collection`, `tokenId`, `price`, `currency`, `strategy`, `nonce`, `startTime`, `endTime`, `params`), sign with the user's wallet, and `POST /orders`. To fulfill, fetch a maker order then call `JoepegsExchange.matchAskWithTakerBidUsingAVAXAndWAVAX(takerBid, makerAsk)` (or the ERC20 variant) on Avalanche C-Chain. Royalty fees are pulled from the registry the marketplace queries at settlement time.
- ⚑Joepegs is Avalanche-only (mainly C-Chain); using Avalanche subnet RPCs or other chains will fail. Confirm `chainId === 43114` before signing maker orders.
- ⚑Royalty enforcement: Joepegs honors creator royalties via its own `RoyaltyFeeRegistry` (similar architecture to LooksRare) — collections without registry entries pay 0%, so creator revenue is not guaranteed by EIP-2981 alone.
- ⚑Marketplace protocol fee is currently 2% (subject to change) — pull live fees from `/v3/fees` or read the marketplace contract before showing seller proceeds.
- ⚑API key is required for >1 req/s reads and for all order POSTs; unkeyed traffic is throttled.
- ⚑Maker order `nonce` must be unique per signer — reusing a nonce silently invalidates the prior order; track issued nonces server-side.
- ⚑WAVAX vs native AVAX: bid orders are denominated in WAVAX; takers can pay with AVAX via the `…UsingAVAXAndWAVAX` method, but raw `matchAskWithTakerBid` requires the taker to have already wrapped to WAVAX.