Skip to main content
POST
/
api
/
private
/
swaps
/
estimate
/
Estimate Swap
curl --request POST \
  --url https://app.digitalsurge.com.au/api/private/swaps/estimate/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "src_asset": "<string>",
  "dst_asset": "<string>"
}
'
{
  "src_asset": "<string>",
  "dst_asset": "<string>",
  "src_fee": "<string>",
  "dst_fee": "<string>",
  "estimated_price": "<string>",
  "estimated_price_exact": "<string>",
  "est_sell_amount": "<string>",
  "est_buy_amount": "<string>",
  "estimate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slippage": "<string>",
  "req_get_amount": "<string>",
  "req_spend_amount": "<string>"
}

Authorizations

Authorization
string
header
required

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.

src_asset
string
required
Minimum string length: 1
dst_asset
string
required
Minimum string length: 1
req_get_amount
string<decimal> | null

Net amount, after subtracting the fee

req_spend_amount
string<decimal> | null

Total amount, incl. the fee

Response

200 - application/json

A swap quote: the estimated price, per-asset fees, and amounts for a proposed swap. No funds move.

src_asset
string
required
dst_asset
string
required
src_fee
string<decimal> | null
required
read-only
dst_fee
string<decimal> | null
required
read-only
estimated_price
string<decimal>
required
read-only
estimated_price_exact
string<decimal>
required
read-only
est_sell_amount
string
required
read-only
est_buy_amount
string
required
read-only
estimate_id
string<uuid>
required
read-only
slippage
string<decimal>
required
read-only
req_get_amount
string<decimal> | null

Net amount, after subtracting the fee

req_spend_amount
string<decimal> | null

Total amount, incl. the fee