# Prepare A Native Coin Transfer From Address Solana

Prepare an unsigned native SOL transfer from an address. The address does not have to belong to a wallet. The response returns the unsigned transaction serialized to base64 (ready for the signer), together with the recent blockhash, compute-budget settings and the estimated fee. Amounts are denominated in lamports (1 SOL = 1,000,000,000 lamports).

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

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | string | yes | Represents the name of the blockchain network used; "mainnet" is the live network with actual data while the others are test networks. Allowed values: `mainnet`, `devnet`. |

## 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": {
      "fromAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
      "toAddress": "3Nxr6Wj5tK1abRxWzAf3VvJ2SsTf1cW9y5gEwYbNb6vA",
      "amount": "1000000",
      "feeOptions": {
        "priority": "standard"
      }
    }
  }
}
```

| 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.fromAddress` | string | yes | Sender's Solana address (base58). It funds and is the fee payer of the transaction. |
| `data.item.toAddress` | string | yes | Recipient's Solana address (base58). |
| `data.item.amount` | string | yes | Amount to send, in lamports (raw base units, integer string). 1 SOL = 1,000,000,000 lamports. |
| `data.item.feeOptions` | object | no | Fee configuration. |
| `data.item.feeOptions.priority` | string | no | Fee priority - slow, standard or fast. Selects the priority fee tier. |

## 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": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
      "recipient": "3Nxr6Wj5tK1abRxWzAf3VvJ2SsTf1cW9y5gEwYbNb6vA",
      "amount": "1000000",
      "recentBlockhash": "8HWLsJviKujXjg23sm7v5aiaU9gE1QpLAasEUpCuDUBN",
      "lastValidBlockHeight": "463187603",
      "fee": {
        "amount": "7000",
        "unit": "lamports"
      },
      "computeUnitLimit": "200000",
      "computeUnitPrice": "10000",
      "serializedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIEfowIh2C/3h3dzzLBfyCbgkLuUqrxMfrNiNDqLG0LBvIjV7d1+yEItK+z/ZXUvIT1uq9WzenyybmZEAeqND/kXwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAABsPEd2LGZ7+weJWXmkKYJUWGEjbNW7o2rEg/TnL/pyZQMDAAUCQA0DAAMACQMQJwAAAAAAAAICAAEMAgAAAKCGAQAAAAAA"
    }
  }
}
```

### 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 | The sender (fee payer) address. |
| `data.item.recipient` | string | yes | The recipient address. |
| `data.item.amount` | string | yes | The transferred amount in lamports. |
| `data.item.recentBlockhash` | string | yes | The recent blockhash the transaction is bound to (~60s TTL). |
| `data.item.lastValidBlockHeight` | string | yes | The last block height at which the blockhash is still valid. |
| `data.item.fee` | object | yes | The estimated transaction fee. |
| `data.item.fee.amount` | string | yes | The fee amount, in the base denomination. |
| `data.item.fee.unit` | string | yes | The fee denomination (lamports). |
| `data.item.computeUnitLimit` | string | yes | The compute unit limit set on the transaction (ComputeBudget). |
| `data.item.computeUnitPrice` | string | yes | The compute unit price in micro-lamports per compute unit (ComputeBudget). |
| `data.item.serializedTransaction` | string | yes | The unsigned transaction, serialized to base64, ready for the signer. |
