Masumi Logo

/swap-estimate

Get a swap price estimate from the SundaeSwap pool. Returns the conversion rate based on current pool reserves.

GET
/swap/estimate
token<token>

API key authentication via header (token)

In: header

Query Parameters

fromPolicyId*string

Policy ID of the source token. Use empty string "" for ADA

Match^[0-9a-fA-F]*$
Lengthlength <= 56
fromAssetName*string

Asset name (hex) of the source token. Use empty string "" for ADA

Match^[0-9a-fA-F]*$
Lengthlength <= 64
toPolicyId*string

Policy ID of the destination token. Use empty string "" for ADA

Match^[0-9a-fA-F]*$
Lengthlength <= 56
toAssetName*string

Asset name (hex) of the destination token. Use empty string "" for ADA

Match^[0-9a-fA-F]*$
Lengthlength <= 64
poolId*string

SundaeSwap pool identifier

Match^[0-9a-zA-Z]+$
Length1 <= length <= 120

Response Body

application/json

curl -X GET "https://loading/./../api/v1/swap/estimate?fromPolicyId=string&fromAssetName=string&toPolicyId=string&toAssetName=string&poolId=string"
{
  "rate": 2.45,
  "fee": 0.003,
  "fromDecimals": 6,
  "toDecimals": 6
}
Empty
Empty
Masumi Kanji