|
7 | 7 |
|
8 | 8 | @tool() |
9 | 9 | def show_defi_llama_protocol(protocol_slug: str) -> Dict[str, Any]: |
10 | | - """Get details for a DeFi protocol by slug""" |
| 10 | + """ |
| 11 | + Get details for a DeFi protocol by slug |
| 12 | + """ |
11 | 13 | return defillama.get_protocol(protocol_slug) |
12 | 14 |
|
13 | 15 |
|
14 | 16 | @tool() |
15 | 17 | def show_defi_llama_pool(pool_id: str) -> Dict[str, Any]: |
16 | | - """Get details for a DeFi pool by ID""" |
| 18 | + """ |
| 19 | + Get details for a DeFi pool by ID |
| 20 | + """ |
17 | 21 | return defillama.get_pool(pool_id) |
18 | 22 |
|
19 | 23 |
|
20 | 24 | @tool() |
21 | 25 | def show_defi_llama_global_tvl() -> Dict[str, Any]: |
22 | | - """Get current global TVL across all DeFi protocols""" |
| 26 | + """ |
| 27 | + Get current global TVL across all DeFi protocols |
| 28 | + """ |
23 | 29 | tvl = defillama.get_global_tvl() |
24 | 30 | return {"global_tvl": tvl} |
25 | 31 |
|
26 | 32 |
|
27 | 33 | @tool() |
28 | 34 | def show_defi_llama_chain_tvl(chain: str) -> Dict[str, Any]: |
29 | | - """Get TVL for a specific blockchain""" |
| 35 | + """ |
| 36 | + Get TVL for a specific chain |
| 37 | + """ |
30 | 38 | tvl = defillama.get_chain_tvl(chain) |
31 | 39 | return {"chain": chain, "tvl": tvl} |
32 | 40 |
|
33 | 41 |
|
34 | 42 | @tool() |
35 | 43 | def show_defi_llama_top_pools(chain: str = None, limit: int = 10, min_tvl: float = 500000, max_apy: float = 1000) -> List[Dict[str, Any]]: |
36 | | - """Get top DeFi pools ranked by APY with TVL filters |
37 | | - |
38 | | - Args: |
39 | | - chain: Filter by blockchain (e.g., Solana, Ethereum) |
40 | | - limit: Maximum pools to return (default: 10) |
41 | | - min_tvl: Minimum TVL in USD (default: 500k) |
42 | | - max_apy: Maximum APY percentage (default: 1000%) |
| 44 | + """ |
| 45 | + Get top DeFi pools ranked by APY with TVL filters |
43 | 46 | """ |
44 | 47 | return defillama.get_top_pools(chain, limit, min_tvl, max_apy) |
45 | 48 |
|
46 | 49 |
|
47 | 50 | @tool() |
48 | | -def show_defi_llama_historical_global_tvl(num_months: int = 3) -> Dict[str, Any]: |
49 | | - """Get historical TVL data for all DeFi protocols |
50 | | - |
51 | | - Args: |
52 | | - num_months: Number of months of history (default: 3) |
| 51 | +def show_defi_llama_historical_global_tvl(num_months: int = 12) -> Dict[str, Any]: |
| 52 | + """ |
| 53 | + Get historical TVL data for all DeFi protocols |
53 | 54 | """ |
54 | 55 | return defillama.get_historical_global_tvl(num_months) |
55 | 56 |
|
56 | 57 |
|
57 | 58 | @tool() |
58 | | -def show_defi_llama_historical_chain_tvl(chain: str, num_months: int = 3) -> Dict[str, Any]: |
59 | | - """Get historical TVL data for a specific blockchain |
60 | | - |
61 | | - Args: |
62 | | - chain: Target blockchain name |
63 | | - num_months: Number of months of history (default: 3) |
| 59 | +def show_defi_llama_historical_chain_tvl(chain: str, num_months: int = 12) -> Dict[str, Any]: |
| 60 | + """ |
| 61 | + Get historical TVL data for a specific blockchain |
64 | 62 | """ |
65 | 63 | return defillama.get_historical_chain_tvl(chain, num_months) |
0 commit comments