get_crypto_price
Fetch the current price of a cryptocurrency in a chosen fiat or crypto currency using CoinGecko, so agents can convert values and answer price queries.
Instructions
Get the current price of a cryptocurrency in a specified currency using the CoinGecko API.
Args: cryptocurrency: The id of the cryptocurrency (e.g., 'bitcoin', 'ethereum'). currency: The fiat or crypto currency to convert to (e.g., 'usd', 'inr'). Returns: The current price as a float. Returns 0.0 if the price cannot be fetched.
Example: get_crypto_price(cryptocurrency="bitcoin", currency="usd") get_crypto_price(cryptocurrency="ethereum", currency="inr")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | inr | |
| cryptocurrency | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |