Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

USDC and PYUSD on Coinbase Prime are acquired through Create Conversion, which bypasses the order book entirely. Conversions are instant, free, 1:1, and bidirectional, allowing movement between USD and USDC or USD and PYUSD in either direction.

Creating a Stablecoin Conversion

The following examples show how to create a conversion between USD and USDC.
TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);
  
CreateConversionRequest request = new CreateConversionRequest.Builder()  
    .portfolioId("PORTFOLIO_ID_HERE")  
    .walletId("WALLET_ID_HERE")  
    .amount("1")  
    .destination("DESTINATION_WALLET_UUID")  
    .idempotencyKey(UUID.randomUUID().toString())  
    .sourceSymbol("USD")  
    .destinationSymbol("USDC")  
    .build();  
  
CreateConversionResponse response = transactionsService.createConversion(request);  
For more information, please visit the Prime Java SDK.

Tracking a Stablecoin Conversion

Conversions are tracked via Get Transaction by ID. The process is identical to tracking a withdrawal. Simply look up the transaction by its ID. Typically, conversion transactions reach a terminal state within a few seconds.

TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);  
  
GetTransactionByTransactionIdRequest request = new GetTransactionByTransactionIdRequest.Builder()  
    .portfolioId("PORTFOLIO_ID_HERE")  
    .transactionId("TRANSACTION_ID_HERE")  
    .build();  
  
GetTransactionByTransactionIdResponse response = transactionsService.getTransactionByTransactionId(request);  
For more information, please visit the Prime Java SDK.