0

How can I send USDT TRC20 via Python?

I used this code:

from tronpy import Tron
from tronpy.keys import PrivateKey

client = Tron(network='mainnet')
priv_key = PrivateKey(bytes.fromhex("0"))

txn = (
    client.trx.transfer(from_="0", to="0", amount=1_000)
    .memo("0")
    .build()
    .sign(priv_key)
)
print(txn.txid)
print(txn.broadcast().wait())

But it did not send usdt, but instead trx.

A network change does not help.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
idks
  • 1

0 Answers0