@gala-chain/launchpad-mcp-server 1.12.3 → 1.13.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.
- package/CHANGELOG.md +104 -0
- package/README.md +63 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.d.ts +2 -2
- package/dist/tools/pools/fetchAllPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.js +8 -6
- package/dist/tools/pools/fetchAllPriceHistory.js.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.d.ts +2 -2
- package/dist/tools/pools/fetchPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.js +8 -6
- package/dist/tools/pools/fetchPriceHistory.js.map +1 -1
- package/package.json +2 -2
- package/src/tools/pools/fetchAllPriceHistory.ts +8 -6
- package/src/tools/pools/fetchPriceHistory.ts +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ## Price History API Migration (v3.16.0)
|
|
8
|
+
|
|
9
|
+
Migrate `fetchPriceHistory` and `fetchAllPriceHistory` methods from MySQL database backend to DEX
|
|
10
|
+
Backend API for improved performance and real-time data availability.
|
|
11
|
+
|
|
12
|
+
### SDK Changes (@gala-chain/launchpad-sdk)
|
|
13
|
+
- **New**: Added `tokenFormatConverter` utility (`src/utils/tokenFormatConverter.ts`)
|
|
14
|
+
- Convert between pipe-delimited (`Token|Unit|GUSDC|eth:...`) and dollar-delimited token formats
|
|
15
|
+
- Convert sort order from SDK format (uppercase) to API format (lowercase)
|
|
16
|
+
- **Updated**: `environments.ts` - Added separate `dexBackendBaseUrl` configuration for DEX
|
|
17
|
+
Backend service
|
|
18
|
+
- Production: `https://dex-backend-prod1.defi.gala.com`
|
|
19
|
+
- Stage: `https://dex-backend-dev1.defi.gala.com`
|
|
20
|
+
- **Updated**: `PriceHistoryService` - Migrated to DEX Backend API
|
|
21
|
+
- `fetchPriceHistory()` now uses `/price-oracle/fetch-price` endpoint
|
|
22
|
+
- `fetchAllPriceHistory()` uses automatic pagination over API
|
|
23
|
+
- Automatic token format conversion (pipe → dollar delimited)
|
|
24
|
+
- Automatic sort order conversion (uppercase → lowercase)
|
|
25
|
+
- `fetchPrices()` and `fetchAllPrices()` remain MySQL-based for latest price queries
|
|
26
|
+
- **Updated**: `LaunchpadSDK` - Added `dexBackendHttp` client initialization with
|
|
27
|
+
`dexBackendBaseUrl`
|
|
28
|
+
- **Updated**: Type definitions - Added `DexPriceOracleResponse` interface for API response
|
|
29
|
+
mapping
|
|
30
|
+
- **Updated**: Tests - Updated to mock HTTP client instead of MySQL connections
|
|
31
|
+
- Added tests for token format conversion
|
|
32
|
+
- Added tests for sort order conversion
|
|
33
|
+
- Added tests for API error handling
|
|
34
|
+
|
|
35
|
+
### MCP Changes (@gala-chain/launchpad-mcp-server)
|
|
36
|
+
- **Updated**: `fetchPriceHistory` tool description
|
|
37
|
+
- Reflects new DEX Backend API endpoint usage
|
|
38
|
+
- Removes MySQL configuration requirements
|
|
39
|
+
- Adds endpoint reference (`/price-oracle/fetch-price`)
|
|
40
|
+
- **Updated**: `fetchAllPriceHistory` tool description
|
|
41
|
+
- Updated for API-based implementation
|
|
42
|
+
- Reflects automatic pagination handling
|
|
43
|
+
|
|
44
|
+
### Documentation
|
|
45
|
+
- **Updated**: `CLAUDE.md` - Comprehensive price history patterns documentation
|
|
46
|
+
- Dual-backend architecture explanation
|
|
47
|
+
- API vs MySQL comparison
|
|
48
|
+
- Configuration examples for both methods
|
|
49
|
+
- Performance characteristics for each approach
|
|
50
|
+
- Important notes for API-based queries
|
|
51
|
+
|
|
52
|
+
### Backward Compatibility
|
|
53
|
+
|
|
54
|
+
✅ Fully backward compatible - SDK interfaces unchanged ✅ Automatic format conversion handles
|
|
55
|
+
token format differences ✅ Dual-backend support maintains MySQL for price sheet queries
|
|
56
|
+
|
|
57
|
+
### Performance Improvements
|
|
58
|
+
- ✅ API-based queries typically <500ms per request
|
|
59
|
+
- ✅ Real-time data availability
|
|
60
|
+
- ✅ No database connection overhead
|
|
61
|
+
- ✅ Improved scalability for high-volume queries
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
- @gala-chain/launchpad-sdk@3.16.0
|
|
67
|
+
|
|
68
|
+
## 1.12.4
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- docs: comprehensive documentation updates for price history methods
|
|
73
|
+
|
|
74
|
+
### SDK Documentation Updates
|
|
75
|
+
- Added complete documentation for all 4 price history methods in README.md
|
|
76
|
+
- fetchPriceHistory (paginated)
|
|
77
|
+
- fetchAllPriceHistory (auto-paginated)
|
|
78
|
+
- fetchPrices (paginated latest prices)
|
|
79
|
+
- fetchAllPrices (auto-paginated latest prices)
|
|
80
|
+
- Added comprehensive examples showing usage patterns, configuration, and workflows
|
|
81
|
+
- Updated MySQL configuration section with code examples for all 4 methods
|
|
82
|
+
- Added price history patterns documentation to CLAUDE.md
|
|
83
|
+
- Added latest token price queries section to CLAUDE.md with detailed examples
|
|
84
|
+
- Created comprehensive fetch-all-price-history-demo.ts example script
|
|
85
|
+
- Demonstrates statistical analysis, trend calculation, moving averages
|
|
86
|
+
- Shows CSV export, time period comparison, and multi-token analysis
|
|
87
|
+
- Includes volatility calculation and price statistics
|
|
88
|
+
|
|
89
|
+
### MCP Server Documentation Updates
|
|
90
|
+
- Updated tool count from 52 to 55 in README (includes 4 price history tools)
|
|
91
|
+
- Added "Price History & Analysis" section documenting 4 price history tools
|
|
92
|
+
- Updated MCP installation version references (1.12.3, SDK 3.15.3)
|
|
93
|
+
- Added complete price history tool descriptions with use cases and examples
|
|
94
|
+
|
|
95
|
+
### Agent Documentation Updates
|
|
96
|
+
- Updated @agent-galachain-launchpad-developer.md
|
|
97
|
+
- Updated SDK method count: 46 → 50 (includes price history)
|
|
98
|
+
- Updated MCP tool count: 51 → 55 (includes 4 price history tools)
|
|
99
|
+
- Updated version references: v3.11.0+ → v3.15.3+
|
|
100
|
+
- Added "Price History & Analysis" section to Complete Method Reference
|
|
101
|
+
- Updated service architecture to include PriceHistoryService
|
|
102
|
+
- Updated support section with latest version information
|
|
103
|
+
|
|
104
|
+
- Updated dependencies
|
|
105
|
+
- @gala-chain/launchpad-sdk@3.15.4
|
|
106
|
+
|
|
3
107
|
## 1.12.3
|
|
4
108
|
|
|
5
109
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
4
4
|
|
|
5
5
|
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **55 AI-accessible tools** for complete Gala Launchpad integration (includes 4 price history tools)
|
|
8
8
|
- **14 slash commands** (prompts) for quick access to common workflows
|
|
9
9
|
- **Type-safe** - Full TypeScript support with validated inputs
|
|
10
10
|
- **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
|
|
@@ -252,6 +252,68 @@ Ask Claude:
|
|
|
252
252
|
|
|
253
253
|
> "Show me GALA token price history from the last 7 days with daily snapshots"
|
|
254
254
|
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
#### 📊 All Historical Price Data (Auto-Paginated)
|
|
258
|
+
|
|
259
|
+
**`gala_launchpad_fetch_all_price_history`** - Fetch all historical price snapshots (auto-paginated)
|
|
260
|
+
|
|
261
|
+
Automatically fetches all pages of historical price data and returns complete dataset in single result.
|
|
262
|
+
|
|
263
|
+
**Use Cases:**
|
|
264
|
+
- Complete volatility analysis
|
|
265
|
+
- Full historical trend analysis
|
|
266
|
+
- Statistical calculations on entire dataset
|
|
267
|
+
- Data export for backtesting
|
|
268
|
+
|
|
269
|
+
**Example:**
|
|
270
|
+
|
|
271
|
+
Ask Claude:
|
|
272
|
+
|
|
273
|
+
> "Get all price history for GUSDC token from January 2024 and calculate volatility"
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
#### 💰 Latest Token Prices
|
|
278
|
+
|
|
279
|
+
**`gala_launchpad_fetch_prices`** - Fetch latest prices for all tokens (paginated)
|
|
280
|
+
|
|
281
|
+
Returns the most recent price snapshot for each unique token in the database.
|
|
282
|
+
|
|
283
|
+
**Use Cases:**
|
|
284
|
+
- Market overview dashboards
|
|
285
|
+
- Price comparison across tokens
|
|
286
|
+
- Real-time price monitoring
|
|
287
|
+
- Market statistics
|
|
288
|
+
|
|
289
|
+
**Example:**
|
|
290
|
+
|
|
291
|
+
Ask Claude:
|
|
292
|
+
|
|
293
|
+
> "Fetch the latest prices for the top 20 most expensive tokens"
|
|
294
|
+
|
|
295
|
+
> "Show me all token prices sorted alphabetically"
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
**`gala_launchpad_fetch_all_prices`** - Fetch all latest prices (auto-paginated)
|
|
300
|
+
|
|
301
|
+
Convenience method that automatically paginates through all tokens and returns all latest prices.
|
|
302
|
+
|
|
303
|
+
**Use Cases:**
|
|
304
|
+
- Complete market analysis
|
|
305
|
+
- Market-wide statistics and calculations
|
|
306
|
+
- Price monitoring across all tokens
|
|
307
|
+
- Data export for analysis tools
|
|
308
|
+
|
|
309
|
+
**Example:**
|
|
310
|
+
|
|
311
|
+
Ask Claude:
|
|
312
|
+
|
|
313
|
+
> "Get all latest token prices and tell me the average price across all tokens"
|
|
314
|
+
|
|
315
|
+
> "Show me the most and least expensive tokens right now"
|
|
316
|
+
|
|
255
317
|
### Balance & Portfolio (6 tools)
|
|
256
318
|
- `gala_launchpad_fetch_gala_balance` - Get GALA balance
|
|
257
319
|
- `gala_launchpad_fetch_token_balance` - Get token balance
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch All Price History Tool
|
|
3
3
|
*
|
|
4
|
-
* Queries all historical token price data from
|
|
5
|
-
*
|
|
4
|
+
* Queries all historical token price data from DEX Backend API with automatic pagination.
|
|
5
|
+
* Uses the /price-oracle/fetch-price endpoint for complete price history retrieval.
|
|
6
6
|
*/
|
|
7
7
|
import type { MCPTool } from '../../types/mcp.js';
|
|
8
8
|
export declare const fetchAllPriceHistoryTool: MCPTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,OA2FtC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Fetch All Price History Tool
|
|
4
4
|
*
|
|
5
|
-
* Queries all historical token price data from
|
|
6
|
-
*
|
|
5
|
+
* Queries all historical token price data from DEX Backend API with automatic pagination.
|
|
6
|
+
* Uses the /price-oracle/fetch-price endpoint for complete price history retrieval.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.fetchAllPriceHistoryTool = void 0;
|
|
@@ -11,12 +11,14 @@ const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
|
11
11
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
12
12
|
exports.fetchAllPriceHistoryTool = {
|
|
13
13
|
name: 'gala_launchpad_fetch_all_price_history',
|
|
14
|
-
description: `Fetch all historical price snapshots for DEX tokens with automatic pagination.
|
|
14
|
+
description: `Fetch all historical price snapshots for DEX tokens from the DEX Backend API with automatic pagination.
|
|
15
|
+
|
|
16
|
+
**Endpoint:** \`/price-oracle/fetch-price\`
|
|
15
17
|
|
|
16
18
|
**Requirements:**
|
|
17
|
-
-
|
|
19
|
+
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
18
20
|
- Node.js environment only (not available in browser)
|
|
19
|
-
-
|
|
21
|
+
- Token parameter is required
|
|
20
22
|
|
|
21
23
|
**Use Cases:**
|
|
22
24
|
- Complete historical price analysis and charting
|
|
@@ -24,7 +26,7 @@ exports.fetchAllPriceHistoryTool = {
|
|
|
24
26
|
- Comprehensive volatility analysis
|
|
25
27
|
- Data export for external analytics
|
|
26
28
|
|
|
27
|
-
**Performance:**
|
|
29
|
+
**Performance:** API-based queries with automatic pagination (max 100 items per page, combined into single result).`,
|
|
28
30
|
inputSchema: {
|
|
29
31
|
type: 'object',
|
|
30
32
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,wBAAwB,GAAY;IAC/C,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"fetchAllPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,wBAAwB,GAAY;IAC/C,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE;;;;;;;;;;;;;;;oHAeqG;IAElH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oGAAoG;qBACvG;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kCAAkC;6BAChD;4BACD,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,4BAA4B;6BAC1C;4BACD,aAAa,EAAE;gCACb,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,oCAAoC;6BAClD;yBACF;wBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC;wBAC7D,WAAW,EAAE,6BAA6B;qBAC3C;iBACF;gBACD,WAAW,EAAE,mDAAmD;aACjE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,qEAAqE;aACnF;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,2DAA2D;aACzE;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;gBACrB,WAAW,EAAE,yDAAyD;aACvE;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IAED,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,mDAAmD;QACnD,MAAM,OAAO,GAAQ;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACvD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch Price History Tool
|
|
3
3
|
*
|
|
4
|
-
* Queries historical token price data from
|
|
5
|
-
*
|
|
4
|
+
* Queries historical token price data from DEX Backend API.
|
|
5
|
+
* Uses the /price-oracle/fetch-price endpoint for paginated price history retrieval.
|
|
6
6
|
*/
|
|
7
7
|
import type { MCPTool } from '../../types/mcp.js';
|
|
8
8
|
export declare const fetchPriceHistoryTool: MCPTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,OA+FnC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Fetch Price History Tool
|
|
4
4
|
*
|
|
5
|
-
* Queries historical token price data from
|
|
6
|
-
*
|
|
5
|
+
* Queries historical token price data from DEX Backend API.
|
|
6
|
+
* Uses the /price-oracle/fetch-price endpoint for paginated price history retrieval.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.fetchPriceHistoryTool = void 0;
|
|
@@ -12,12 +12,14 @@ const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
|
12
12
|
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
13
13
|
exports.fetchPriceHistoryTool = {
|
|
14
14
|
name: 'gala_launchpad_fetch_price_history',
|
|
15
|
-
description: `Fetch historical price snapshots for DEX tokens from
|
|
15
|
+
description: `Fetch historical price snapshots for DEX tokens from the DEX Backend API.
|
|
16
|
+
|
|
17
|
+
**Endpoint:** \`/price-oracle/fetch-price\`
|
|
16
18
|
|
|
17
19
|
**Requirements:**
|
|
18
|
-
-
|
|
20
|
+
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
19
21
|
- Node.js environment only (not available in browser)
|
|
20
|
-
-
|
|
22
|
+
- Token parameter is required
|
|
21
23
|
|
|
22
24
|
**Use Cases:**
|
|
23
25
|
- Historical price analysis and charting
|
|
@@ -25,7 +27,7 @@ exports.fetchPriceHistoryTool = {
|
|
|
25
27
|
- Volatility analysis over time periods
|
|
26
28
|
- Data export for external analytics
|
|
27
29
|
|
|
28
|
-
**Performance:**
|
|
30
|
+
**Performance:** API-based queries with pagination support (max 100 items per page).`,
|
|
29
31
|
inputSchema: {
|
|
30
32
|
type: 'object',
|
|
31
33
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;;;;;;;;;;;;;;qFAesE;IAEnF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oGAAoG;qBACvG;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kCAAkC;6BAChD;4BACD,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,4BAA4B;6BAC1C;4BACD,aAAa,EAAE;gCACb,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,oCAAoC;6BAClD;yBACF;wBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC;wBAC7D,WAAW,EAAE,6BAA6B;qBAC3C;iBACF;gBACD,WAAW,EAAE,mDAAmD;aACjE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,qEAAqE;aACnF;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,2DAA2D;aACzE;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;gBACrB,WAAW,EAAE,yDAAyD;aACvE;YACD,IAAI,EAAE,+BAAW;YACjB,KAAK,EAAE,IAAA,qCAAiB,EAAC,MAAM,EAAE,EAAE,CAAC;SACrC;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IAED,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,mDAAmD;QACnD,MAAM,OAAO,GAAQ;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACpD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "MCP server for Gala Launchpad SDK with 55 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@gala-chain/api": "^2.4.3",
|
|
66
66
|
"@gala-chain/connect": "^2.4.3",
|
|
67
|
-
"@gala-chain/launchpad-sdk": "^3.
|
|
67
|
+
"@gala-chain/launchpad-sdk": "^3.16.0",
|
|
68
68
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
69
69
|
"axios": "^1.12.2",
|
|
70
70
|
"bignumber.js": "^9.1.2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch All Price History Tool
|
|
3
3
|
*
|
|
4
|
-
* Queries all historical token price data from
|
|
5
|
-
*
|
|
4
|
+
* Queries all historical token price data from DEX Backend API with automatic pagination.
|
|
5
|
+
* Uses the /price-oracle/fetch-price endpoint for complete price history retrieval.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { MCPTool } from '../../types/mcp.js';
|
|
@@ -11,12 +11,14 @@ import { withErrorHandling } from '../../utils/error-handler.js';
|
|
|
11
11
|
|
|
12
12
|
export const fetchAllPriceHistoryTool: MCPTool = {
|
|
13
13
|
name: 'gala_launchpad_fetch_all_price_history',
|
|
14
|
-
description: `Fetch all historical price snapshots for DEX tokens with automatic pagination.
|
|
14
|
+
description: `Fetch all historical price snapshots for DEX tokens from the DEX Backend API with automatic pagination.
|
|
15
|
+
|
|
16
|
+
**Endpoint:** \`/price-oracle/fetch-price\`
|
|
15
17
|
|
|
16
18
|
**Requirements:**
|
|
17
|
-
-
|
|
19
|
+
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
18
20
|
- Node.js environment only (not available in browser)
|
|
19
|
-
-
|
|
21
|
+
- Token parameter is required
|
|
20
22
|
|
|
21
23
|
**Use Cases:**
|
|
22
24
|
- Complete historical price analysis and charting
|
|
@@ -24,7 +26,7 @@ export const fetchAllPriceHistoryTool: MCPTool = {
|
|
|
24
26
|
- Comprehensive volatility analysis
|
|
25
27
|
- Data export for external analytics
|
|
26
28
|
|
|
27
|
-
**Performance:**
|
|
29
|
+
**Performance:** API-based queries with automatic pagination (max 100 items per page, combined into single result).`,
|
|
28
30
|
|
|
29
31
|
inputSchema: {
|
|
30
32
|
type: 'object',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch Price History Tool
|
|
3
3
|
*
|
|
4
|
-
* Queries historical token price data from
|
|
5
|
-
*
|
|
4
|
+
* Queries historical token price data from DEX Backend API.
|
|
5
|
+
* Uses the /price-oracle/fetch-price endpoint for paginated price history retrieval.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { MCPTool } from '../../types/mcp.js';
|
|
@@ -12,12 +12,14 @@ import { PAGE_SCHEMA, createLimitSchema } from '../../schemas/common-schemas.js'
|
|
|
12
12
|
|
|
13
13
|
export const fetchPriceHistoryTool: MCPTool = {
|
|
14
14
|
name: 'gala_launchpad_fetch_price_history',
|
|
15
|
-
description: `Fetch historical price snapshots for DEX tokens from
|
|
15
|
+
description: `Fetch historical price snapshots for DEX tokens from the DEX Backend API.
|
|
16
|
+
|
|
17
|
+
**Endpoint:** \`/price-oracle/fetch-price\`
|
|
16
18
|
|
|
17
19
|
**Requirements:**
|
|
18
|
-
-
|
|
20
|
+
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
19
21
|
- Node.js environment only (not available in browser)
|
|
20
|
-
-
|
|
22
|
+
- Token parameter is required
|
|
21
23
|
|
|
22
24
|
**Use Cases:**
|
|
23
25
|
- Historical price analysis and charting
|
|
@@ -25,7 +27,7 @@ export const fetchPriceHistoryTool: MCPTool = {
|
|
|
25
27
|
- Volatility analysis over time periods
|
|
26
28
|
- Data export for external analytics
|
|
27
29
|
|
|
28
|
-
**Performance:**
|
|
30
|
+
**Performance:** API-based queries with pagination support (max 100 items per page).`,
|
|
29
31
|
|
|
30
32
|
inputSchema: {
|
|
31
33
|
type: 'object',
|