Skip to content

Commit 7d7929d

Browse files
authored
Merge branch 'develop' into main
2 parents d049f0d + b9dc459 commit 7d7929d

20 files changed

+1542
-132
lines changed

.env.example

+6-1
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,12 @@ TOGETHER_API_KEY= # Together API Key
257257
#### Crypto Plugin Configurations ####
258258
######################################
259259

260-
# COIN DATA SOURCES
260+
# CoinMarketCap / CMC
261261
COINMARKETCAP_API_KEY=
262+
263+
# CoinGecko
262264
COINGECKO_API_KEY=
265+
COINGECKO_PRO_API_KEY=
263266

264267
# EVM
265268
EVM_PRIVATE_KEY=
@@ -438,6 +441,8 @@ GIPHY_API_KEY=
438441
# OpenWeather
439442
OPEN_WEATHER_API_KEY= # OpenWeather API key
440443

444+
445+
441446
# EchoChambers Configuration
442447
ECHOCHAMBERS_API_URL=http://127.0.0.1:3333
443448
ECHOCHAMBERS_API_KEY=testingkey0011

agent/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@elizaos/plugin-0g": "workspace:*",
3535
"@elizaos/plugin-abstract": "workspace:*",
3636
"@elizaos/plugin-aptos": "workspace:*",
37+
"@elizaos/plugin-coingecko": "workspace:*",
3738
"@elizaos/plugin-coinmarketcap": "workspace:*",
3839
"@elizaos/plugin-coingecko": "workspace:*",
3940
"@elizaos/plugin-binance": "workspace:*",
@@ -94,4 +95,4 @@
9495
"ts-node": "10.9.2",
9596
"tsup": "8.3.5"
9697
}
97-
}
98+
}

agent/src/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,18 @@ import { nearPlugin } from "@elizaos/plugin-near";
6868
import { nftGenerationPlugin } from "@elizaos/plugin-nft-generation";
6969
import { createNodePlugin } from "@elizaos/plugin-node";
7070
import { obsidianPlugin } from "@elizaos/plugin-obsidian";
71+
import { sgxPlugin } from "@elizaos/plugin-sgx";
7172
import { solanaPlugin } from "@elizaos/plugin-solana";
7273
import { solanaAgentkitPlguin } from "@elizaos/plugin-solana-agentkit";
7374
import { storyPlugin } from "@elizaos/plugin-story";
7475
import { suiPlugin } from "@elizaos/plugin-sui";
75-
import { sgxPlugin } from "@elizaos/plugin-sgx";
7676
import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
7777
import { teeLogPlugin } from "@elizaos/plugin-tee-log";
7878
import { teeMarlinPlugin } from "@elizaos/plugin-tee-marlin";
7979
import { tonPlugin } from "@elizaos/plugin-ton";
8080
import { webSearchPlugin } from "@elizaos/plugin-web-search";
8181

82+
import { coingeckoPlugin } from "@elizaos/plugin-coingecko";
8283
import { giphyPlugin } from "@elizaos/plugin-giphy";
8384
import { letzAIPlugin } from "@elizaos/plugin-letzai";
8485
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
@@ -678,7 +679,10 @@ export async function createAgent(
678679
? webhookPlugin
679680
: null,
680681
goatPlugin,
681-
getSecret(character, "COINGECKO_API_KEY") ? coingeckoPlugin : null,
682+
getSecret(character, "COINGECKO_API_KEY") ||
683+
getSecret(character, "COINGECKO_PRO_API_KEY")
684+
? coingeckoPlugin
685+
: null,
682686
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
683687
getSecret(character, "ABSTRACT_PRIVATE_KEY")
684688
? abstractPlugin

packages/plugin-coingecko/README.md

+60-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ A plugin for fetching cryptocurrency price data from the CoinGecko API.
44

55
## Overview
66

7-
The Plugin CoinGecko provides a simple interface to get real-time cryptocurrency prices. It integrates with CoinGecko's API to fetch current prices for various cryptocurrencies in different fiat currencies.
7+
The Plugin CoinGecko provides a simple interface to get real-time cryptocurrency data. It integrates with CoinGecko's API to fetch current prices, market data, trending coins, and top gainers/losers for various cryptocurrencies in different fiat currencies.
8+
9+
This plugin uses the [CoinGecko Pro API](https://docs.coingecko.com/reference/introduction). Please refer to their documentation for detailed information about rate limits, available endpoints, and response formats.
810

911
## Installation
1012

@@ -18,7 +20,8 @@ Set up your environment with the required CoinGecko API key:
1820

1921
| Variable Name | Description |
2022
| ------------------- | ---------------------- |
21-
| `COINGECKO_API_KEY` | Your CoinGecko API key |
23+
| `COINGECKO_API_KEY` | Your CoinGecko Pro API key |
24+
| `COINGECKO_PRO_API_KEY` | Your CoinGecko Pro API key |
2225

2326
## Usage
2427

@@ -27,23 +30,69 @@ import { coingeckoPlugin } from "@elizaos/plugin-coingecko";
2730

2831
// Initialize the plugin
2932
const plugin = coingeckoPlugin;
30-
31-
// The plugin provides the GET_PRICE action which can be used to fetch prices
32-
// Supported coins: BTC, ETH, USDC, and more
3333
```
3434

3535
## Actions
3636

3737
### GET_PRICE
3838

39-
Fetches the current price of a cryptocurrency.
39+
Fetches the current price and market data for one or more cryptocurrencies.
4040

41-
Examples:
41+
Features:
42+
- Multiple currency support (e.g., USD, EUR, JPY)
43+
- Optional market cap data
44+
- Optional 24h volume data
45+
- Optional 24h price change data
46+
- Optional last update timestamp
4247

48+
Examples:
4349
- "What's the current price of Bitcoin?"
44-
- "Check ETH price in EUR"
45-
- "What's USDC worth?"
50+
- "Check ETH price in EUR with market cap"
51+
- "Show me BTC and ETH prices in USD and EUR"
52+
- "What's USDC worth with 24h volume and price change?"
53+
54+
### GET_TRENDING
55+
56+
Fetches the current trending cryptocurrencies on CoinGecko.
4657

47-
## License
58+
Features:
59+
- Includes trending coins with market data
60+
- Optional NFT inclusion
61+
- Optional category inclusion
4862

49-
MIT
63+
Examples:
64+
- "What's trending in crypto?"
65+
- "Show me trending coins only"
66+
- "What are the hot cryptocurrencies right now?"
67+
68+
### GET_TOP_GAINERS_LOSERS
69+
70+
Fetches the top gaining and losing cryptocurrencies by price change.
71+
72+
Features:
73+
- Customizable time range (1h, 24h, 7d, 14d, 30d, 60d, 1y)
74+
- Configurable number of top coins to include
75+
- Multiple currency support
76+
- Market cap ranking included
77+
78+
Examples:
79+
- "Show me the biggest gainers and losers today"
80+
- "What are the top movers in EUR for the past week?"
81+
- "Show me monthly performance of top 100 coins"
82+
83+
## Response Format
84+
85+
All actions return structured data including:
86+
- Formatted text for easy reading
87+
- Raw data for programmatic use
88+
- Request parameters used
89+
- Error details when applicable
90+
91+
## Error Handling
92+
93+
The plugin handles various error scenarios:
94+
- Rate limiting
95+
- API key validation
96+
- Invalid parameters
97+
- Network issues
98+
- Pro plan requirements

0 commit comments

Comments
 (0)