List Portfolio Wallets
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/walletsimport requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets', 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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
req, _ := http.NewRequest("GET", url, nil)
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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"wallets": [
{
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"type": "VAULT",
"created_at": "2023-11-07T05:31:56Z",
"address": "<string>",
"visibility": "WALLET_VISIBILITY_VISIBLE",
"network": {
"id": "<string>",
"type": "<string>"
}
}
],
"pagination": {
"next_cursor": "<string>",
"sort_direction": "DESC",
"has_next": true
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "PORTFOLIO_ID_REQUIRED",
"trace_id": "<string>"
}{
"code": "AUTHENTICATION_FAILED",
"message": "<string>",
"subcode": "AUTH_UNAUTHENTICATED",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "ASSET_NOT_FOUND",
"trace_id": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>",
"subcode": "SERVER_RATE_LIMIT_EXCEEDED",
"trace_id": "<string>"
}{
"code": "SERVICE_UNAVAILABLE",
"message": "<string>",
"subcode": "SERVER_MAINTENANCE_MODE_ACTIVE",
"trace_id": "<string>"
}Wallets
List Portfolio Wallets
List all wallets associated with a given portfolio.
GET
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
List Portfolio Wallets
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/walletsimport requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets', 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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
req, _ := http.NewRequest("GET", url, nil)
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.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"wallets": [
{
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"type": "VAULT",
"created_at": "2023-11-07T05:31:56Z",
"address": "<string>",
"visibility": "WALLET_VISIBILITY_VISIBLE",
"network": {
"id": "<string>",
"type": "<string>"
}
}
],
"pagination": {
"next_cursor": "<string>",
"sort_direction": "DESC",
"has_next": true
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "PORTFOLIO_ID_REQUIRED",
"trace_id": "<string>"
}{
"code": "AUTHENTICATION_FAILED",
"message": "<string>",
"subcode": "AUTH_UNAUTHENTICATED",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "ASSET_NOT_FOUND",
"trace_id": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>",
"subcode": "SERVER_RATE_LIMIT_EXCEEDED",
"trace_id": "<string>"
}{
"code": "SERVICE_UNAVAILABLE",
"message": "<string>",
"subcode": "SERVER_MAINTENANCE_MODE_ACTIVE",
"trace_id": "<string>"
}Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples
For more information, please visit the Prime Java SDK.For more information, please visit the Prime .NET SDK.For more information, please visit the Prime Go SDK.For more information, please visit the Prime Python SDK.For more information, please visit the Prime CLI.For more information, please visit the Prime TS SDK.
- Java
- .NET
- Go
- Python
- CLI
- TS/JS
WalletsService walletsService = PrimeServiceFactory.createWalletsService(client);
ListWalletsRequest request = new ListWalletsRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.type(WalletType.VAULT)
.build();
ListWalletsResponse response = walletsService.listWallets(request);
var walletsService = new WalletsService(client);
var request = new ListWalletsRequest("PORTFOLIO_ID_HERE")
{
Type = WalletType.VAULT,
}
var response = walletsService.ListWallets(request);
walletsService := users.NewWalletsService(client)
request := &users.ListWalletsRequest{
PortfolioId: "PORTFOLIO_ID_HERE",
Type: "VAULT",
}
response, err := walletsService.ListWallets(context.Background(), request)
prime_client = PrimeClient(credentials)
request = ListWalletsRequest(
portfolio_id="PORTFOLIO_ID_HERE",
type="VAULT",
)
response = prime_client.list_wallets(request)
primectl list-wallets --help
const walletsService = new WalletsService(client);
walletsService.listWallets({
portfolioId: 'PORTFOLIO_ID_HERE',
type: WalletType.VAULT,
}).then(async (response) => {
console.log('Wallets: ', response);
})
Path Parameters
The portfolio ID
Query Parameters
The wallet type
- VAULT: A crypto vault
- TRADING: A trading wallet
- WALLET_TYPE_OTHER: Other wallet types (like consumer, etc)
- QC: A QC Wallet
- ONCHAIN: An Onchain wallet
Available options:
VAULT, TRADING, WALLET_TYPE_OTHER, QC, ONCHAIN Cursor used for pagination (last consumed record)
Number of wallets to retrieve
Sorting order
Available options:
DESC, ASC The wallet symbol
Flag to request retrieval of all wallets across all networks for a given symbol
Was this page helpful?