Create Wallet
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"symbol": "<string>",
"idempotency_key": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
payload = {
"name": "<string>",
"symbol": "<string>",
"idempotency_key": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
symbol: '<string>',
idempotency_key: '<string>',
network: {id: '<string>', type: '<string>'}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'symbol' => '<string>',
'idempotency_key' => '<string>',
'network' => [
'id' => '<string>',
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
.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::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"name": "<string>",
"symbol": "<string>",
"wallet_type": "VAULT",
"network_family": "NETWORK_FAMILY_EVM"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "PORTFOLIO_ID_INVALID",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "AUTH_RESOURCE_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
Create Wallet
Create a wallet. Note: The first ONCHAIN wallet for each network family must be created through the Prime UI.
POST
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
Create Wallet
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"symbol": "<string>",
"idempotency_key": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
payload = {
"name": "<string>",
"symbol": "<string>",
"idempotency_key": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
symbol: '<string>',
idempotency_key: '<string>',
network: {id: '<string>', type: '<string>'}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'symbol' => '<string>',
'idempotency_key' => '<string>',
'network' => [
'id' => '<string>',
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
.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::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"name": "<string>",
"symbol": "<string>",
"wallet_type": "VAULT",
"network_family": "NETWORK_FAMILY_EVM"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"subcode": "PORTFOLIO_ID_INVALID",
"trace_id": "<string>"
}{
"code": "PERMISSION_DENIED",
"message": "<string>",
"subcode": "AUTH_RESOURCE_ACCESS_DENIED",
"trace_id": "<string>"
}{
"code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"subcode": "AUTH_RESOURCE_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>"
}Supported TypesCurrently, this endpoint can be used only to create vault wallets and onchain wallets that do not require key generation. The first EVM and first Solana onchain wallet in a portfolio must be created prior to creating subsequent EVM or Solana wallets in a portfolio via API.
- Java
- .NET
- Go
- Python
- CLI
- TS/JS
WalletsService walletsService = PrimeServiceFactory.createWalletsService(client);
CreateWalletRequest request = new CreateWalletRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.type(WalletType.VAULT)
.name("PRIME_API_EXAMPLE")
.symbol("ETH")
.build();
CreateWalletResponse response = walletsService.createWallet(request);
var walletsService = new WalletsService(client);
var request = new CreateWalletRequest("PORTFOLIO_ID_HERE")
{
Type = WalletType.VAULT,
Name = "PRIME_API_EXAMPLE",
Symbol = "ETH",
}
var response = walletsService.CreateWallet(request);
walletsService := users.NewWalletsService(client)
request := &users.CreateWalletRequest{
PortfolioId: "PORTFOLIO_ID_HERE",
Type: "VAULT",
Name: "PRIME_API_EXAMPLE",
Symbol: "ETH",
}
response, err := walletsService.CreateWallet(context.Background(), request)
prime_client = PrimeClient(credentials)
request = CreateWalletRequest(
portfolio_id="PORTFOLIO_ID_HERE",
name="PRIME_API_EXAMPLE",
symbol="ETH",
wallet_type="VAULT",
)
response = prime_client.create_wallet(request)
primectl create-wallet --help
const walletsService = new WalletsService(client);
walletsService.getWalletDepositInstructions({
portfolioId: 'PORTFOLIO_ID_HERE',
type: WalletType.VAULT,
name: "PRIME_API_EXAMPLE",
symbol: "ETH",
}).then(async (response) => {
console.log('Wallet: ', response);
})
Path Parameters
Portfolio ID
Body
application/json
- 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 Available options:
NETWORK_FAMILY_EVM, NETWORK_FAMILY_SOLANA Show child attributes
Show child attributes
Response
A successful response.
- 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 Available options:
NETWORK_FAMILY_EVM, NETWORK_FAMILY_SOLANA Was this page helpful?