@coinrithm/mcp-trading 0.7.3 → 0.7.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/CHANGELOG.md +171 -158
- package/README.md +277 -240
- package/dist/agent/cli.js +9 -5
- package/dist/agent/observe.d.ts +4 -0
- package/dist/agent/observe.js +23 -4
- package/dist/client.d.ts +18 -0
- package/dist/client.js +18 -0
- package/dist/http.js +3 -1
- package/dist/tools.d.ts +22 -0
- package/dist/tools.js +582 -10
- package/package.json +86 -86
package/dist/client.d.ts
CHANGED
|
@@ -61,6 +61,24 @@ export declare class CoinRithmClient {
|
|
|
61
61
|
fiat?: string;
|
|
62
62
|
}): Promise<ApiResult>;
|
|
63
63
|
getPublicPmWhales(): Promise<ApiResult>;
|
|
64
|
+
getPublicPmMatches(query?: {
|
|
65
|
+
limit?: number;
|
|
66
|
+
offset?: number;
|
|
67
|
+
sort?: string;
|
|
68
|
+
minDivergence?: number;
|
|
69
|
+
sourceKind?: string;
|
|
70
|
+
status?: string;
|
|
71
|
+
maxSnapshotAgeMinutes?: number;
|
|
72
|
+
requirePriced?: boolean;
|
|
73
|
+
fiat?: string;
|
|
74
|
+
}): Promise<ApiResult>;
|
|
75
|
+
getPublicPmCalibration(): Promise<ApiResult>;
|
|
76
|
+
getPublicPmCanonicalList(query?: {
|
|
77
|
+
limit?: number;
|
|
78
|
+
cursor?: number;
|
|
79
|
+
}): Promise<ApiResult>;
|
|
80
|
+
getPublicPmCanonicalDetail(key: string): Promise<ApiResult>;
|
|
81
|
+
getPublicPmVolumeHistory(): Promise<ApiResult>;
|
|
64
82
|
whoami(apiKey?: string, agentTrace?: AgentTrace): Promise<ApiResult>;
|
|
65
83
|
getPortfolio(query?: {
|
|
66
84
|
fiat?: string;
|
package/dist/client.js
CHANGED
|
@@ -212,6 +212,24 @@ export class CoinRithmClient {
|
|
|
212
212
|
getPublicPmWhales() {
|
|
213
213
|
return this.publicRequest("/api/prediction-markets/whales");
|
|
214
214
|
}
|
|
215
|
+
// Cross-venue disagreement clusters (approved event matches, graph-clustered).
|
|
216
|
+
getPublicPmMatches(query) {
|
|
217
|
+
return this.publicRequest("/api/prediction-markets/matches/public", query);
|
|
218
|
+
}
|
|
219
|
+
// Per-venue forecast-accuracy calibration (ECE + reliability curve). No query params.
|
|
220
|
+
getPublicPmCalibration() {
|
|
221
|
+
return this.publicRequest("/api/prediction-markets/calibration");
|
|
222
|
+
}
|
|
223
|
+
getPublicPmCanonicalList(query) {
|
|
224
|
+
return this.publicRequest("/api/prediction-markets/canonical", query);
|
|
225
|
+
}
|
|
226
|
+
getPublicPmCanonicalDetail(key) {
|
|
227
|
+
return this.publicRequest(`/api/prediction-markets/canonical/${encodeURIComponent(key)}`);
|
|
228
|
+
}
|
|
229
|
+
// Global daily volume trend (real-money venues only). No query params.
|
|
230
|
+
getPublicPmVolumeHistory() {
|
|
231
|
+
return this.publicRequest("/api/prediction-markets/volume-history");
|
|
232
|
+
}
|
|
215
233
|
// Every method takes an optional trailing `apiKey` (the per-request key for
|
|
216
234
|
// the multi-user HTTP path). When omitted, the constructor key (stdio) is used.
|
|
217
235
|
// ---- reads (scope: read) ----
|
package/dist/http.js
CHANGED
|
@@ -46,7 +46,9 @@ async function main() {
|
|
|
46
46
|
const app = express();
|
|
47
47
|
app.use(express.json());
|
|
48
48
|
// Lightweight, unauthenticated liveness probe (handy for Coolify/uptime checks).
|
|
49
|
-
|
|
49
|
+
// Keep `/healthz` as the deployment contract and expose `/health` as a
|
|
50
|
+
// compatibility alias for agents and generic uptime monitors.
|
|
51
|
+
app.get(["/health", "/healthz"], (_req, res) => {
|
|
50
52
|
res.json({
|
|
51
53
|
ok: true,
|
|
52
54
|
service: "coinrithm-mcp",
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { CoinRithmClient } from "./client.js";
|
|
3
3
|
export declare const PAPER_NOTE: string;
|
|
4
|
+
/**
|
|
5
|
+
* Keep keyless discovery calls small enough for an agent context window.
|
|
6
|
+
* Full event evidence remains available from pm_data_event.
|
|
7
|
+
*/
|
|
8
|
+
export declare function compactPublicPmOverview(data: unknown): unknown;
|
|
9
|
+
export declare function compactPublicPmEvents(data: unknown): unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Default event detail for agents: enough provenance and comparison evidence
|
|
12
|
+
* to reason safely without recursively spending an entire context window.
|
|
13
|
+
* Callers can explicitly request detail=full for the untouched API record.
|
|
14
|
+
*/
|
|
15
|
+
export declare function compactPublicPmEvent(data: unknown): unknown;
|
|
16
|
+
export declare function compactPublicPmWhales(data: unknown, limit: number): unknown;
|
|
17
|
+
/**
|
|
18
|
+
* Keep cross-venue disagreement clusters small enough for an agent context
|
|
19
|
+
* window: each event is reduced to eventSummary (drops descriptions, images,
|
|
20
|
+
* sparklines) and each pairwise comparison keeps only its top-5 highest-delta
|
|
21
|
+
* shared outcomes (compactComparison) — the same bounding pm_data_event
|
|
22
|
+
* applies to crossSourceMatches. Verified live: a 5-cluster page drops from
|
|
23
|
+
* ~466KB to ~48KB.
|
|
24
|
+
*/
|
|
25
|
+
export declare function compactPublicPmDisagreements(data: unknown): unknown;
|
|
4
26
|
export declare function registerTools(server: McpServer, client: CoinRithmClient): void;
|