cancelCollectionOffer

cancelCollectionOffer()

async def cancelCollectionOffer(offer_id: str, authData: str) -> None

Cancel an existing collection offer

Returns

None if the collection offer was cancelled successfully

Raises

  • authDataError if authData is not provided

  • offerError if offer_id isn't provided

  • requestError if request fails.

Parameters

  • offer_id (str): ID of the offer to cancel

  • authData (str): Authentication data required to cancel the offer.

Example

Cancel all existing collection offers

from aportalsmp.offers import cancelCollectionOffer, myCollectionOffers
from aportalsmp.auth import update_auth
import asyncio

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

async def main():
    my_offers = await myCollectionOffers(authData = auth)
    for offer in my_offers:
        await cancelCollectionOffer(offer_id = offer.id, authData = auth)

See used functions: myCollectionOffers, update_auth

Last updated