> For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xverse.app/sats-connect/stacks-methods/stx_transferstx.md).

# 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="https://content.gitbook.com/content/33DLypUqgcjkBSmN0gZn/blobs/KxLPikP6g8V3ktgpBEdn/image.png" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xverse.app/sats-connect/stacks-methods/stx_transferstx.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
