> For the complete documentation index, see [llms.txt](/llms.txt).

- Snap
- Restricted

# snap_getPreferences

Gets the user's preferences.

## Parameters[​](#parameters "Direct link to Parameters")

This method does not have any parameters.

## Returns[​](#returns "Direct link to Returns")

object

An object containing the user's MetaMask preferences.

### locale

string

The user's locale setting as a [language code](https://github.com/MetaMask/metamask-extension/blob/main/app/%5Flocales/index.json).

### currency

string

The user's preferred fiat currency code (e.g., `"usd"`, `"eur"`).

### hideBalances

boolean

Whether the user has chosen to hide balances in the MetaMask UI.

### useSecurityAlerts

boolean

Whether to run transactions and signatures through security alert providers before submitting.

### simulateOnChainActions

boolean

Whether to simulate transactions and signatures to preview their effects before the user confirms.

### useTokenDetection

boolean

Whether to automatically detect and add ERC-20 tokens to the user's wallet.

### batchCheckBalances

boolean

Whether to fetch token balances in an aggregated manner for improved performance.

### displayNftMedia

boolean

Whether to display NFT media (images, videos) in the MetaMask UI.

### useNftDetection

boolean

Whether to automatically detect and add NFTs to the user's wallet.

### useExternalPricingData

boolean

Whether to fetch token price data from an external pricing source.

### showTestnets

boolean

Whether to show testnet networks in the MetaMask UI.

## Example

- Manifest
- Usage

```
{
  "initialPermissions": {
    "snap_getPreferences": {}
  }
}

```

```
const preferences = await snap.request({
  method: 'snap_getPreferences',
})

console.log(preferences)
// {
//  locale: 'en',
//  currency: 'usd',
//  ...
// }

```
