Skip to content

Instantly share code, notes, and snippets.

@LordGhostX
Last active December 3, 2020 01:48
Show Gist options
  • Save LordGhostX/ee3fa1d930d8aa9290a9a7c0e16a656e to your computer and use it in GitHub Desktop.
Save LordGhostX/ee3fa1d930d8aa9290a9a7c0e16a656e to your computer and use it in GitHub Desktop.
Send Tron Cryptocurrency Programmatically
from tronapi import Tron
full_node = "https://api.trongrid.io"
solidity_node = "https://api.trongrid.io"
event_server = "https://api.trongrid.io"
tron = Tron(full_node=full_node, solidity_node=solidity_node,
event_server=event_server)
tron.private_key = "SECRET KEY"
tron.default_address = tron.address.from_private_key(tron.private_key).base58
transaction = tron.trx.send("ADDRESS", float(1))
print(transaction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment