> ## 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 External Wallet Priority

> Retrieve the current priority order of external wallets for transaction funding

## Overview

Manage the priority order of registered external wallets. Priority determines the order in which wallets are evaluated for funding transactions. When a transaction is initiated, the platform checks wallets in priority order (1, 2, 3...). The first wallet with sufficient balance and allowance to cover the entire transaction cost is used. Only one wallet funds each transaction — multi-funding is not supported. Lower priority numbers are checked first (priority 1 before priority 2).

**Use Cases:**

* Control wallet selection order for transactions
* Optimize for network fees across chains
* Ensure transactions succeed with fallback wallets
* Route withdrawals to specific wallets

***

Get the current priority order of all registered external wallets.

### 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>

### Response

<ResponseField name="id" type="number">
  Wallet priority identifier
</ResponseField>

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

<ResponseField name="currency" type="string">
  Currency code (e.g., "usdc", "usdt")
</ResponseField>

<ResponseField name="network" type="string">
  Blockchain network (e.g., "linea", "ethereum", "solana")
</ResponseField>

<ResponseField name="priority" type="number">
  Current priority value (lower = higher priority)
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  [
    {
      "id": 551,
      "address": "0x3a11a86cf218c448be519728cd3ac5c741fb3424",
      "currency": "usdc",
      "network": "linea",
      "priority": 1
    },
    {
      "id": 552,
      "address": "0x7b22c1e6f8a4d92b5c3d8e9f1a2b3c4d5e6f7890",
      "currency": "usdt",
      "network": "ethereum",
      "priority": 2
    },
    {
      "id": 553,
      "address": "DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK",
      "currency": "usdc",
      "network": "solana",
      "priority": 3
    }
  ]
  ```
</ResponseExample>

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X GET "https://dev.api.baanx.com/v1/wallet/external/priority" \
    -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/external/priority"
  headers = {
      "x-client-key": "YOUR_CLIENT_KEY",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }

  response = requests.get(url, headers=headers)
  priorities = response.json()

  print("Withdrawal Priority Order:")
  for wallet in sorted(priorities, key=lambda w: w['priority']):
      print(f"{wallet['priority']}. {wallet['currency'].upper()} on {wallet['network']} - {wallet['address'][:10]}...")
  ```

  ```typescript TypeScript theme={null} theme={null}
  interface WalletPriority {
    id: number;
    address: string;
    currency: string;
    network: string;
    priority: number;
  }

  async function getExternalWalletPriority(): Promise<WalletPriority[]> {
    const response = await fetch(
      'https://dev.api.baanx.com/v1/wallet/external/priority',
      {
        headers: {
          'x-client-key': 'YOUR_CLIENT_KEY',
          'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
        }
      }
    );

    return await response.json();
  }

  const priorities = await getExternalWalletPriority();
  const ordered = priorities.sort((a, b) => a.priority - b.priority);
  console.log('Withdrawal order:', ordered.map(w => w.network));
  ```
</CodeGroup>

## Related Endpoints

* [Update External Wallet Priority](/api-reference/wallet/external-priority-put) - Change the priority order
* [Get External Wallets](/api-reference/wallet/external) - View all registered external wallets
