# stx\_transferStx

You can use the `stx_transferStx` method to request a transfer of any amount of Stacks to any recipient from the user's wallet.

<table><thead><tr><th width="221">Request parameters</th><th>Description</th></tr></thead><tbody><tr><td><code>amount</code></td><td><p></p><p>a string representing the amount of STX tokens to transfer, in microstacks units. (Anything parseable by <code>BigInt</code> is acceptable)</p></td></tr><tr><td><code>recipient</code></td><td>a string representing the recipient's Crockford base-32 encoded Stacks address</td></tr><tr><td><code>memo</code></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> Optional<br>a string representing the transaction memo</td></tr></tbody></table>

```typescript
  import { request } from "sats-connect";
  
  try {
      const response = await request("stx_transferStx", {
        recipient,
        amount: Number(amount),
        memo,
      });
      if ("result" in response) {
        alert(response.result.txid);
      } else {
        alert(response.error.message);
      }
    } catch (error) {
      console.error(error);
      alert(error.message);
    }
  };
```

The user will be prompted to review the Stacks transfer transaction in the wallet, with the recipient, memo and amount to send. Xverse browser extension UI shown as example:

<figure><img src="/files/FrCeen4WOE1m6WFvcx6x" alt=""><figcaption></figcaption></figure>

The transaction will be signed and broadcasted upon user approval.

The `stx_transferStx` method returns a Promise that resolves to the `TransferStxResult` object:

<table><thead><tr><th width="162">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>txid</code></td><td>a hex-encoded string representing the ID of the transfer STX transaction signed</td></tr><tr><td><code>transaction</code></td><td>a hex-encoded string reperesenting the transfer STX transaction signed</td></tr></tbody></table>


---

# 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.xverse.app/sats-connect/stacks-methods/stx_transferstx.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.
