Quote
API Endpoint: /quote
Request Method: GET
Description: This API returns the output amount, minimum output amount and price impact for a given input amount and a specified provider, along with the source and destination mints and the slippage.
Request URL:
https://api.spiderswap.io/spider-api/v1/quote
Request Headers:
accept: application/json
X-API-KEY: YOUR_API_KEY
Example Request:
curl --request GET \
--url 'https://api.spiderswap.io/spider-api/v1/quote?fromMint=So11111111111111111111111111111111111111112&toMint=AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY&amount=1000000&slippage=100&provider=raydium' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'accept: text/plain'
Response: An object with properties of inputMint, inAmount, outputMint, outAmount, minimumReceived, slippage and priceImpactPercent.
Example Response:
{
success: true,
data: {
inputMint: 'So11111111111111111111111111111111111111112',
inAmount: '100000',
outputMint: 'AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY',
outAmount: '742975356',
minimumReceived: '728115849',
slippage: 200,
priceImpactPercent: '0.0131272710219024683117714326'
}
}
Updated 7 months ago