Estimate Swap
Preview the price, fees, and amounts for a swap without placing it.
Inputs: src_asset, dst_asset, and exactly one of
req_spend_amount (how much of src_asset to spend) or
req_get_amount (how much of dst_asset to receive). For
a buy set src_asset="AUD" and dst_asset to the crypto
code; for a sell set src_asset to the crypto code and
dst_asset="AUD".
Returns the estimated price, per-asset fees (src_fee,
dst_fee), estimated amounts, and estimated_price_exact.
No funds are moved.
This is a mandatory preview step before create. Pass the
returned estimated_price_exact as expected_price on
create for slippage protection.
Authorizations
Personal API key, created in the Digital Surge app under Account Settings → API Keys. Send it with every request as Authorization: Bearer <your-api-key>.
Body
A swap quote: the estimated price, per-asset fees, and amounts for a proposed swap. No funds move.
Response
A swap quote: the estimated price, per-asset fees, and amounts for a proposed swap. No funds move.
Net amount, after subtracting the fee
Total amount, incl. the fee