Magic Eden's NFT marketplace API. Solana is the primary supported network in 2026; legacy EVM and Bitcoin Ordinals endpoints exist but are being wound down.
- 01Solana NFT marketplace integrations
- 02collection floor / activity feeds
- 03listing & buy instruction building
- 04compressed NFT (cNFT) listings
- 05Magic Eden Wallet provider auth
- pnpm add @solana/web3.js bs58
- # REST API only — no first-party JS SDK; use fetch / axios
| Variable | Scope | Description |
|---|---|---|
| MAGIC_EDEN_API_KEY | Server | Magic Eden API key (apply via the developer portal). Server-only — needed for elevated rate limits and authorised endpoints. |
Use Magic Eden's REST API. Solana base: `https://api-mainnet.magiceden.dev/v2/`. Send `Authorization: Bearer MAGIC_EDEN_API_KEY` for keyed requests. Useful endpoints: `GET /collections/{symbol}/stats`, `GET /collections/{symbol}/listings`, `GET /collections/{symbol}/activities`, `GET /tokens/{mint_address}`. To list/buy, call the instruction-builder endpoints (`GET /instructions/sell`, `GET /instructions/buy_now`) which return a base64 unsigned transaction — deserialize with `VersionedTransaction.deserialize(Buffer.from(txBase64, 'base64'))`, have the user wallet sign, then submit via the user's RPC. EVM endpoints (legacy) live under `/v3/rtp/{chain}/` and mirror the Reservoir schema.
- ⚑Magic Eden has refocused on Solana; EVM and Bitcoin Ordinals API support is deprecated / wound down — do not start a new EVM-only integration on Magic Eden, prefer OpenSea or Reservoir.
- ⚑Default rate limits are roughly 120 QPM for Solana and 180 QPM for legacy EVM; exceeding them returns 429 with no automatic backoff in any first-party SDK (there isn't one).
- ⚑There is no official JS SDK — you call the REST endpoints directly with `fetch`. Type the responses yourself or use the OpenAPI spec to generate clients.
- ⚑Listing / bid endpoints return *unsigned* transactions; you must deserialize, attach the user signature, and submit through your own RPC — Magic Eden does not broadcast for you.
- ⚑Royalty enforcement on Solana depends on Token-2022 transfer hooks or pNFT ruleset; older SPL NFTs may be listed below royalty without enforcement.
- ⚑Collection identifiers are Magic Eden's `symbol` slug, not the on-chain mint or candy-machine ID — fetch the symbol via search before using listing endpoints.