curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "getWithdrawalFeeQuote",
"network": "MAINNET",
"params": {
"amount_sats": 10000,
"onchain_address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}
}'
{
"method": "getWithdrawalFeeQuote",
"data": {
"id": "5c1a2b3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"total_amount": {
"original_value": 10000,
"original_unit": "SATOSHI"
},
"user_fee_fast": {
"original_value": 200,
"original_unit": "SATOSHI"
},
"user_fee_medium": {
"original_value": 150,
"original_unit": "SATOSHI"
},
"user_fee_slow": {
"original_value": 100,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_fast": {
"original_value": 50,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_medium": {
"original_value": 40,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_slow": {
"original_value": 30,
"original_unit": "SATOSHI"
},
"expires_at": "2025-07-24T17:43:12.509Z"
}
}
Spark BTC
getWithdrawalFeeQuote
Get a fee quote for withdrawing BTC from a Spark wallet to a Bitcoin L1 address.
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "getWithdrawalFeeQuote",
"network": "MAINNET",
"params": {
"amount_sats": 10000,
"onchain_address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}
}'
{
"method": "getWithdrawalFeeQuote",
"data": {
"id": "5c1a2b3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"total_amount": {
"original_value": 10000,
"original_unit": "SATOSHI"
},
"user_fee_fast": {
"original_value": 200,
"original_unit": "SATOSHI"
},
"user_fee_medium": {
"original_value": 150,
"original_unit": "SATOSHI"
},
"user_fee_slow": {
"original_value": 100,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_fast": {
"original_value": 50,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_medium": {
"original_value": 40,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_slow": {
"original_value": 30,
"original_unit": "SATOSHI"
},
"expires_at": "2025-07-24T17:43:12.509Z"
}
}
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "getWithdrawalFeeQuote",
"network": "MAINNET",
"params": {
"amount_sats": 10000,
"onchain_address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}
}'
{
"method": "getWithdrawalFeeQuote",
"data": {
"id": "5c1a2b3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"total_amount": {
"original_value": 10000,
"original_unit": "SATOSHI"
},
"user_fee_fast": {
"original_value": 200,
"original_unit": "SATOSHI"
},
"user_fee_medium": {
"original_value": 150,
"original_unit": "SATOSHI"
},
"user_fee_slow": {
"original_value": 100,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_fast": {
"original_value": 50,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_medium": {
"original_value": 40,
"original_unit": "SATOSHI"
},
"l1_broadcast_fee_slow": {
"original_value": 30,
"original_unit": "SATOSHI"
},
"expires_at": "2025-07-24T17:43:12.509Z"
}
}
Headers
string
required
ID of your Privy app.
string
Request authorization signature. If multiple signatures are required, they should be comma
separated.
string
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.
Path Parameters
string
required
ID of the wallet to get.
These wallet methods are modeled after the Spark Wallet
SDK. For more
information about this wallet method, check out the Spark Wallet
documentation.
Body
string
required
Must be set to
getWithdrawalFeeQuote.string
required
Blockchain network to use. Options:
MAINNET, REGTEST.object
required
Returns
enum<string>
required
Available options:
getWithdrawalFeeQuoteobject
required
A
CoopExitFeeQuote object with the following fields:Hide child attributes
Hide child attributes
string
required
The unique identifier of this fee quote.
string
required
The date and time when the quote was first created.
string
required
The date and time when the quote was last updated.
string
required
The network the coop exit fee quote is on.
object
required
object
required
object
required
object
required
object
required
object
required
object
required
string
required
The time when the fee quote expires.
Was this page helpful?
⌘I

