I need to swap(change) part of my trc20 asset to trx in my Tron wallet. Consider i have some data like this:
public_key="AAA"
private_key="PPP"
trc20_address="TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
current_trc20_amount=100 usdt
So for example swap 2 usdt to trx.
Is it possible? How?
I need this because i want to make transaction automatically and programmatically. And for sending trc20 we need some trx as fee.
Try to use the Tron API along with a library like
tronpy
. https://tronpy.readthedocs.io/en/stable/ https://developers.tron.network/ hope these helpful.