@quantish/agent 0.1.8 → 0.1.9
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/dist/index.js +37 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2751,7 +2751,28 @@ const data = await response.json();
|
|
|
2751
2751
|
const result = JSON.parse(data.result.content[0].text);
|
|
2752
2752
|
\`\`\`
|
|
2753
2753
|
|
|
2754
|
+
### \u26A0\uFE0F CRITICAL: Tool-to-Server Mapping (MEMORIZE THIS)
|
|
2755
|
+
|
|
2756
|
+
| Tool Name | Server | Auth Required | Helper Function |
|
|
2757
|
+
|-----------|--------|---------------|-----------------|
|
|
2758
|
+
| \`get_balances\` | TRADING | Yes (QUANTISH_API_KEY) | callTradingTool() |
|
|
2759
|
+
| \`get_positions\` | TRADING | Yes | callTradingTool() |
|
|
2760
|
+
| \`place_order\` | TRADING | Yes | callTradingTool() |
|
|
2761
|
+
| \`cancel_order\` | TRADING | Yes | callTradingTool() |
|
|
2762
|
+
| \`get_orders\` | TRADING | Yes | callTradingTool() |
|
|
2763
|
+
| \`get_orderbook\` | TRADING | Yes | callTradingTool() |
|
|
2764
|
+
| \`get_price\` | TRADING | Yes | callTradingTool() |
|
|
2765
|
+
| \`get_deposit_addresses\` | TRADING | Yes | callTradingTool() |
|
|
2766
|
+
| \`transfer_usdc\` | TRADING | Yes | callTradingTool() |
|
|
2767
|
+
| \`search_markets\` | DISCOVERY | No (public key) | callDiscoveryTool() |
|
|
2768
|
+
| \`get_market_details\` | DISCOVERY | No | callDiscoveryTool() |
|
|
2769
|
+
| \`get_trending_markets\` | DISCOVERY | No | callDiscoveryTool() |
|
|
2770
|
+
| \`find_arbitrage\` | DISCOVERY | No | callDiscoveryTool() |
|
|
2771
|
+
|
|
2754
2772
|
### Key Trading Tools (require QUANTISH_API_KEY)
|
|
2773
|
+
URL: https://quantish-sdk-production.up.railway.app/mcp/execute
|
|
2774
|
+
Format: JSON-RPC 2.0 ({ jsonrpc, method, params, id })
|
|
2775
|
+
|
|
2755
2776
|
- \`get_balances\`: Returns { usdc, nativeUsdc, matic } for EOA and Safe wallets
|
|
2756
2777
|
- \`get_positions\`: Returns array of current share holdings with market info
|
|
2757
2778
|
- \`place_order\`: Place order. Args: { conditionId, tokenId, side: "BUY"|"SELL", price: 0.01-0.99, size: number }
|
|
@@ -2763,6 +2784,8 @@ const result = JSON.parse(data.result.content[0].text);
|
|
|
2763
2784
|
- \`transfer_usdc\`: Send USDC. Args: { toAddress, amount }
|
|
2764
2785
|
|
|
2765
2786
|
### Key Discovery Tools (free, no auth required)
|
|
2787
|
+
URL: https://quantish.live/mcp/execute
|
|
2788
|
+
Format: Simple ({ name, arguments }) - NOT JSON-RPC!
|
|
2766
2789
|
Discovery uses a SIMPLER request format (not full JSON-RPC):
|
|
2767
2790
|
\`\`\`javascript
|
|
2768
2791
|
// Discovery API - uses simple { name, arguments } format
|
|
@@ -2861,14 +2884,24 @@ When generating ANY code that uses Quantish/MCP (bots, apps, scripts, APIs, etc.
|
|
|
2861
2884
|
|
|
2862
2885
|
### MANDATORY Requirements
|
|
2863
2886
|
|
|
2864
|
-
1. **ALWAYS include
|
|
2865
|
-
2. **
|
|
2866
|
-
|
|
2887
|
+
1. **ALWAYS include BOTH callTradingTool() AND callDiscoveryTool() helper functions** - Copy them EXACTLY from the template
|
|
2888
|
+
2. **USE THE CORRECT HELPER FOR EACH TOOL** - Check the tool-to-server mapping table above!
|
|
2889
|
+
- Trading tools (get_price, get_orderbook, place_order, etc.) \u2192 callTradingTool()
|
|
2890
|
+
- Discovery tools (search_markets, get_market_details, etc.) \u2192 callDiscoveryTool()
|
|
2891
|
+
3. **NEVER hardcode prices, market data, or API responses** - Always fetch live data
|
|
2867
2892
|
4. **NEVER comment out MCP calls** - All API calls must be real, working, executable code
|
|
2868
2893
|
5. **ALWAYS create .env.example** - Document all required environment variables
|
|
2869
|
-
6. **ALWAYS validate QUANTISH_API_KEY exists** - Fail fast with clear error if missing
|
|
2894
|
+
6. **ALWAYS validate QUANTISH_API_KEY exists** when using Trading tools - Fail fast with clear error if missing
|
|
2870
2895
|
7. **ALWAYS use dotenv** - \`require('dotenv').config()\` at the top of every file
|
|
2871
2896
|
|
|
2897
|
+
### \u26D4 NEVER DO WORKAROUNDS
|
|
2898
|
+
|
|
2899
|
+
- **NEVER try to "work around" missing tools** - If a tool requires auth, use auth
|
|
2900
|
+
- **NEVER substitute one tool for another** - get_market_details is NOT a replacement for get_price
|
|
2901
|
+
- **NEVER use the Discovery API for tools that require Trading API** - They are separate servers
|
|
2902
|
+
- **NEVER mock or simulate API responses** - Always make real API calls
|
|
2903
|
+
- **If a feature requires QUANTISH_API_KEY, tell the user they need one** - Don't try to avoid it
|
|
2904
|
+
|
|
2872
2905
|
### File Structure for ANY Application
|
|
2873
2906
|
|
|
2874
2907
|
When creating an application, ALWAYS create these files:
|