Get External Wallet Priority
curl --request GET \
--url https://api.example.com/v1/wallet/external/priority \
--header 'Authorization: <authorization>' \
--header 'x-client-key: <x-client-key>'import requests
url = "https://api.example.com/v1/wallet/external/priority"
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-key': '<x-client-key>', Authorization: '<authorization>'}
};
fetch('https://api.example.com/v1/wallet/external/priority', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/wallet/external/priority",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-client-key: <x-client-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/wallet/external/priority"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/wallet/external/priority")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/external/priority")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body[
{
"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
}
]
Wallet
Get External Wallet Priority
Retrieve the current priority order of external wallets for transaction funding
GET
/
v1
/
wallet
/
external
/
priority
Get External Wallet Priority
curl --request GET \
--url https://api.example.com/v1/wallet/external/priority \
--header 'Authorization: <authorization>' \
--header 'x-client-key: <x-client-key>'import requests
url = "https://api.example.com/v1/wallet/external/priority"
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-key': '<x-client-key>', Authorization: '<authorization>'}
};
fetch('https://api.example.com/v1/wallet/external/priority', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/wallet/external/priority",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-client-key: <x-client-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/wallet/external/priority"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/wallet/external/priority")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/external/priority")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body[
{
"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
}
]
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
string
required
Your public API client key
string
required
Bearer token for authentication
Response
number
Wallet priority identifier
string
Blockchain wallet address
string
Currency code (e.g., “usdc”, “usdt”)
string
Blockchain network (e.g., “linea”, “ethereum”, “solana”)
number
Current priority value (lower = higher priority)
[
{
"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
}
]
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"
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]}...")
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));
Related Endpoints
- Update External Wallet Priority - Change the priority order
- Get External Wallets - View all registered external wallets
Was this page helpful?