changePrice

changePrice()

async def changePrice(nft_id: str, price: float, authData: str) -> None

Change price of your nft

Returns

None

Raises

  • authDataError - if authData is not provided

  • tradingError :

    • if nft_id is not provided

    • if price <= 0 or price isn't int or float

  • requestError - if request fails

Parameters

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

  • nft_id (str) - id of the nft to change price of

  • price (int | float) - price of the nft to change price of

Example

Subtract 0.01 TON from prices of all listed gifts

from aportalsmp.gifts import myPortalsGifts, changePrice
from aportalsmp.auth import update_auth
import asyncio

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

async def main():
    myListedGifts = await myPortalsGifts(listed=True, authData=auth)
    for gift in myListedGifts:
        print(await changePrice(nft_id = gift.id, price = gift.price - 0.01, authData=auth))

See used functions: update_auth, myPortalsGifts

Last updated