curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/deposit_accounts/crypto \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"type": "inline_route",
"source": {
"mode": "include",
"values": [
{
"asset": "ousd",
"chain": "tempo"
}
]
},
"destination": {
"asset": "pathusd",
"chain": "tempo"
},
"deposit_address_strategy": "prefer_destination"
}
'{
"deposit_accounts": [
{
"wallet_id": "clg2rvssg025ny5fmul5m95fn",
"deposit_address": "0xF1ff9379AB5838C42D0E9F1AFe32614211788Aae",
"source": {
"mode": "include",
"values": [
{
"asset": "ousd",
"chain": "tempo"
}
]
},
"destination": {
"asset": "pathusd",
"chain": "tempo"
}
}
]
}Create crypto deposit account
Create reusable crypto deposit addresses that convert incoming funds into a target asset.
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/deposit_accounts/crypto \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"type": "inline_route",
"source": {
"mode": "include",
"values": [
{
"asset": "ousd",
"chain": "tempo"
}
]
},
"destination": {
"asset": "pathusd",
"chain": "tempo"
},
"deposit_address_strategy": "prefer_destination"
}
'{
"deposit_accounts": [
{
"wallet_id": "clg2rvssg025ny5fmul5m95fn",
"deposit_address": "0xF1ff9379AB5838C42D0E9F1AFe32614211788Aae",
"source": {
"mode": "include",
"values": [
{
"asset": "ousd",
"chain": "tempo"
}
]
},
"destination": {
"asset": "pathusd",
"chain": "tempo"
}
}
]
}Deposit address strategy
inline_route and deposit_config requests. Defaults to
dedicated, including when a route already exists.dedicated: Always use a separate source wallet. Privy reuses or creates one for the depositing user.prefer_destination: Use the destination wallet’s own address for its chain family. If the destination wallet was exported, use a separate source wallet.require_destination: Use the destination wallet’s own address for its chain family. If the destination wallet was exported, the request fails.
{
"type": "deposit_config",
"deposit_config_id": "<deposit-config-id>",
"deposit_address_strategy": "prefer_destination"
}
deposit_address_strategy when provided. Do not add a default value after signing.
For source wallet reuse, exported wallets, attached automations, and address changes, see Deposit address behavior.Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.
Idempotency keys ensure API requests are executed only once within a 24-hour window.
Path Parameters
ID of the wallet.
Body
- CreateCryptoDepositAccountWithConfigRequestBody
- CreateCryptoDepositAccountWithRouteRequestBody
Creates a crypto deposit account from an existing deposit configuration.
deposit_config 1How deposit source wallets are chosen. Omission uses dedicated. Destination reuse applies only to the destination's own chain type.
dedicated, prefer_destination, require_destination "dedicated"
Response
The created crypto deposit account.
Response returned after creating a crypto deposit account.
Show child attributes
Show child attributes
Was this page helpful?

