Raw schema
{
"type": "object",
"properties": {
"pool_id": {
"type": "string",
"minLength": 8,
"maxLength": 80,
"description": "DefiLlama pool id, a UUID such as \"b99bcdf5-1350-4269-981e-0e9b5cccb007\", from find_active_pools or other_tiers. Send it alone"
},
"pool_address": {
"type": "string",
"minLength": 8,
"maxLength": 80,
"description": "Pool contract address. The open yields index has no pool contract addresses, so this always returns needs_tokens. Prefer pool_id, or chain with token_a and token_b"
},
"chain": {
"type": "string",
"minLength": 2,
"maxLength": 40,
"description": "Chain name or short alias, used with token_a and token_b: ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, solana, zksync, linea, gnosis, scroll, mantle, celo, sonic, or sui. Aliases such as eth, arb, op, bnb, matic, avax, and sol also work"
},
"token_a": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "First token symbol or contract address, such as \"WETH\" or \"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\". Needs chain and token_b"
},
"token_b": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Second token symbol or contract address, such as \"USDC\""
},
"holding_days": {
"type": "integer",
"minimum": 1,
"maximum": 365,
"description": "Holding window for the fee-versus-IL estimate. Requires price_lower, price_upper, and price_now"
},
"price_lower": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Lower price of the range, in quote per base"
},
"price_upper": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Upper price of the range, in quote per base"
},
"price_now": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Current price in the same units as the range"
},
"capital_usd": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Position size, so gas and exit cost can be compared with fees. Not stored as a record of who asked"
},
"gas_usd": {
"type": "number",
"minimum": 0,
"description": "Gas you expect to pay to enter and exit, in the same currency as capital_usd"
},
"exit_cost_usd": {
"type": "number",
"minimum": 0,
"description": "Other exit cost, such as a withdrawal fee, in the same currency as capital_usd"
}
},
"description": "Send pool_id alone, or chain plus token_a and token_b, for example {\"chain\": \"ethereum\", \"token_a\": \"WETH\", \"token_b\": \"USDC\"}. pool_address alone always returns needs_tokens.",
"additionalProperties": false
}