You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gets the current HBAR price in USD via the CoinCap API. Provided by the CoinCap plugin (CoinCapHederaPlugin).
Usage:
Use this tool when the user asks for the current HBAR price, needs to convert an amount of HBAR into USD, or asks which plugin provides price data from CoinCap.
`,
parameters: z.object({}),
outputParser: undefined,
execute: async (client, context, params) => {
const hbarPriceInUSD = await getHBARPriceInUSD();
return hbarPriceInUSD;
},
});
// Export the plugin
export const CoinCapHederaPlugin = {
name: 'CoinCapHederaPlugin',
version: '1.0.1',
description: 'An example plugin to get the current HBAR price in USD currency. Use it to exchange an amount of HBAR into a USD amount',