changePrice
changePrice()
async def changePrice(nft_id: str, price: float, authData: str) -> None
Change price of your nft
Returns
None
Raises
authDataError
- ifauthData
is not providedtradingError
:if
nft_id
is not providedif
price <= 0
orprice
isn'tint
orfloat
requestError
- if request fails
Parameters
authData
(str) - authentication data required for the api requestnft_id
(str) - id of the nft to change price ofprice
(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