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

# Get Whitelisted Addresses

> Retrieve pre-approved external wallet addresses for secure withdrawals

## Overview

Whitelist management provides an additional security layer for withdrawals from internal (custodial) wallets. Whitelisted addresses are pre-approved withdrawal destinations that have been verified and saved for secure fund transfers.

**Security Benefits:**

* Pre-approve trusted addresses before withdrawal
* Prevent withdrawal to unauthorized addresses
* Maintain audit trail of approved destinations
* Track usage history of whitelisted addresses

**Use Cases:**

* Add frequently used exchange addresses
* Pre-approve personal wallet addresses
* Manage beneficiary addresses for business accounts
* Implement security policies requiring address approval

***

Get all whitelisted addresses for a specific currency.

### Authentication

<ParamField header="x-client-key" type="string" required>
  Your public API client key
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Query Parameters

<ParamField query="currency" type="string" required>
  Currency of the desired whitelisted addresses (e.g., "xrp", "usdc", "eth")
</ParamField>

<ParamField query="x-us-env" type="boolean" default={false}>
  Route to US backend environment
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique whitelist entry identifier
</ResponseField>

<ResponseField name="name" type="string">
  Friendly name or label for the address
</ResponseField>

<ResponseField name="beneficiaryFirstName" type="string">
  Beneficiary's first name
</ResponseField>

<ResponseField name="beneficiaryLastName" type="string">
  Beneficiary's last name
</ResponseField>

<ResponseField name="walletAddress" type="string">
  Blockchain address
</ResponseField>

<ResponseField name="walletMemo" type="string">
  Memo/destination tag (for XRP, Stellar, etc.)
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code
</ResponseField>

<ResponseField name="lastUsedAt" type="string">
  ISO 8601 timestamp of last withdrawal to this address
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of when address was whitelisted
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  [
    {
      "id": "d7ed0d12-270c-4491-b1a4-bebf2cc42b5c",
      "name": "Binance Account | Primary",
      "beneficiaryFirstName": "John",
      "beneficiaryLastName": "Doe",
      "walletAddress": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA",
      "walletMemo": "66",
      "currency": "xrp",
      "lastUsedAt": "2025-08-12T13:44:47.287Z",
      "createdAt": "2025-08-11T13:44:47.287Z"
    },
    {
      "id": "a3f2e1d4-c5b6-47a8-9e0f-1d2c3b4a5e6f",
      "name": "Kraken Exchange",
      "beneficiaryFirstName": "John",
      "beneficiaryLastName": "Doe",
      "walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
      "walletMemo": "12345",
      "currency": "xrp",
      "lastUsedAt": null,
      "createdAt": "2025-08-10T10:30:22.123Z"
    }
  ]
  ```

  ```json 401 - Authentication Error theme={null} theme={null}
  {
    "message": "Not authenticated"
  }
  ```

  ```json 422 - Validation Error theme={null} theme={null}
  {
    "message": "currency parameter is required"
  }
  ```
</ResponseExample>

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X GET "https://dev.api.baanx.com/v1/wallet/whitelist?currency=xrp" \
    -H "x-client-key: YOUR_CLIENT_KEY" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://dev.api.baanx.com/v1/wallet/whitelist"
  headers = {
      "x-client-key": "YOUR_CLIENT_KEY",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }

  params = {"currency": "xrp"}
  response = requests.get(url, headers=headers, params=params)
  whitelisted = response.json()

  print(f"Whitelisted XRP addresses: {len(whitelisted)}")

  for address in whitelisted:
      print(f"\n{address['name']}")
      print(f"  Address: {address['walletAddress']}")
      if address['walletMemo']:
          print(f"  Memo: {address['walletMemo']}")
      print(f"  Beneficiary: {address['beneficiaryFirstName']} {address['beneficiaryLastName']}")
      if address['lastUsedAt']:
          print(f"  Last used: {address['lastUsedAt']}")
  ```

  ```typescript TypeScript theme={null} theme={null}
  interface WhitelistedAddress {
    id: string;
    name: string;
    beneficiaryFirstName: string;
    beneficiaryLastName: string;
    walletAddress: string;
    walletMemo: string | null;
    currency: string;
    lastUsedAt: string | null;
    createdAt: string;
  }

  async function getWhitelistedAddresses(
    currency: string
  ): Promise<WhitelistedAddress[]> {
    const response = await fetch(
      `https://dev.api.baanx.com/v1/wallet/whitelist?currency=${currency}`,
      {
        headers: {
          'x-client-key': 'YOUR_CLIENT_KEY',
          'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
        }
      }
    );

    return await response.json();
  }

  const xrpAddresses = await getWhitelistedAddresses('xrp');
  console.log(`Found ${xrpAddresses.length} whitelisted XRP addresses`);
  ```
</CodeGroup>

***

## Important Notes

<Warning>
  **Memo Requirements**: For networks like XRP and Stellar, the combination of address + memo identifies the destination. Always include both when whitelisting exchange addresses.
</Warning>

<Note>
  **Usage Tracking**: The `lastUsedAt` field helps identify frequently vs rarely used addresses. Consider removing unused addresses periodically.
</Note>

<Tip>
  **Descriptive Names**: Use clear, descriptive names that help identify the purpose and destination of each whitelisted address (e.g., "Binance Main Account | Trading").
</Tip>

## Related Endpoints

* [Add Addresses to Whitelist](/api-reference/wallet/whitelist-post) - Add new pre-approved addresses
* [Remove Addresses from Whitelist](/api-reference/wallet/whitelist-delete) - Remove whitelisted addresses
* [Withdraw from Internal Wallet](/api-reference/wallet/internal-withdraw) - Use whitelisted addresses for secure withdrawals
* [Get Internal Wallets](/api-reference/wallet/internal) - View internal wallets that can withdraw to whitelist
