Transactions
Create Withdrawal
REST API
- Introduction
- Requests
- Rate Limits
- Authentication
- Pagination
- CLI Setup
- Activities
- Address Book
- Allocations
- Assets
- Balances
- Commission
- Financing
- Futures
- Invoices
- Onchain Address Book
- Onchain Address Groups
- Orders
- Payment Methods
- Portfolios
- Positions
- Products
- Staking
- Transactions
- Users
- Wallets
FIX API
Transactions
Create Withdrawal
Create a withdrawal.
POST
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
/
{wallet_id}
/
withdrawals
Copy
Ask AI
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>",
"destination_type": "UNKNOWN_DESTINATION",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": {
"payment_method_id": "<string>"
},
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
}'
Copy
Ask AI
{
"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>"
}
},
"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
Copy
Ask AI
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);
For more information, please visit the Prime Java SDK.
Copy
Ask AI
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);
For more information, please visit the Prime Java SDK.
Copy
Ask AI
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);
For more information, please visit the Prime .NET SDK.
Copy
Ask AI
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)
For more information, please visit the Prime Go SDK.
Copy
Ask AI
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)
For more information, please visit the Prime Python SDK.
Copy
Ask AI
primectl create-withdrawal --help
For more information, please visit the Prime CLI.
Copy
Ask AI
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);
})
For more information, please visit the Prime TS SDK.
Body
application/json
Response
200
application/json
A successful response.
The response is of type object
.
Was this page helpful?
Copy
Ask AI
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>",
"destination_type": "UNKNOWN_DESTINATION",
"idempotency_key": "<string>",
"currency_symbol": "<string>",
"payment_method": {
"payment_method_id": "<string>"
},
"blockchain_address": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
}
}'
Copy
Ask AI
{
"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>"
}
},
"blockchain_source": {
"address": "<string>",
"account_identifier": "<string>",
"network": {
"id": "<string>",
"type": "<string>"
}
},
"transaction_id": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.