Onchain withdrawals are supported for all wallet types in Coinbase Prime. By default, all withdrawals require consensus approval in the Prime UI before completion. This ensures control over all withdrawal actions. For fully automated use cases, these approval requirements can be adjusted. All withdrawals are further governed by Prime’s address book.

Adding to the address book

By default, Coinbase Prime leverages an address book to prevent withdrawals to unknown or unauthorized destinations. New address entries can be submitted via Create Address Book Entry; however, each entry still requires consensus approval in the UI. If desired, the address book feature can be disabled in the UI for more streamlined workflows.

When submitting an address book entry, provide:

  1. A name for the address
  2. The address itself
  3. The asset (symbol) associated with that address

Prime will validate the address format to ensure it matches the specified asset. Currently, only the default network for each asset is supported, but additional network parameters may be enabled in a future release. For details on which networks are available, refer to Account Structure.

AddressBookService addressBookService = PrimeServiceFactory.createAddressBookService(client);

CreateAddressBookEntryRequest request = new CreateAddressBookEntryRequest.Builder("portfolio_id")
    .accountIdentifier("account_identifier")
    .address("address")
    .currencySymbol("currency_symbol")
    .name("name")
    .build();

CreateAddressBookEntryResponse response = addressBookService.createAddressBookEntry(request);

To learn more about this SDK, please visit the Prime Java SDK.

Creating a Crypto Withdrawal

Onchain crypto withdrawals to an allowlisted address are created via the Create Withdrawal endpoint. Specify the Wallet ID to withdraw from; for a refresher on obtaining Wallet IDs, see the Wallets page.

Even though withdrawals can be created through the API, the default behavior requires UI approval to finalize the transaction. The API response will include:

  • A Transaction ID, which can be used to track the transaction
  • An Activity ID specific to the consensus process in Prime
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();

CreateWithdrawalResponse response = transactionsService.createWithdrawal(request);

To learn more about this SDK, please visit the Prime Java SDK.

Tracking withdrawals

Use the Transaction ID returned by the Create Withdrawal endpoint to track the transaction’s status:

The transaction STATUS field in these responses indicates the current stage of withdrawal processing (e.g., pending approval, approved, completed).

TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);

GetTransactionByTransactionIdRequest request = new GetTransactionByTransactionIdRequest.Builder()
    .portfolioId("PORTFOLIO_ID_HERE")
    .transactionId("TRANSACTION_ID_HERE")
    .build();

GetTransactionByTransactionIdResponse response = transactionsService.getTransactionByTransactionId(request);

To learn more about this SDK, please visit the Prime Java SDK.

Fiat withdrawals

The Create Withdrawal endpoint can also be used to withdraw fiat. Before doing so, link a bank account in the Prime UI. Once linked, retrieve the bank account’s payment_method_id via the List Entity Payment Methods endpoint. This endpoint requires the entity ID, which can be found by following instructions in the Account Structure page.

Once the correct payment_method_id is obtained, call Create Withdrawal again, specifying the fiat amount, the payment method, and the destination type DESTINATION_PAYMENT_METHOD. For a straightforward example, see Create Withdrawal To Payment Method.

Please note: All requests discussed above require proper authentication. For more information, visit REST API Authentication.