GithubHelp home page GithubHelp logo

opensea's Introduction

Opensea API

An API wrapper library for opensea api.

Installation

pip3 install opensea

Usage

Retrieving assets:

from opensea import get_assets

# This will return a list of assets which you can iterate and get the needed data
asset_list = get_assets(limit=10, verified_only=False)

asset = asset_list[0] # Get the first asset obejct from the list

print(asset.name)
print(asset.description)
print(asset.asset_url)
print(asset.get_floor_price()) # Floor price of the collection

Retrieving bundles:

from opensea import get_bundles

# This will return a list of assets which you can iterate and get the needed data
bundles_list = get_bundles(limit=10)

bundle = bundles_list[0] # Get the first asset obejct from the list

print(bundle.slug)
print(bundle.assets[0].name)

Retrieving stats from specific collection:

from opensea import get_collection_stats

# This will return a CollectionStats Object
stats = get_collection_stats(collection="doodles-official")

print(stats.count)
print(stats.num_owners)
print(stats.floor_price)

opensea's People

Contributors

ankushkun avatar franciscom0301 avatar grbavacigla avatar joelubuntu avatar vovw avatar yaswanthsaivendra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

opensea's Issues

How to get the specific collection's floor price?

I tried to get a specific collection's floor price but can't find a way.

Let's say Cryptoadz, the contract address is here: '0x1cb1a5e65610aeff2551a50f76a87a7d3fb649c6'

How can I get its floor price?

Thanks.

Retrieving bundles

I would like to add Bundles to this repository, is that feature welcome? Looking at the source code, I found this comment:

    def get_assets(self, owner: str = "", order_by: str = "pk", order_direction: str = "asc", limit: int = 10, verified_only: bool = False):
        #                                                  ^^
        # I dunno what this 'pk' stands for but I think its the default for fastest ordering

So, to answer your question, pk stands for Primary Key and it is usually used with id field in databases (in this case, it means there is no ordering, that's why it is fast).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.