myPlacedOffers
myPlacedOffers()
async def myPlacedOffers(offset: int, limit: int, authData: str) -> list[GiftOffer]
Retrieve your placed offers for certain gifts
Returns
list
of GiftOffer
objects
Raises
authDataError
ifauthData
is not providedrequestError
if request fails.
Parameters
authData
(str): Authentication data required to cancel the offer.offset
(int): It's like a pagination. To get page you want, multiply it bylimit
. Default is0
.limit
(int): Limit of offers to show. Default is20
.
GiftOffer object
Methods
.toDict()
- converts theGiftOffer
object back to a dict
Attributes
.id
- retrievesoffer_id
.amount
- amount of TON offered.status
- status of the offer.created_at
- date+time of when the offer was created.updated_at
- date+time of when the offer was updated (if was).expires_at
- expiration date+time of the offer.nft
- returnsPortalsGift
object. See PortalsGift
Example
from aportalsmp.offers import myPlacedOffers
from aportalsmp.auth import update_auth
import asyncio
auth = asyncio.run(update_auth(api_id=123, api_hash="..."))
async def main():
placed = await myPlacedOffers(authData = auth)
for offer in placed:
print(offer.nft.name, offer.nft.tg_id, offer.id, offer.amount)
# it's all the same as in myReceivedOffers
# offer.nft.name - name of the nft for which offer has been placed
# offer.nft.tg_id - telegram id of this nft
# offer.id - id of the offer
# offer.amount - price offered for the nft
See used functions: update_auth
Last updated