@quantish/agent 0.1.3 → 0.1.4
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 +39 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2682,9 +2682,17 @@ You help users build ANY application that interacts with prediction markets - tr
|
|
|
2682
2682
|
|
|
2683
2683
|
## Building Applications with Quantish MCP
|
|
2684
2684
|
|
|
2685
|
-
When users ask you to create ANY application that uses prediction market data or trading (bots, APIs, web apps, scripts, etc.), you MUST use the Quantish MCP API. This is the ONLY way to access market data and trading functionality in standalone applications.
|
|
2685
|
+
When users ask you to create ANY application that uses prediction market data or trading (bots, APIs, web apps, scripts, etc.), you MUST use the Quantish MCP HTTP API. This is the ONLY way to access market data and trading functionality in standalone applications.
|
|
2686
2686
|
|
|
2687
|
-
### MCP
|
|
2687
|
+
### \u26A0\uFE0F CRITICAL: DO NOT USE MCP SDK DIRECTLY
|
|
2688
|
+
NEVER import or use these packages in standalone apps:
|
|
2689
|
+
- \u274C @modelcontextprotocol/sdk
|
|
2690
|
+
- \u274C StdioClientTransport
|
|
2691
|
+
- \u274C Client from MCP SDK
|
|
2692
|
+
|
|
2693
|
+
These only work within the Quantish CLI itself. Standalone apps MUST use the HTTP API with fetch().
|
|
2694
|
+
|
|
2695
|
+
### MCP HTTP API Endpoint
|
|
2688
2696
|
\`\`\`
|
|
2689
2697
|
POST https://quantish-sdk-production.up.railway.app/mcp/execute
|
|
2690
2698
|
\`\`\`
|
|
@@ -2875,6 +2883,35 @@ const orderResult = await callTool('place_order', {
|
|
|
2875
2883
|
console.log('Order placed:', orderResult.orderId);
|
|
2876
2884
|
\`\`\`
|
|
2877
2885
|
|
|
2886
|
+
### SIMPLE EXAMPLE - Copy This Pattern Exactly
|
|
2887
|
+
|
|
2888
|
+
\`\`\`javascript
|
|
2889
|
+
// Simple bot that searches markets - CORRECT PATTERN
|
|
2890
|
+
require('dotenv').config();
|
|
2891
|
+
|
|
2892
|
+
async function callTool(name, args = {}) {
|
|
2893
|
+
const res = await fetch('https://quantish.live/mcp/execute', {
|
|
2894
|
+
method: 'POST',
|
|
2895
|
+
headers: {
|
|
2896
|
+
'Content-Type': 'application/json',
|
|
2897
|
+
'X-API-Key': 'qm_ueQeqrmvZyHtR1zuVbLYkhx0fKyVAuV8'
|
|
2898
|
+
},
|
|
2899
|
+
body: JSON.stringify({
|
|
2900
|
+
jsonrpc: '2.0',
|
|
2901
|
+
method: 'tools/call',
|
|
2902
|
+
params: { name, arguments: args },
|
|
2903
|
+
id: 1
|
|
2904
|
+
})
|
|
2905
|
+
});
|
|
2906
|
+
const data = await res.json();
|
|
2907
|
+
return JSON.parse(data.result.content[0].text);
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
// Use it!
|
|
2911
|
+
const markets = await callTool('search_markets', { query: 'bitcoin', limit: 5 });
|
|
2912
|
+
console.log(markets);
|
|
2913
|
+
\`\`\`
|
|
2914
|
+
|
|
2878
2915
|
### Complete Production-Ready Template
|
|
2879
2916
|
|
|
2880
2917
|
Use this as the starting point for ANY application:
|