collections

collections()

async def collections(limit: int, authData: str) -> Collections

Retrieve a list of collections and their floors, supply, daily volume etc

Returns

Collections object

Raises

  • authDataError - if authData is not provided

  • requestError - if request fails

Parameters

  • authData (str) - authentication data required for the api request

  • limit (int, optional) - limit of collections to show

Collections object

Methods:

  • .toDict(): Converts the GiftsFloors object back to a dictionary format.

  • .gift(gift_name) : Returns CollectionItem object. See CollectionItem below, or in the .classes.Objects

CollectionItem Object

Attributes:

  • .id - id of the collection

  • .name - full name of the collection

  • .short_name - short name of the collection

  • .photo_url - photo url that represents the collection

  • .day_volume - daily trading volume of the collection

  • .volume - total trading volume of the collection

  • .floor_price - floor price of the collection

  • .supply - supply of the collection

Example

from aportalsmp.gifts import collections
from aportalsmp.auth import update_auth
import asyncio

auth = asyncio.run(update_auth(api_id=123, api_hash="..."))

async def main():
    collection = (await collections(authData=auth)).gift("plush pepe")
    print(collection.name, collection.short_name, collection.supply, collection.floor_price, collection.day_volume, collection.volume)
    # output: Plush Pepe plushpepe 2816 4199.0 70636.0 2520467.66

See used functions: update_auth

Last updated