POST
/
v1
/
portfolios
/
{portfolio_id}
/
wallets
/
{wallet_id}
/
conversion
Create 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 SwapsThis 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
amount
string
required

The amount in whole units to convert

Example:

"50.50"

destination
string
required

The UUID of the destination wallet

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"

idempotency_key
string
required

The idempotency key associated with this conversion

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"

source_symbol
string
required

The currency symbol to convert from

Example:

"USD"

destination_symbol
string
required

The currency symbol to convert to

Example:

"USDC"

Response

200 - application/json

A successful response.

activity_id
string

The activity ID for the conversion

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"

source_symbol
string

The currency symbol to convert from

Example:

"USD"

destination_symbol
string

The currency symbol to convert to

Example:

"USDC"

amount
string

The amount in whole units to convert

Example:

"50.50"

destination
string

The UUID of the destination wallet

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"

source
string

The UUID of the source wallet

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"

transaction_id
string

The UUID of the conversion transaction

Example:

"e84255eb-2e21-439e-a1d0-f5dd1e1292b9"