简体   繁体   中英

How to get the listed NFT of a collection on OPENSEA

Hey Im trying to get the listed nfts of a collection on opensea but its not working im using the API but for some reason all im getting a cloudflare block is there a way to bypass this is or be able to get the collection stats of a nft collection of every listed nft in python. I have tried a cloudflare bypass module but that sometimes is iffy.

import requests

url = "https://opensea.io/collection/clonex?tab=activity&search[isSingleCollection]=true&search[eventTypes][0]=AUCTION_CREATED"

headers = {
    "Accept": "application/json",
    "X-API-KEY": ""
}

response = requests.request("GET", url, headers=headers)

print(response.text)

https://docs.opensea.io/reference/getting-assets

Firstly, it should be "api.opensea.io" rather than "opensea.io".

Secondly, the name of the collection should be added as a parameter rather than being used directly.

You can try on the link above with your desired parameters.

In your case, for example, it should probably be something like this:

https://api.opensea.io/api/v1/assets?collection_slug=clonex&order_direction=desc&limit=20&include_orders=false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM