All Collections
Developer Tools
Magic Eden's API
Leveraging the Magic Eden Polygon API: A Comprehensive Guide
Leveraging the Magic Eden Polygon API: A Comprehensive Guide

Seamless integration with Magic Eden: Unlocking the power of the Polygon API

Updated over a week ago

The Magic Eden Polygon API is an instrumental resource tailored to aid developers in crafting state-of-the-art experiences with NFTs and extracting crucial marketplace metrics. In this article, we delve into the nuances of the Polygon API, shedding light on its capabilities, guidelines for optimal utilization, and insights into API keys and request parameters.

Collections

The Polygon API supplies an endpoint facilitating developers to delve into a collection's metadata and essential statistics, encompassing sales, volume, and more.

Endpoint

GET https://api-mainnet.magiceden.dev/v3/rtp/polygon/collections/v7


Description

Use this API to explore a collection's metadata and statistics (sales, volume, etc).

QUERY PARAMS:

  • id (string): Filter to a particular collection with collection id.
    Example: 0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63

  • slug (string): Filter to a particular collection slug.
    Example: boredapeyachtclub

  • collectionsSetId (string): Filter to a particular collection set.
    Example: 8daa732ebe5db23f267e58d52f1c9b1879279bcdf4f78b8fb563390e6946ea65

  • community (string): Filter to a particular community.
    Example: artblocks

  • contract (array of strings): ADD STRING

  • creator (string): Filter by creator.

  • name (string): Search for collections that match a string.
    Example: bored

  • maxFloorAskPrice (number): Maximum floor price of the collection.

  • minFloorAskPrice (number): Minimum floor price of the collection.

  • includeAttributes (boolean): If true, attributes will be included in the response. Must filter by id or slug to a particular collection.

  • includeSalesCount (boolean): If true, sales count (1 day, 7 day, 30 day, all time) will be included in the response. Must filter by id or slug to a particular collection.

  • includeMintStages (boolean): If true, mint data for the collection will be included in the response.

  • includeSecurityConfigs (boolean): If true, security configuration data (e.g. ERC721C configuration) will be included in the response.

  • normalizeRoyalties (boolean): If true, prices will include missing royalties to be added on-top.

  • useNonFlaggedFloorAsk (boolean): If true, return the non flagged floor ask. Supported only when normalizeRoyalties is false.

  • sortBy (string): Order the items are returned in the response. Options are #DayVolume, createdAt, updatedAt, or floorAskPrice.

  • sortDirection (string)

  • limit (integer): Amount of items returned in response. Default and max limit is 20, unless sorting by updatedAt which has a max limit of 1000.

  • startTimestamp (number): When sorting by updatedAt, the start timestamp you want to filter on (UTC).

  • endTimestamp (number): When sorting by updatedAt, the end timestamp you want to filter on (UTC).

  • continuation (string): Use continuation token to request next offset of items.

  • displayCurrency (string): Input any ERC20 address to return result in given currency. Applies to topBid and floorAsk.

RESPONSE:

  • 200: Successful

Note:

Our default query per minute (QPM) rate is set between 30-120. Should you require higher limits, please refer to this article for more information.

Top Selling Collections

Acquaint yourself with the leading selling and minting collections using this endpoint.

Endpoint

GET https://api-mainnet.magiceden.dev/v3/rtp/polygon/collections/trending/v1

Description

Use this API to get the top selling and minting collections.

QUERY PARAMS:

  • period (string): Time window to aggregate.

  • limit (integer): Amount of items returned in response. Default is 50 and max is 1000. Expected to be sorted and filtered on client side.

  • sortBy (string): Default: sales

  • normalizeRoyalties (boolean): If true, prices will include missing royalties to be added on-top.

  • useNonFlaggedFloorAsk (boolean): If true, return the non flagged floor ask. Supported only when normalizeRoyalties is false.

RESPONSE:

  • 200: Successful

Note:
This article provides a bird's-eye view of the Polygon API. For a more in-depth exploration of individual endpoints and their functionalities, refer to the official Polygon API documentation.


It's imperative to be aware that the specifics of these API endpoints are tailored for Magic Eden and might undergo changes. Always ensure you're referring to the authoritative documentation or connecting with Magic Eden's support team for the latest information.

Should you require further assistance or have any inquiries, do join our Discord community or get in touch with our adept support team. Here's to innovative building!

Did this answer your question?