Swap Quotes
Swap Details Endpoint
Endpoint:
/swap/detailsDescription: This endpoint allows you to obtain the best exchange rate between two tokens and identify the best pool to perform the swap.
Response Includes:
Best pool for performing the swap.
amountInandamountOutvalues.Network fees and liquidity provider fees.
Price impact of the swap.
Important Notes:
Swap from Rune to BTC:
The
amountOutprovided by the/swap/detailsendpoint does not account for the network fees.You need to subtract the network fees from the
amountOutto get the correct amount to send to the endpoint.
Retrieves detailed information about a potential swap, including expected amounts and fees.
The fee rate for the transaction (in sats per byte).
The identifier of the first token. Format: 0:0
The identifier of the second token. Usually '0:0: (Bitcoin)
A boolean indicating whether to swap from token0 to token1.
A boolean indicating whether the swap is exact in.
^[1-9][0-9]*$An object containing detailed swap information such as expected amounts, price, price impact, fees, and pool ID.
The amount of input token to swap.
The amount of output token expected.
The price of the swap.
The price impact of the swap.
The identifier of the pool.
Pool error
Internal Server Error
GET /v0/pool/swap/details?feeRate=1&token0=text&token1=text&zeroToOne=true&exactIn=true&amount=text HTTP/1.1
Host: api-dev.saturnbtc.io
Accept: */*
{
"amountIn": "text",
"amountOut": "text",
"price": "text",
"priceImpact": "text",
"fees": {
"makers": "text",
"network": "text"
},
"poolId": "text"
}Last updated