getSafeSlippage
InvokeEstimate safe slippage tolerance for a given swap route
Input Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token_in": {
"type": "string",
"minLength": 1
},
"token_out": {
"type": "string",
"minLength": 1
},
"amount_in": {
"type": "number",
"exclusiveMinimum": 0
},
"route_hint": {
"type": "string"
}
},
"required": [
"token_in",
"token_out",
"amount_in"
],
"additionalProperties": false
}
Output Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"min_safe_slip_bps": {
"type": "number"
},
"pool_depths": {
"type": "number"
},
"recent_trade_size_p95": {
"type": "number"
},
"volatility_index": {
"type": "number"
},
"error": {
"type": "string"
}
},
"additionalProperties": false
}
Invoke with curl
curl -s -X POST \
'https://slippage-sentinel.vercel.app/entrypoints/getSafeSlippage/invoke' \
-H 'Content-Type: application/json' \
-d '
{
"input": {
"token_in": "string",
"token_out": "string",
"amount_in": 0,
"route_hint": "string"
}
}
'