Developer Guide
Fee Estimates
Learn how to estimate fees for different operations in your Spark wallet
Lightning Send Fee Estimates
To estimate fees for sending Lightning payments, use getLightningSendFeeEstimate
. This is useful before making a Lightning payment to understand the potential routing costs. PLease note: the actual fee asessed may be different the the fee estimate as it will be determined by the actual Lightning node routing.
Example feeEstimate
response:
Cooperative Exit Fee Estimates
When withdrawing funds back to the Bitcoin network (cooperative exit), you can estimate the associated fees using getCoopExitFeeEstimate
:
Example exitFeeEstimate
response:
Understanding Fee Components
Fee Estimate Fields
originalValue
: The fee amount in the original unit (SATOSHI)originalUnit
: The unit of the original value (always ‘SATOSHI’)preferredCurrencyUnit
: The converted currency unit (e.g., ‘USD’)preferredCurrencyValueRounded
: The rounded value in preferred currencypreferredCurrencyValueApprox
: The approximate value in preferred currency
Best Practices
- Monitor fee variations during different network conditions
- Include fee estimates in your transaction planning
Next Steps
After understanding fee estimates, you can:
Need Help?
- Check our FAQ
- Review the API Reference
- Join our Discord community