Skip to main content
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
  • Java
  • .NET
  • Go
  • Python
  • CLI
  • TS/JS
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
wallet_id
string
required

Body

application/json
amount
string
required
Example:
destination
string
required
Example:
idempotency_key
string
required
Example:
source_symbol
string
required
Example:
destination_symbol
string
required
Example:

Response

activity_id
string
Example:
source_symbol
string
Example:
destination_symbol
string
Example:
amount
string
Example:
destination
string
Example:
source
string
Example:
transaction_id
string
Example: