POST
/
v1
/
swap
/
simulate
Simulate Swap
curl --request POST \
  --url https://api.amm.flashnet.xyz/v1/swap/simulate \
  --header 'Content-Type: application/json' \
  --data '{
  "amountIn": 100000000,
  "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",
  "assetOutAddress": "03usdstablecoinpubkey111111111111111111111111111111111111111111111",
  "integratorBps": 25,
  "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
}'
{
"amountOut": 4950000,
"executionPrice": "0.00004950",
"feePaidAssetIn": 50000,
"priceImpactPct": "0.51%",
"warningMessage": null
}

Body

application/json

Swap simulation parameters including pool, assets, and amount

Request body for simulating a swap without executing it.

Simulation allows users to preview swap outcomes including expected output, price impact, and fees before committing to the transaction.

Response

200
application/json

Simulation completed successfully

Response from swap simulation with expected outcomes.