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

# Close Token Accounts

> Close empty token accounts and reclaim their rent.

Token accounts must be empty before they can be closed.

## Close associated token accounts

Provide a wallet address and one or more token mints. The SDK derives each ATA and returns reclaimed rent to the wallet:

```typescript theme={null}
const result = await gasStation.closeAccount({
  account: signer.address,
  tokens: ['MINT_ADDRESS'],
  signer,
})

console.log(result.Signature)
```

If the token account was created by `createAccount()`, Altude's fee payer is its close authority. In that case, omit `signer` so the relay can add the required signature:

```typescript theme={null}
await gasStation.closeAccount({
  account: 'WALLET_ADDRESS',
  tokens: ['MINT_ADDRESS'],
})
```

## Close a specific token account

```typescript theme={null}
await gasStation.closeAccount({
  accountAddress: 'TOKEN_ACCOUNT_ADDRESS',
  destination: 'RENT_DESTINATION_ADDRESS',
  signer,
})
```

Use a signer when the user is the close authority. Omit it only when the Altude fee payer is the close authority.

<Warning>
  Closing a non-empty account fails on-chain. Transfer or burn its remaining token balance first.
</Warning>
