Defi Operations
6.1 Get whitelisted tokens
protocol (str): The DeFi protocol name (e.g., "H2", "VVS")."Get whitelisted tokens of protocol <example-protocol>"
str: A formatted string containing the list of whitelisted tokens.Here are the whitelisted tokens for the <example-protocol> protocol: <example-token-name> - Address: [<example-address>](<example-explore-link>) - Decimal: <example-decimal> - Swappable: <example-boolean> -  <example-token-name> ... Feel free to ask if you need more information about any specific token!
from crypto_com_agent_client import Agent
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4",
"provider-api-key": "sk-proj-example-key",
"temperature": "float-controlling-output-randomness",
"transfer-limit": -1, # -1 means no limit (unlimited), 0 disables transfers completely, any positive number (e.g. 5) allows exactly that transfer amount
},
blockchain_config={
"api-key": "your-crypto.com-developer-platform-api-key",
"private-key": "your-private-key",
"sso-wallet-url": "your-sso-wallet-url",
"timeout": "timeout-in-seconds-for-API-calls-default-20s")
},
)
response = agent.interact("Get whitelisted tokens of protocol <example-protocol>")
print(response)6.2 Get all farms
6.3 Get farm by symbol
Last updated
Was this helpful?