clanker-sdk 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +48 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -24,11 +24,14 @@ Create a `.env` file in your project root:
24
24
  # Clanker API Key (required for token operations)
25
25
  CLANKER_API_KEY=your_api_key_here
26
26
 
27
- # Dune Analytics API Key (required for market data)
27
+ # Dune Analytics API Key (optional)
28
28
  DUNE_API_KEY=your_dune_api_key_here
29
29
 
30
- # The Graph API Key (optional, for Uniswap data)
30
+ # The Graph API Key (optional)
31
31
  GRAPH_API_KEY=your_graph_api_key_here
32
+
33
+ # CoinGecko Pro API Key (optional)
34
+ COINGECKO_API_KEY=your_coingecko_api_key_here
32
35
  ```
33
36
 
34
37
  Copy the `.env.example` file to get started:
@@ -41,7 +44,10 @@ Make sure to add your API keys to the `.env` file and never commit it to version
41
44
 
42
45
  ### 3. Getting Your API Keys
43
46
 
44
- #### Dune Analytics API Key
47
+ #### Clanker API Key
48
+ Contact `btayengco` on Telegram or Warpcast to request access.
49
+
50
+ #### Dune Analytics API Key (Optional)
45
51
  To access market data features:
46
52
  1. Visit [dune.xyz](https://dune.xyz) and sign up for an account
47
53
  2. Go to your [API Keys page](https://dune.com/settings/api)
@@ -57,6 +63,15 @@ To access Uniswap data:
57
63
  3. Create an API key
58
64
  4. Add the key to your `.env` file as `GRAPH_API_KEY`
59
65
 
66
+ #### CoinGecko Pro API Key (Optional)
67
+ To access CoinGecko's comprehensive market data:
68
+ 1. Visit [CoinGecko](https://www.coingecko.com) and create an account
69
+ 2. Go to your [Developer Dashboard](https://www.coingecko.com/en/api/pricing)
70
+ 3. Choose a subscription plan and create an API key
71
+ 4. Add the key to your `.env` file as `COINGECKO_API_KEY`
72
+
73
+ For detailed instructions on setting up your CoinGecko API key, visit their [official documentation](https://docs.coingecko.com/reference/setting-up-your-api-key).
74
+
60
75
  ### 4. Basic Usage
61
76
 
62
77
  ```typescript
@@ -69,10 +84,11 @@ dotenv.config();
69
84
  // Initialize SDK for token operations
70
85
  const clanker = new ClankerSDK(process.env.CLANKER_API_KEY);
71
86
 
72
- // Initialize market data client with both Dune and Graph API keys
87
+ // Initialize market data client with desired API keys
73
88
  const marketData = new MarketDataClient(
74
- process.env.DUNE_API_KEY,
75
- process.env.GRAPH_API_KEY
89
+ process.env.DUNE_API_KEY, // Optional: For Dune Analytics data
90
+ process.env.GRAPH_API_KEY, // Optional: For Uniswap data
91
+ process.env.COINGECKO_API_KEY // Optional: For CoinGecko data
76
92
  );
77
93
 
78
94
  // Deploy a token
@@ -83,8 +99,20 @@ const token = await clanker.deployToken({
83
99
  requestorAddress: "0x1234567890123456789012345678901234567890", // Address receiving 40% creator rewards
84
100
  });
85
101
 
86
- // Get market data for your tokens
87
- const marketStats = await marketData.getClankerDictionary();
102
+ // Get market data from different sources
103
+ const marketStats = await Promise.all([
104
+ // Get CoinGecko market data
105
+ marketData.getGeckoTokenData(['bitcoin', 'ethereum']),
106
+
107
+ // Get Clanker dictionary data
108
+ marketData.getClankerDictionary(),
109
+
110
+ // Get DEX pair stats
111
+ marketData.getDexPairStats('ethereum', token.contractAddress),
112
+
113
+ // Get Uniswap data
114
+ marketData.getUniswapData([token.contractAddress])
115
+ ]);
88
116
  ```
89
117
 
90
118
  ## Features
@@ -100,6 +128,18 @@ const marketStats = await marketData.getClankerDictionary();
100
128
 
101
129
  The SDK provides access to comprehensive market data through multiple sources:
102
130
 
131
+ ### CoinGecko Market Data
132
+ Get detailed token information from CoinGecko:
133
+ ```typescript
134
+ const geckoData = await marketData.getGeckoTokenData(['bitcoin', 'ethereum']);
135
+ // Returns: Detailed market data including:
136
+ // - Current price in USD
137
+ // - Market cap
138
+ // - 24h trading volume
139
+ // - 24h price change
140
+ // - Last updated timestamp
141
+ ```
142
+
103
143
  ### Clanker Dictionary
104
144
  Get detailed information about all Clanker tokens:
105
145
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clanker-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "A lightweight TypeScript SDK for interacting with the Clanker API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",