# Prepare A Native Coin Transfer From Address Tron

Through this endpoint customers can prepare a native coin (TRX) transaction from an address. The address doesn't have to belong to a wallet. The response returns the unsigned Tron transaction envelope (raw_data / raw_data_hex) and the sighash to sign. Amounts are denominated in SUN (1 TRX = 1,000,000 SUN).

- **Endpoint:** `POST https://rest.cryptoapis.io/prepare-transactions/evm/tron/{network}/native-coins`
- **Authentication:** `x-api-key` header
- **Credits cost:** 90 credits for 1 result by default; per blockchain: Tron: 90
- **Documentation page:** https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/prepare-transactions-evms/prepare-a-native-coin-transfer-from-address-tron/post

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | string | yes | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while network like "nile" is a test network. Allowed values: `mainnet`, `nile`. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |

## Request body (application/json)

```json
{
  "context": "yourExampleString",
  "data": {
    "item": {
      "sender": "TBYNc3i5K8iSxFoUf2DphbApFv62kEHqvN",
      "recipient": "TBgjvX6BU6mPJ4Z9GRBE4NcXKXtpfM1KGW",
      "amount": "1"
    }
  }
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.item` | object | yes |  |
| `data.item.sender` | string | yes | Represents the address which sends this transaction. In account-based protocols like Tron there is always only one sender. |
| `data.item.recipient` | string | yes | The address which receives this transaction. In account-based protocols like Tron there is always only one recipient. |
| `data.item.amount` | string | yes | Represents the amount to transfer, in human-readable units (whole TRX for native transfers, or whole tokens scaled by the token's decimals for TRC20). E.g. "1" = 1 TRX. |

## Responses

| Status | Description |
| --- | --- |
| 201 | The resource has been successfully submitted. |
| 400 | 400 |
| 401 | 401 |
| 402 | 402 |
| 403 | 403 |
| 409 | The data provided seems to be invalid. |
| 415 | The selected Media Type is unavailable. The Content-Type header should be 'application/json'. |
| 422 | Your request body for POST requests must have a structure of { data: { item: [...properties] } } |
| 429 | The request limit has been reached. There can be maximum {requests} requests per {seconds} second(s) made. Please contact our team via email if you need more or upgrade your plan. |
| 500 | An unexpected server error has occurred, we are working to fix this. Please try again later and in case it occurs again please report it to our team via email. |

### Example 201 response

```json
{
  "apiVersion": "2024-12-12",
  "requestId": "601c1710034ed6d407996b30",
  "context": "yourExampleString",
  "data": {
    "item": {
      "sender": "TBYNc3i5K8iSxFoUf2DphbApFv62kEHqvN",
      "recipient": "TBgjvX6BU6mPJ4Z9GRBE4NcXKXtpfM1KGW",
      "amount": "1000000",
      "rawDataHex": "0a024ea9220812532e5951ed0e2d40c894b6c1f2335a67080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a15411c97f0c209a56e68f19d1b8b94630db4e08ac3fd1215414433e9393c844b0e5cd74e04f036631af8304c8718c0843d70bc8bd898f233",
      "transactionId": "de01211120aa7790b0f66ce2ffe7902b9fe57f0ef0b640feff61703df0b49ed1"
    }
  }
}
```

### 201 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apiVersion` | string | yes | Specifies the version of the API that incorporates this endpoint. |
| `requestId` | string | yes | Defines the ID of the request. The `requestId` is generated by Crypto APIs and it's unique for every request. |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.item` | object | yes |  |
| `data.item.sender` | string | yes | Represents the address which sends this transaction. |
| `data.item.recipient` | string | yes | The address which receives this transaction. |
| `data.item.amount` | string | yes | Represents the transacted amount as encoded in the transaction, in the base unit (SUN for native; the token's smallest unit scaled by its decimals for TRC20). This is the request amount multiplied out, e.g. a request amount of "1" TRX returns "1000000". |
| `data.item.rawDataHex` | string | yes | String representation of the raw transaction data in hex format. |
| `data.item.transactionId` | string | yes | Represents the transaction id (hash) of the prepared transaction. |
