POST
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
/
{wallet_id}
/
conversion
curl --request POST \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": "50.50",
  "destination": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9",
  "idempotency_key": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9",
  "source_symbol": "USD",
  "destination_symbol": "USDC"
}'
{
  "activity_id": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9",
  "source_symbol": "USD",
  "destination_symbol": "USDC",
  "amount": "50.50",
  "destination": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9",
  "source": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9",
  "transaction_id": "e84255eb-2e21-439e-a1d0-f5dd1e1292b9"
}

Supported Swaps

This endpoint supports the following conversions: USD <> USDC and USD <> PYUSD.

For more assistance on how to create and track conversions, visit the stablecoins concepts page.

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);

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.

Path Parameters

portfolio_id
string
required

The ID of the portfolio

wallet_id
string
required

The wallet ID that the conversion will originate from

Body

application/json

Response

200
application/json

A successful response.

The response is of type object.