curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1.0001",
"destination": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers"
payload = {
"amount": "1.0001",
"destination": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<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({
amount: '1.0001',
destination: '<string>',
idempotency_key: '<string>',
currency_symbol: '<string>'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers', 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/{wallet_id}/transfers",
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([
'amount' => '1.0001',
'destination' => '<string>',
'idempotency_key' => '<string>',
'currency_symbol' => '<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/{wallet_id}/transfers"
payload := strings.NewReader("{\n \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\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/{wallet_id}/transfers")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers")
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 \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"approval_url": "<string>",
"symbol": "<string>",
"amount": "<string>",
"fee": "<string>",
"destination_address": "<string>",
"destination_type": "<string>",
"source_address": "<string>",
"source_type": "<string>",
"transaction_id": "<string>"
}{
"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": "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>"
}Create Transfer
Create a wallet transfer.
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1.0001",
"destination": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>"
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers"
payload = {
"amount": "1.0001",
"destination": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<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({
amount: '1.0001',
destination: '<string>',
idempotency_key: '<string>',
currency_symbol: '<string>'
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers', 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/{wallet_id}/transfers",
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([
'amount' => '1.0001',
'destination' => '<string>',
'idempotency_key' => '<string>',
'currency_symbol' => '<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/{wallet_id}/transfers"
payload := strings.NewReader("{\n \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\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/{wallet_id}/transfers")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers")
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 \"amount\": \"1.0001\",\n \"destination\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"approval_url": "<string>",
"symbol": "<string>",
"amount": "<string>",
"fee": "<string>",
"destination_address": "<string>",
"destination_type": "<string>",
"source_address": "<string>",
"source_type": "<string>",
"transaction_id": "<string>"
}{
"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": "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>"
}deposit_type=CRYPTO for the destination wallet and network. Create Transfer looks up an existing deposit address and does not create one.- Java
- .NET
- Go
- Python
- CLI
- TS/JS
TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);
CreateTransferRequest request = new CreateTransferRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.walletId("WALLET_ID_HERE")
.amount("0.001")
.destination("DESTINATION_WALLET_UUID")
.idempotencyKey(UUID.randomUUID().toString())
.currencySymbol("ETH")
.build();
CreateTransferResponse response = transactionsService.createTransfer(request);
var transactionsService = new TransactionsService(client);
var request = new CreateTransferRequest("PORTFOLIO_ID_HERE", "WALLET_ID_HERE")
{
Amount = "0.001",
Destination = "DESTINATION_WALLET_UUID",
IdempotencyKey = Guid.NewGuid().ToString(),
CurrencySymbol = "ETH",
};
var response = transactionsService.CreateTransfer(request);
transactionsService := transactions.NewTransactionsService(client)
request := &transactions.CreateWalletTransferRequest{
PortfolioId: "PORTFOLIO_ID_HERE",
WalletId: "WALLET_ID_HERE",
Amount: "0.001",
Destination: "DESTINATION_WALLET_UUID",
IdempotencyKey: uuid.New().String(),
CurrencySymbol: "ETH",
}
response, err := transactionsService.CreateWalletTransfer(context.Background(), request)
prime_client = PrimeClient(credentials)
request = CreateTransferRequest(
portfolio_id="PORTFOLIO_ID_HERE",
wallet_id="WALLET_ID_HERE",
amount = '0.001',
destination = 'DESTINATION_WALLET_UUID',
idempotency_key = str(uuid.uuid4()),
currency_symbol = 'ETH',
)
response = prime_client.create_transfer(request)
primectl create-transfer --help
const transactionsService = new TransactionsService(client);
transactionsService.createTransfer({
portfolioId: 'PORTFOLIO_ID_HERE',
walletId: 'WALLET_ID_HERE',
amount: "0.001",
destination: "DESTINATION_WALLET_UUID",
idempotencyKey: uuidv4(),
currencySymbol: "ETH",
}).then(async (response) => {
console.log('Transfer: ', response);
})
Path Parameters
The portfolio ID
The wallet ID that the transfer will originate from
Body
The amount in whole units to transfer. For example, "1.50" represents 1.5 of the wallet's asset.
Examples:
- "100"
- "1.123456" (precision varies by asset; USDC, for example, supports up to 6 decimal places)
- "0.50"
"1.0001"
The UUID of the destination wallet
The idempotency key associated with this transfer
The currency symbol to transfer
Response
A successful response.
The activity ID for the transfer
A URL to the activity associated with this transfer for approval
The currency symbol of the transfer
The amount of the transfer
The network fee associated with the transfer
The destination address of the transfer
The destination type of the transfer
The source address used for the transfer
The source type used for the transfer
The id of the just created transaction
Was this page helpful?