Simulation
Pre-flight preview of an intent before signing (FR-4). Advisory; the on-chain hook re-asserts.
Simulate an intent and return the expected outcome (FR-4)
Authorization
sessionToken AuthorizationBearer <token>
Botanary session token from POST /auth/session. Not a key - a revocable session bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.app.botanary.xyz/simulation" \ -H "Content-Type: application/json" \ -d '{ "intentType": "send" }'{
"id": "string",
"intentType": "send",
"willSucceed": true,
"declineReason": "cap_exceeded",
"amountIn": {
"token": {
"symbol": "USDC",
"chainId": 42161,
"address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
},
"amount": 50
},
"amountOut": {
"token": {
"symbol": "USDC",
"chainId": 42161,
"address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
},
"amount": 50
},
"rate": 1.08,
"route": "USDC → EURC via Uniswap v3",
"slippageBps": 30,
"fees": [
{
"token": {
"symbol": "USDC",
"chainId": 42161,
"address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
},
"amount": 50
}
],
"gas": {
"method": "sponsored",
"cost": {
"token": {
"symbol": "USDC",
"chainId": 42161,
"address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
},
"amount": 50
},
"sponsored": true
},
"warnings": [
"string"
],
"expiresAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "Session token missing or expired."
}
}