Create Withdrawal
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": {
"payment_method_id": "<string>"
},
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty": {
"counterparty_id": "<string>"
},
"travel_rule_data": {
"beneficiary": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"originator": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"is_self": true,
"is_intermediary": true,
"opt_out_of_ownership_verification": true,
"attest_verified_wallet_ownership": true
}
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals"
payload = {
"amount": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": { "payment_method_id": "<string>" },
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty": { "counterparty_id": "<string>" },
"travel_rule_data": {
"beneficiary": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"originator": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"is_self": True,
"is_intermediary": True,
"opt_out_of_ownership_verification": True,
"attest_verified_wallet_ownership": True
}
}
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: '<string>',
idempotency_key: '<string>',
currency_symbol: '<string>',
payment_method: {payment_method_id: '<string>'},
blockchain_address: {
address: '<string>',
account_identifier: '<string>',
network: {id: '<string>', type: '<string>'}
},
counterparty: {counterparty_id: '<string>'},
travel_rule_data: {
beneficiary: {
name: '<string>',
natural_person_name: {first_name: '<string>', middle_name: '<string>', last_name: '<string>'},
address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
},
vasp_id: '<string>',
vasp_name: '<string>',
personal_id: '<string>',
date_of_birth: {year: 123, month: 123, day: 123},
telephone_number: '<string>',
account_id: '<string>',
vasp_address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
},
originator: {
name: '<string>',
natural_person_name: {first_name: '<string>', middle_name: '<string>', last_name: '<string>'},
address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
},
vasp_id: '<string>',
vasp_name: '<string>',
personal_id: '<string>',
date_of_birth: {year: 123, month: 123, day: 123},
telephone_number: '<string>',
account_id: '<string>',
vasp_address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
},
is_self: true,
is_intermediary: true,
opt_out_of_ownership_verification: true,
attest_verified_wallet_ownership: true
}
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals', 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}/withdrawals",
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' => '<string>',
'idempotency_key' => '<string>',
'currency_symbol' => '<string>',
'payment_method' => [
'payment_method_id' => '<string>'
],
'blockchain_address' => [
'address' => '<string>',
'account_identifier' => '<string>',
'network' => [
'id' => '<string>',
'type' => '<string>'
]
],
'counterparty' => [
'counterparty_id' => '<string>'
],
'travel_rule_data' => [
'beneficiary' => [
'name' => '<string>',
'natural_person_name' => [
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>'
],
'address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
],
'vasp_id' => '<string>',
'vasp_name' => '<string>',
'personal_id' => '<string>',
'date_of_birth' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'telephone_number' => '<string>',
'account_id' => '<string>',
'vasp_address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'originator' => [
'name' => '<string>',
'natural_person_name' => [
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>'
],
'address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
],
'vasp_id' => '<string>',
'vasp_name' => '<string>',
'personal_id' => '<string>',
'date_of_birth' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'telephone_number' => '<string>',
'account_id' => '<string>',
'vasp_address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'is_self' => true,
'is_intermediary' => true,
'opt_out_of_ownership_verification' => true,
'attest_verified_wallet_ownership' => true
]
]),
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}/withdrawals"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\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/{wallet_id}/withdrawals")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals")
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\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"approval_url": "<string>",
"symbol": "<string>",
"amount": "<string>",
"fee": "<string>",
"destination_type": "<string>",
"source_type": "<string>",
"blockchain_destination": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty_destination": {
"counterparty_id": "<string>"
},
"blockchain_source": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"transaction_id": "<string>"
}Transactions
Create Withdrawal
Create a withdrawal.
POST
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
/
{wallet_id}
/
withdrawals
Create Withdrawal
curl --request POST \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": {
"payment_method_id": "<string>"
},
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty": {
"counterparty_id": "<string>"
},
"travel_rule_data": {
"beneficiary": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"originator": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"is_self": true,
"is_intermediary": true,
"opt_out_of_ownership_verification": true,
"attest_verified_wallet_ownership": true
}
}
'import requests
url = "https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals"
payload = {
"amount": "<string>",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": { "payment_method_id": "<string>" },
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty": { "counterparty_id": "<string>" },
"travel_rule_data": {
"beneficiary": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"originator": {
"name": "<string>",
"natural_person_name": {
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
},
"vasp_id": "<string>",
"vasp_name": "<string>",
"personal_id": "<string>",
"date_of_birth": {
"year": 123,
"month": 123,
"day": 123
},
"telephone_number": "<string>",
"account_id": "<string>",
"vasp_address": {
"address_1": "<string>",
"address_2": "<string>",
"address_3": "<string>",
"city": "<string>",
"state": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
},
"is_self": True,
"is_intermediary": True,
"opt_out_of_ownership_verification": True,
"attest_verified_wallet_ownership": True
}
}
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: '<string>',
idempotency_key: '<string>',
currency_symbol: '<string>',
payment_method: {payment_method_id: '<string>'},
blockchain_address: {
address: '<string>',
account_identifier: '<string>',
network: {id: '<string>', type: '<string>'}
},
counterparty: {counterparty_id: '<string>'},
travel_rule_data: {
beneficiary: {
name: '<string>',
natural_person_name: {first_name: '<string>', middle_name: '<string>', last_name: '<string>'},
address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
},
vasp_id: '<string>',
vasp_name: '<string>',
personal_id: '<string>',
date_of_birth: {year: 123, month: 123, day: 123},
telephone_number: '<string>',
account_id: '<string>',
vasp_address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
},
originator: {
name: '<string>',
natural_person_name: {first_name: '<string>', middle_name: '<string>', last_name: '<string>'},
address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
},
vasp_id: '<string>',
vasp_name: '<string>',
personal_id: '<string>',
date_of_birth: {year: 123, month: 123, day: 123},
telephone_number: '<string>',
account_id: '<string>',
vasp_address: {
address_1: '<string>',
address_2: '<string>',
address_3: '<string>',
city: '<string>',
state: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
},
is_self: true,
is_intermediary: true,
opt_out_of_ownership_verification: true,
attest_verified_wallet_ownership: true
}
})
};
fetch('https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals', 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}/withdrawals",
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' => '<string>',
'idempotency_key' => '<string>',
'currency_symbol' => '<string>',
'payment_method' => [
'payment_method_id' => '<string>'
],
'blockchain_address' => [
'address' => '<string>',
'account_identifier' => '<string>',
'network' => [
'id' => '<string>',
'type' => '<string>'
]
],
'counterparty' => [
'counterparty_id' => '<string>'
],
'travel_rule_data' => [
'beneficiary' => [
'name' => '<string>',
'natural_person_name' => [
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>'
],
'address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
],
'vasp_id' => '<string>',
'vasp_name' => '<string>',
'personal_id' => '<string>',
'date_of_birth' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'telephone_number' => '<string>',
'account_id' => '<string>',
'vasp_address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'originator' => [
'name' => '<string>',
'natural_person_name' => [
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>'
],
'address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
],
'vasp_id' => '<string>',
'vasp_name' => '<string>',
'personal_id' => '<string>',
'date_of_birth' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'telephone_number' => '<string>',
'account_id' => '<string>',
'vasp_address' => [
'address_1' => '<string>',
'address_2' => '<string>',
'address_3' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'is_self' => true,
'is_intermediary' => true,
'opt_out_of_ownership_verification' => true,
'attest_verified_wallet_ownership' => true
]
]),
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}/withdrawals"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\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/{wallet_id}/withdrawals")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals")
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\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"currency_symbol\": \"<string>\",\n \"payment_method\": {\n \"payment_method_id\": \"<string>\"\n },\n \"blockchain_address\": {\n \"address\": \"<string>\",\n \"account_identifier\": \"<string>\",\n \"network\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n },\n \"counterparty\": {\n \"counterparty_id\": \"<string>\"\n },\n \"travel_rule_data\": {\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"originator\": {\n \"name\": \"<string>\",\n \"natural_person_name\": {\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"vasp_id\": \"<string>\",\n \"vasp_name\": \"<string>\",\n \"personal_id\": \"<string>\",\n \"date_of_birth\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"telephone_number\": \"<string>\",\n \"account_id\": \"<string>\",\n \"vasp_address\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"address_3\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n },\n \"is_self\": true,\n \"is_intermediary\": true,\n \"opt_out_of_ownership_verification\": true,\n \"attest_verified_wallet_ownership\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"activity_id": "<string>",
"approval_url": "<string>",
"symbol": "<string>",
"amount": "<string>",
"fee": "<string>",
"destination_type": "<string>",
"source_type": "<string>",
"blockchain_destination": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"counterparty_destination": {
"counterparty_id": "<string>"
},
"blockchain_source": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"transaction_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
TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);
CreateWithdrawalRequest request = new CreateWithdrawalRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.walletId("WALLET_ID_HERE")
.amount("0.001")
.destinationType(DestinationType.DESTINATION_BLOCKCHAIN)
.idempotencyKey(UUID.randomUUID().toString())
.currencySymbol("ETH")
.blockchainAddress(new BlockchainAddress.Builder()
.address("DESTINATION_WALLET_ADDRESS")
.build())
.build();
CreateWithdrawalResponse response = transactionsService.createWithdrawal(request);
var transactionsService = new TransactionsService(client);
var request = new CreateWithdrawalRequest("PORTFOLIO_ID_HERE", "WALLET_ID_HERE")
{
Amount = "0.001",
DestinationType = DestinationType.DESTINATION_BLOCKCHAIN,
IdempotencyKey = Guid.NewGuid().ToString(),
CurrencySymbol = "ETH",
BlockchainAddress = new BlockchainAddress
{
Address = "DESTINATION_WALLET_ADDRESS",
},
};
var response = transactionsService.CreateWithdrawal(request);
transactionsService := transactions.NewTransactionsService(client)
request := &transactions.CreateWalletWithdrawalRequest{
PortfolioId: "PORTFOLIO_ID_HERE",
WalletId: "WALLET_ID_HERE",
Amount: "0.001",
DestinationType: "DESTINATION_BLOCKCHAIN",
IdempotencyKey: uuid.New().String(),
Symbol: "ETH",
BlockchainAddress: &transactions.BlockchainAddress{
Address: "DESTINATION_WALLET_ADDRESS",
},
}
response, err := transactionsService.CreateWalletWithdrawal(context.Background(), request)
prime_client = PrimeClient(credentials)
request = CreateWithdrawalRequest(
portfolio_id="PORTFOLIO_ID_HERE",
wallet_id="WALLET_ID_HERE",
amount = '0.001',
destination_type = 'DESTINATION_BLOCKCHAIN',
idempotency_key = str(uuid.uuid4()),
currency_symbol = 'ETH',
blockchain_address = BlockchainAddress(
address='DESTINATION_WALLET_ADDRESS',
),
)
response = prime_client.create_withdrawal(request)
primectl create-withdrawal --help
const transactionsService = new TransactionsService(client);
transactionsService.createWithdrawal({
portfolioId: 'PORTFOLIO_ID_HERE',
walletId: 'WALLET_ID_HERE',
amount: "0.001",
idempotencyKey: uuidv4(),
currencySymbol: "ETH",
destinationType: DestinationType.DestinationBlockchain,
blockchainAddress: {
address: 'DESTINATION_WALLET_ADDRESS',
}
}).then(async (response) => {
console.log('Withdrawal: ', response);
})
Body
application/json
The amount in whole units of the withdrawal
Available options:
DESTINATION_PAYMENT_METHOD, DESTINATION_BLOCKCHAIN, DESTINATION_WALLET, DESTINATION_COUNTERPARTY The idempotency key associated with the withdrawal
The currency symbol for the withdrawal
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Data object used for withdrawals.
Show child attributes
Show child attributes
Response
200 - application/json
A successful response.
The activity ID associated with the withdrawal
A URL to the activity in the Prime application
The currency symbol associated with the withdrawal
The amount of the withdrawal
The network fee associated with the withdrawal
The destination type used for the withdrawal
The source type used for the withdrawal
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The id of the just created transaction
Was this page helpful?
⌘I