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": "DESTINATION_PAYMENT_METHOD",
"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>"
}
}'
{
"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>"
}
Create a 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>",
"destination_type": "DESTINATION_PAYMENT_METHOD",
"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>"
}
}'
{
"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
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.
A successful response.
The response is of type object
.
Was this page helpful?