1inch-agent-kit
Version:
AI Agent Kit for 1inch - Connect any LLM to 1inch DeFi protocols
70 lines • 2.3 kB
JSON
{
"name": "spotPriceAPI",
"description": "Get real-time token price data from 1inch Spot Price API. This function provides current token prices across various blockchains. ALWAYS provide both 'endpoint' and 'chain' parameters - they are mandatory.",
"parameters": {
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"enum": ["getWhitelistedPrices", "getRequestedPrices", "getCurrencies", "getPricesForAddresses"],
"description": "REQUIRED: The spot price API endpoint to call",
"examples": [
{
"value": "getWhitelistedPrices",
"description": "Get prices for all whitelisted tokens on the chain"
},
{
"value": "getRequestedPrices",
"description": "Get prices for specific tokens (requires tokens array)"
},
{
"value": "getCurrencies",
"description": "Get list of supported currencies"
},
{
"value": "getPricesForAddresses",
"description": "Get prices for multiple token addresses (requires addresses array)"
}
]
},
"chain": {
"type": "number",
"description": "REQUIRED: Chain ID for the blockchain network",
"enum": [1, 10, 56, 100, 137, 324, 42161, 43114, 8453, 7565164],
"examples": [
{
"value": 1,
"description": "Ethereum Mainnet"
},
{
"value": 137,
"description": "Polygon"
},
{
"value": 42161,
"description": "Arbitrum One"
}
]
},
"tokens": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of token addresses (required for getRequestedPrices endpoint)"
},
"addresses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of token addresses (required for getPricesForAddresses endpoint)"
},
"currency": {
"type": "string",
"description": "Optional currency code (e.g., 'USD'). If not provided, prices returned in native Wei"
}
},
"required": ["endpoint", "chain"]
}
}