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

# Wallet Management

> Managing your Monei unified wallet and subwallets

## Overview

Your Monei wallet is automatically created when you sign up. It's a unified custodial wallet containing subwallets for different assets. Naira, EVM tokens, and Solana tokens. This guide covers how to manage and monitor your wallet.

**What you'll learn:**

* Understanding your unified wallet
* Managing subwallets
* Viewing balances and portfolios
* Virtual account for Naira deposits
* Transaction history

***

## Unified Wallet Structure

When you create a Monei account, you get one unified wallet with three subwallets:

<CardGroup cols={3}>
  <Card title="Fiat Subwallet" icon="naira-sign">
    Nigerian Naira balance with virtual account number for deposits
  </Card>

  <Card title="EVM Subwallet" icon="ethereum">
    Single address for all EVM chains (Ethereum, BSC, Polygon, Base, Arbitrum, Optimism)
  </Card>

  <Card title="Solana Subwallet" icon="s">
    Separate address for Solana and SPL tokens
  </Card>
</CardGroup>

<Info>
  All subwallets are managed automatically. You don't create or delete them individually.
</Info>

***

## Get Wallet Information

### Complete Wallet Overview

<CodeGroup>
  ```javascript Node.js theme={null}
  import MoneiSDK from 'monei-sdk';

  const monei = new MoneiSDK({
    apiKey: process.env.MONEI_API_KEY,
  });

  // Get complete wallet account information
  const wallet = await monei.account.me();

  console.log('Naira Balance:', wallet.nairaBalance);
  console.log('Total Subwallets:', wallet.subwallets.length);

  // Access each subwallet
  wallet.subwallets.forEach(subwallet => {
    console.log('\nSubwallet Type:', subwallet.type);
    console.log('Chain:', subwallet.chain || 'Fiat');
    console.log('Balance:', subwallet.balance);
    
    if (subwallet.publicAddress) {
      console.log('Address:', subwallet.publicAddress);
    }
    
    if (subwallet.virtualAccount) {
      console.log('Virtual Account:', subwallet.virtualAccount.accountNumber);
      console.log('Bank:', subwallet.virtualAccount.bankName);
    }
  });
  ```

  ```python Python theme={null}
  from monei import MoneiClient

  monei = MoneiClient(
      api_key=os.getenv('MONEI_API_KEY')
  )

  # Get complete wallet account
  wallet = monei.account.me()
    
  print(f'Naira Balance: ₦{wallet.naira_balance}')
  print(f'Subwallets: {len(wallet.subwallets)}')

  # Access subwallets
  for subwallet in wallet.subwallets:
      print(f'\nType: {subwallet.type}')
      print(f'Chain: {subwallet.chain or "Fiat"}')
      print(f'Balance: {subwallet.balance}')
      
      if subwallet.public_address:
          print(f'Address: {subwallet.public_address}')
  ```

  ```bash cURL theme={null}
  curl https://api.monei.cc/api/v1/wallet/me \
    -H "x-api-key: YOUR_API_KEY"
  ```
</CodeGroup>

**Response Structure:**

```json theme={null}
{
  "statusCode": 200,
  "message": "User wallet retreived succesfully",
  "data": {
    "nairaBalance": "1805.00",
    "subwallets": [
      {
        "id": "fiat-subwallet-id",
        "type": "FIAT",
        "currency": "NGN",
        "balance": 1805,
        "chain": null,
        "publicAddress": null,
        "virtualAccount": {
          "accountNumber": "9907581802",
          "bankName": "Indulge MFB",
          "accountName": "John Doe"
        }
      },
      {
        "id": "evm-subwallet-id",
        "type": "CRYPTO",
        "currency": "ETH",
        "balance": 0.00008,
        "chain": "EVM",
        "publicAddress": "0x4e7859f17B7A6b3D440D444b3e2157e3806EDA23",
        "evmPortfolio": {
          "totalValueUSD": 125.50,
          "networks": [
            {
              "chainId": 56,
              "name": "BSC",
              "nativeBalance": 0.05,
              "tokens": [
                {
                  "symbol": "USDT",
                  "balance": 100,
                  "valueUSD": 100
                }
              ]
            }
          ]
        }
      },
      {
        "id": "solana-subwallet-id",
        "type": "CRYPTO",
        "currency": "",
        "balance": 0,
        "chain": "SOLANA",
        "publicAddress": "6E5g2d1roqFZqL1eQay6Us29hzUKn52Ren5jRiiL3Qi",
        "solPortfolio": {
          "nativeBalance": 0.5,
          "nativeBalanceUsd": 75.50,
          "totalValueUsd": 75.50
        }
      }
    ]
  }
}
```

***

## Fiat Subwallet (Naira)

### Virtual Account

Your Naira subwallet includes a virtual account number for receiving deposits.

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get wallet account info
  const wallet = await monei.account.me();

  // Find fiat subwallet
  const fiatWallet = wallet.subwallets.find(w => w.type === 'FIAT');

  console.log('Naira Balance:', fiatWallet.balance);
  console.log('Account Number:', fiatWallet.virtualAccount.accountNumber);
  console.log('Bank:', fiatWallet.virtualAccount.bankName);
  console.log('Account Name:', fiatWallet.virtualAccount.accountName);

  // Share these details to receive Naira
  console.log('\nShare with sender:');
  console.log(`Bank: ${fiatWallet.virtualAccount.bankName}`);
  console.log(`Account: ${fiatWallet.virtualAccount.accountNumber}`);
  console.log(`Name: ${fiatWallet.virtualAccount.accountName}`);
  ```

  ```python Python theme={null}
  # Get wallet account info
  wallet = monei.account.me()

  # Find fiat subwallet
  fiat_wallet = next(w for w in wallet.subwallets if w.type == 'FIAT')

  print(f'Naira Balance: ₦{fiat_wallet.balance}')
  print(f'Account: {fiat_wallet.virtual_account.account_number}')
  print(f'Bank: {fiat_wallet.virtual_account.bank_name}')
  ```
</CodeGroup>

### Deposit Naira

To deposit Naira into your wallet:

<Steps>
  <Step title="Get Virtual Account">
    Retrieve your virtual account details from wallet info
  </Step>

  <Step title="Make Bank Transfer">
    Transfer Naira from any Nigerian bank to your virtual account

    * Bank: Indulge MFB (or as shown)
    * Account Number: Your unique virtual account
    * Account Name: Your registered name
  </Step>

  <Step title="Automatic Credit">
    Your Monei wallet is credited automatically within seconds
  </Step>

  <Step title="Verify Balance">
    ```javascript theme={null}
    const wallet = await monei.account.me();
    console.log('Updated Balance:', wallet.nairaBalance);
    ```
  </Step>
</Steps>

<Info>
  Deposits are processed instantly. No fees for deposits via virtual account.
</Info>

***

## EVM Subwallet

One address for all EVM chains - no need to manage multiple addresses.

### Get EVM Address

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get wallet account
  const wallet = await monei.account.me();

  // Find EVM subwallet
  const evmWallet = wallet.subwallets.find(w => w.chain === 'EVM');

  console.log('EVM Address:', evmWallet.publicAddress);
  console.log('Works on all chains:');
  console.log('- Ethereum');
  console.log('- BSC');
  console.log('- Polygon');
  console.log('- Base');
  console.log('- Arbitrum');
  console.log('- Optimism');
  ```

  ```python Python theme={null}
  # Get EVM subwallet
  wallet = monei.account.me()
  evm_wallet = next(w for w in wallet.subwallets if w.chain == 'EVM')

  print(f'EVM Address: {evm_wallet.public_address}')
  print('Works on all 6 EVM chains')
  ```
</CodeGroup>

### Get Portfolio by Network

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get portfolio for specific network
  const bscPortfolio = await monei.evm.getPortfolio(56); // BSC

  console.log('BSC Portfolio:');
  console.log('Native BNB:', bscPortfolio.nativeToken.balance);
  console.log('Total Value:', bscPortfolio.totalPortfolioValueUSD);

  // List all tokens
  bscPortfolio.tokens.forEach(token => {
    console.log(`${token.symbol}: ${token.balance} ($${token.balanceUSD})`);
  });

  // Get portfolio for all networks
  const networks = [1, 56, 137, 8453, 42161, 10]; // ETH, BSC, Polygon, Base, Arbitrum, Optimism

  for (const chainId of networks) {
    const portfolio = await monei.evm.getPortfolio(chainId);
    console.log(`\n${portfolio.networkName}:`);
    console.log(`Total: $${portfolio.totalPortfolioValueUSD}`);
  }
  ```

  ```python Python theme={null}
  # Get BSC portfolio
  bsc_portfolio = monei.evm.get_portfolio(56)

  print(f'BSC Native: {bsc_portfolio.native_token.balance} BNB')
  print(f'Total Value: ${bsc_portfolio.total_portfolio_value_usd}')

  # List tokens
  for token in bsc_portfolio.tokens:
      print(f'{token.symbol}: {token.balance} (${token.balance_usd})')
  ```

  ```bash cURL theme={null}
  curl https://api.monei.cc/api/v1/evm/portfolio/56 \
    -H "x-api-key: YOUR_API_KEY"
  ```
</CodeGroup>

### Receive EVM Tokens

To receive tokens on any EVM chain:

<Steps>
  <Step title="Get Your Address">
    ```javascript theme={null}
    const wallet = await monei.account.me();
    const evmWallet = wallet.subwallets.find(w => w.chain === 'EVM');
    console.log('Address:', evmWallet.publicAddress);
    ```
  </Step>

  <Step title="Share Address">
    Share your EVM address with the sender

    <Warning>
      Verify the network! Make sure sender is sending on a supported network (Ethereum, BSC, Polygon, Base, Arbitrum, Optimism)
    </Warning>
  </Step>

  <Step title="Wait for Confirmations">
    Tokens appear after network confirmations:

    * BSC: \~45 seconds
    * Polygon: \~4 minutes
    * Ethereum: \~3 minutes
    * Base/Arbitrum/Optimism: \~1-2 minutes
  </Step>

  <Step title="Verify Receipt">
    ```javascript theme={null}
    const portfolio = await monei.evm.getPortfolio(chainId);
    console.log('Updated balance:', portfolio.tokens);
    ```
  </Step>
</Steps>

***

## Solana Subwallet

Separate wallet for Solana ecosystem.

### Get Solana Address

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get wallet
  const wallet = await monei.account.me();

  // Find Solana subwallet
  const solWallet = wallet.subwallets.find(w => w.chain === 'SOLANA');

  console.log('Solana Address:', solWallet.publicAddress);
  console.log('Share this to receive SOL or SPL tokens');
  ```

  ```python Python theme={null}
  # Get Solana subwallet
  wallet = monei.account.me()
  sol_wallet = next(w for w in wallet.subwallets if w.chain == 'SOLANA')

  print(f'Solana Address: {sol_wallet.public_address}')
  ```
</CodeGroup>

### Get Solana Portfolio

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get Solana portfolio
  const solPortfolio = await monei.solana.getPortfolio({
    network: 'mainnet-beta'
  });

  console.log('SOL Balance:', solPortfolio.nativeBalance);
  console.log('USD Value:', solPortfolio.nativeBalanceUsd);
  console.log('Total Portfolio:', solPortfolio.totalValueUsd);

  // List SPL tokens
  solPortfolio.tokens.forEach(token => {
    console.log(`${token.symbol}: ${token.balance}`);
    if (token.valueUsd) {
      console.log(`  Value: $${token.valueUsd}`);
    }
  });
  ```

  ```python Python theme={null}
  # Get Solana portfolio
  sol_portfolio = monei.solana.get_portfolio(network='mainnet-beta')

  print(f'SOL: {sol_portfolio.native_balance}')
  print(f'USD Value: ${sol_portfolio.native_balance_usd}')
  print(f'Total: ${sol_portfolio.total_value_usd}')

  # SPL tokens
  for token in sol_portfolio.tokens:
      print(f'{token.symbol}: {token.balance}')
  ```

  ```bash cURL theme={null}
  curl https://api.monei.cc/api/v1/solana/portfolio \
    -H "x-api-key: YOUR_API_KEY"
  ```
</CodeGroup>

***

## Total Portfolio Value

### Get Combined Portfolio

<CodeGroup>
  ```javascript Node.js theme={null}
  // Calculate total portfolio value across all chains
  const wallet = await monei.account.me();

  let totalUSD = 0;

  // Add Naira (convert to USD if needed)
  const nairaInUSD = wallet.nairaBalance / 1600; // Approximate conversion
  totalUSD += nairaInUSD;

  // Add EVM portfolio
  const evmWallet = wallet.subwallets.find(w => w.chain === 'EVM');
  if (evmWallet?.evmPortfolio) {
    totalUSD += evmWallet.evmPortfolio.totalValueUSD;
  }

  // Add Solana portfolio
  const solWallet = wallet.subwallets.find(w => w.chain === 'SOLANA');
  if (solWallet?.solPortfolio) {
    totalUSD += solWallet.solPortfolio.totalValueUsd;
  }

  console.log('Total Portfolio Value: $', totalUSD.toFixed(2));

  // Breakdown
  console.log('\nBreakdown:');
  console.log(`Naira: ₦${wallet.nairaBalance} (~$${nairaInUSD.toFixed(2)})`);
  console.log(`EVM: $${evmWallet?.evmPortfolio?.totalValueUSD || 0}`);
  console.log(`Solana: $${solWallet?.solPortfolio?.totalValueUsd || 0}`);
  ```

  ```python Python theme={null}
  # Calculate total portfolio
  wallet = monei.account.me()

  total_usd = 0

  # Naira (approximate conversion)
  naira_usd = float(wallet.naira_balance) / 1600
  total_usd += naira_usd

  # EVM
  evm_wallet = next((w for w in wallet.subwallets if w.chain == 'EVM'), None)
  if evm_wallet and evm_wallet.evm_portfolio:
      total_usd += evm_wallet.evm_portfolio.total_value_usd

  # Solana
  sol_wallet = next((w for w in wallet.subwallets if w.chain == 'SOLANA'), None)
  if sol_wallet and sol_wallet.sol_portfolio:
      total_usd += sol_wallet.sol_portfolio.total_value_usd

  print(f'Total Portfolio: ${total_usd:.2f}')
  ```
</CodeGroup>

***

## Wallet Security

<AccordionGroup>
  <Accordion icon="shield" title="Custodial Security">
    **How Monei protects your wallet:**

    * Private keys stored in Hardware Security Modules (HSM)
    * Multi-signature protection for large transactions
    * Encrypted at rest and in transit
    * Regular security audits
    * Insurance coverage
    * 24/7 monitoring

    You never handle private keys - Monei manages them securely.
  </Accordion>

  <Accordion icon="key" title="Access Control">
    **Multiple layers of protection:**

    * API key authentication
    * Transaction PIN for withdrawals
    * Two-factor authentication (2FA)
    * Session management
    * IP whitelisting (enterprise)
    * Biometric authentication (mobile)
  </Accordion>

  <Accordion icon="bell" title="Activity Monitoring">
    **Track all wallet activity:**

    * Real-time balance updates
    * Transaction notifications (email, SMS, push)
    * Webhook events for automation
    * Login alerts from new devices
    * Unusual activity warnings
  </Accordion>

  <Accordion icon="life-ring" title="Recovery">
    **Account recovery options:**

    * Email/phone verification
    * KYC document verification
    * Support team assistance
    * Multi-device access

    <Info>
      Because Monei is custodial, you can recover wallet access through KYC verification.
    </Info>
  </Accordion>
</AccordionGroup>

***

## Transaction History

### Get Wallet Transactions

<CodeGroup>
  ```javascript Node.js theme={null}
  // Get all wallet transactions
  const transactions = await monei.transactions.getAll({
    page: 1,
    limit: 20,
    type: 'all' // 'fiat', 'crypto', 'offramp'
  });

  console.log('Total Transactions:', transactions.total);
  console.log('Current Page:', transactions.page);

  transactions.data.forEach(tx => {
    console.log(`\n${tx.type}: ₦${tx.amount}`);
    console.log(`Status: ${tx.status}`);
    console.log(`Date: ${tx.createdAt}`);
    console.log(`ID: ${tx.id}`);
  });

  // Filter by date range
  const filtered = await monei.transactions.getAll({
    startDate: '2024-01-01',
    endDate: '2024-12-31',
    status: 'completed'
  });
  ```

  ```python Python theme={null}
  # Get transactions
  transactions = monei.transactions.get_all(
      page=1,
      limit=20,
      type='all'
  )

  print(f'Total: {transactions.total}')

  for tx in transactions.data:
      print(f'\n{tx.type}: ₦{tx.amount}')
      print(f'Status: {tx.status}')
      print(f'Date: {tx.created_at}')
  ```

  ```bash cURL theme={null}
  curl "https://api.monei.cc/api/v1/transactions?page=1&limit=20" \
    -H "x-api-key: YOUR_API_KEY"
  ```
</CodeGroup>

***

## Best Practices

<CardGroup cols={2}>
  <Card title="Regular Balance Checks" icon="chart-line">
    Monitor your wallet balances regularly to track deposits and withdrawals
  </Card>

  <Card title="Verify Addresses" icon="check-double">
    Always double-check addresses before sharing for deposits
  </Card>

  <Card title="Keep Records" icon="file-lines">
    Save transaction IDs and receipts for your records
  </Card>

  <Card title="Enable Notifications" icon="bell">
    Turn on transaction notifications to stay informed
  </Card>
</CardGroup>

***

## Common Operations

<Tabs>
  <Tab title="Deposit Naira">
    1. Get virtual account details
    2. Transfer from any Nigerian bank
    3. Funds credited automatically
    4. No fees for deposits
  </Tab>

  <Tab title="Receive Crypto">
    1. Get wallet address (EVM or Solana)
    2. Share with sender
    3. Verify network matches
    4. Wait for confirmations
    5. Check portfolio for update
  </Tab>

  <Tab title="Check Balance">
    1. Call `wallet.me()` endpoint
    2. View Naira balance directly
    3. Call `getPortfolio()` for crypto balances
    4. Calculate total portfolio value
  </Tab>

  <Tab title="View History">
    1. Call `transactions.getAll()`
    2. Filter by type, date, status
    3. Export for records
    4. Track spending patterns
  </Tab>
</Tabs>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="User Account" icon="user" href="/account-management/user-account">
    Manage your account profile and KYC
  </Card>

  <Card title="Naira Wallet Operations" icon="naira-sign" href="/naira-wallet/deposits">
    Learn about Naira deposits and payouts
  </Card>

  <Card title="EVM Operations" icon="ethereum" href="/evm-blockchain/wallet-operations">
    Detailed guide on EVM wallet operations
  </Card>

  <Card title="Solana Operations" icon="s" href="/solana/wallet-operations">
    Complete Solana wallet guide
  </Card>
</CardGroup>
