Skip to main content
The Magic Eden Polygon API

Integrating the Polygon API.

Updated this week

In this article, we consider the Polygon API, exploring its capabilities, guidelines for optimal utilization, and insights into API keys and request parameters.

Collections

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

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

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

This article provides a basic summary of the Polygon API. For a more in-depth exploration of individual endpoints and their functionalities, refer to the official Polygon API documentation.


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?