# Get Signed Transaction

## **Option 1: Write your function:** Get Signed Transaction

After [Step 1](https://docs.tronsave.io/developer/rest-api-v0/buy-on-rest-api/use-signed-transaction/estimate-trx), 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: &#x20;

```tsx
const dataSendTrx = await tronWeb.transactionBuilder.sendTrx('TRONSAVE_FUND_ADDRESS', estimate_trx, 'BUYER_ADDRESS')
const signed_tx = await tronWeb.trx.sign(dataSendTrx, 'PRIVATE_KEY');
```

{% hint style="info" %}

* change <mark style="color:blue;">`BUYER_ADDRESS`</mark> Is the buyer's public address&#x20;
* change <mark style="color:blue;">`PRIVATE_KEY`</mark>  Is the buyer's private key
* change <mark style="color:blue;">`TRONSAVE_FUND_ADDRESS`</mark> Is our Tronsave fund address on the mainnet
  {% endhint %}

Our Tronsave fund address is

{% tabs %}
{% tab title="Mainnet" %}

```
TWZEhq5JuUVvGtutNgnRBATbF8BnHGyn4S
```

{% endtab %}
{% endtabs %}

## **Option 2:** Use Tronsave Get Signed Transaction API

#### <mark style="color:orange;">`POST`</mark>  `https://api.tronsave.io/v0/signed-tx` <a href="#api-method" id="api-method"></a>

Rate limi&#x74;***: 15** requests per **1** second*

#### Request params <a href="#request-params" id="request-params"></a>

<table><thead><tr><th width="166.33333333333331">Field</th><th width="112">Position</th><th width="110">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>body</td><td>string</td><td>true</td><td>The buyer's public address </td></tr><tr><td>private_key</td><td>body</td><td>string</td><td>true</td><td>The buyer's private key</td></tr><tr><td>estimate_trx</td><td>body</td><td>number</td><td>true</td><td>The amount of TRX to be paid is calculated in SUN.(estimate_trx <em>in</em> <a href="estimate-trx"><em><strong>Step 1</strong></em></a>)</td></tr></tbody></table>

#### Request params example <a href="#request-params-example" id="request-params-example"></a>

```javascript
{
    "address": "TM6ZeEgpefyGWeMLuzSbfqTGkPv8Z65432",
    "private_key": "{{yourprivateKey}}",
    "estimate_trx": 13500000 //from Step1
 }
```

#### Responses <a href="#responses" id="responses"></a>

```javascript
{
      "visible": false,
      "txID": "446eed36e31249b98b201db2e81a3825b185f1a3d8b2fea348b24fc021e58e0d",
      "raw_data": {
        "contract": [
          {
            "parameter": {
              "value": {
                "amount": 13500000,
                "owner_address": "417a0d868d1418c9038584af1252f85d486502eec0",
                "to_address": "41055756f33f419278d9ea059bd2b21120e6add748"
              },
              "type_url": "type.googleapis.com/protocol.TransferContract"
            },
            "type": "TransferContract"
          }
        ],
        "ref_block_bytes": "0713",
        "ref_block_hash": "6c5f7686f4176139",
        "expiration": 1691465106000,
        "timestamp": 1691465046758
      },
      "raw_data_hex": "0a02071322086c5f7686f417613940d084b5999d315a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a15417a0d868d1418c9038584af1252f85d486502eec0121541055756f33f419278d9ea059bd2b21120e6add74818e0fcb70670e6b5b1999d31",
      "signature": ["xxxxxxxxx"]
    }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tronsave.io/developer/rest-api-v0/buy-on-rest-api/use-signed-transaction/get-signed-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
