> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Tokens

export const Method = ({children, className = ""}) => {
  return <code className={`spark-method not-prose inline-block px-2 py-1 mt-12 text-sm font-mono font-semibold rounded-md border ${className}`}>
      {children}
    </code>;
};

Send tokens to any Spark address with single or batch transfers.

<Frame className="chill">
  <img className="block dark:hidden" src="https://mintcdn.com/lightspark/RCkJgy8FQAJRUhsh/images/wallets/transfer-tokens-light.png?fit=max&auto=format&n=RCkJgy8FQAJRUhsh&q=85&s=6aee91c61e6840c79eed98d3aa6b171c" alt="Transfer Tokens" width="3840" height="2160" data-path="images/wallets/transfer-tokens-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/lightspark/RCkJgy8FQAJRUhsh/images/wallets/transfer-tokens.png?fit=max&auto=format&n=RCkJgy8FQAJRUhsh&q=85&s=ca0ab626179021b44d694ecd299c19f8" alt="Transfer Tokens" width="3840" height="2160" data-path="images/wallets/transfer-tokens.png" />
</Frame>

***

## Transfer Tokens

Send tokens to another Spark wallet using the token identifier and amount.

<Method>transferTokens(params)</Method>

Transfers tokens to another user on the Spark network.

```typescript theme={null}
const transferResult = await wallet.transferTokens({
  tokenIdentifier: "btkn1p...", // Bech32m token identifier
  tokenAmount: BigInt(1000),    // Amount of tokens to transfer
  receiverSparkAddress: "spark1p...", // Recipient's Spark address
});

console.log("Transfer successful:", transferResult);
```

<Expandable title="Parameters">
  <ResponseField name="tokenIdentifier" type="string" required>
    The Bech32m token identifier (e.g., btkn1...) of the token to transfer
  </ResponseField>

  <ResponseField name="tokenAmount" type="bigint" required>
    The amount of tokens to transfer
  </ResponseField>

  <ResponseField name="receiverSparkAddress" type="string" required>
    The recipient's Spark address
  </ResponseField>

  <ResponseField name="outputSelectionStrategy" type="&#x22;SMALL_FIRST&#x22; | &#x22;LARGE_FIRST&#x22;" required={false}>
    Strategy for selecting token outputs. `SMALL_FIRST` uses smallest outputs first, `LARGE_FIRST` uses largest.
  </ResponseField>

  <ResponseField name="selectedOutputs" type="OutputWithPreviousTransactionData[]" required={false}>
    Optional: Specific outputs to use for the transfer. Overrides `outputSelectionStrategy`.
  </ResponseField>
</Expandable>

<Expandable title="Returns">
  <ResponseField name="transactionId" type="string" required>
    The transaction ID of the token transfer
  </ResponseField>
</Expandable>

***

## Get Token Balances

Before transferring tokens, check what tokens you own and their balances using `getBalance()`.

```typescript theme={null}
const { balance, tokenBalances } = await wallet.getBalance();
console.log("Sats balance:", balance);

// Iterate over token balances
for (const [tokenId, tokenData] of tokenBalances) {
  console.log(`Token ${tokenId}:`);
  console.log("  Owned balance:", tokenData.ownedBalance);
  console.log("  Available to send:", tokenData.availableToSendBalance);
  console.log("  Name:", tokenData.tokenMetadata.tokenName);
  console.log("  Ticker:", tokenData.tokenMetadata.tokenTicker);
}

// Check balance of a specific token
const specificToken = tokenBalances.get("btkn1...");
if (specificToken) {
  console.log("Token balance (owned):", specificToken.ownedBalance);
  console.log("Token balance (available):", specificToken.availableToSendBalance);
}
```
