Get Signed Transaction
Option 1: Write your function: Get Signed Transaction
After Step 1, you will get the cost of the buy order. Then you will sing transactionBuilder to create a transfer transaction with an amount transfer equal estimate_trx from the buyer's address to the fund of the Tronsave market:
const dataSendTrx = await tronWeb.transactionBuilder.sendTrx('TRONSAVE_FUND_ADDRESS', estimate_trx, 'BUYER_ADDRESS')
const signed_tx = await tronWeb.trx.sign(dataSendTrx, 'PRIVATE_KEY');Our Tronsave fund address is
TWZEhq5JuUVvGtutNgnRBATbF8BnHGyn4SOption 2: Use Tronsave Get Signed Transaction API
POST https://api.tronsave.io/v0/signed-tx
POST https://api.tronsave.io/v0/signed-txRate limit: 15 requests per 1 second
Request params
Field
Position
Type
Required
Description
address
body
string
true
The buyer's public address
private_key
body
string
true
The buyer's private key
estimate_trx
body
number
true
The amount of TRX to be paid is calculated in SUN.(estimate_trx in Step 1)
Request params example
Responses
Last updated