@coinrithm/mcp-trading 0.1.6 → 0.1.7

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 +63 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -58,12 +58,12 @@ key upstream. See [`DEPLOY.md`](./DEPLOY.md).
58
58
  | `get_my_trades` (venue) | read | `GET /api/agent/trades` |
59
59
  | `get_market_context` (coinId) | read | `GET /api/agent/market/:coinId` |
60
60
  | `get_candles` (coinId, range) | read | `GET /api/agent/market/:coinId/candles` |
61
- | `discover_pm_markets` | read | `GET /api/agent/pm/discover` |
62
- | `get_performance` | read | `GET /api/agent/performance` |
63
- | `get_agent_ledger` | read | `GET /api/agent/ledger` |
64
- | `export_agent_ledger` | read | `GET /api/agent/ledger/export` |
65
- | `get_arena_leaderboard` | read | `GET /api/arena` |
66
- | `get_arena_agent` (handle) | read | `GET /api/arena/:handle` |
61
+ | `discover_pm_markets` | read | `GET /api/agent/pm/discover` |
62
+ | `get_performance` | read | `GET /api/agent/performance` |
63
+ | `get_agent_ledger` | read | `GET /api/agent/ledger` |
64
+ | `export_agent_ledger` | read | `GET /api/agent/ledger/export` |
65
+ | `get_arena_leaderboard` | read | `GET /api/arena` |
66
+ | `get_arena_agent` (handle) | read | `GET /api/arena/:handle` |
67
67
  | `list_open_orders` | read | `GET /api/agent/orders/open` |
68
68
  | `get_positions` (venue) | read | `GET /api/agent/positions/{futures,pm}` |
69
69
  | `spot_quote` | read | `POST /api/agent/spot/quote` |
@@ -82,37 +82,63 @@ key upstream. See [`DEPLOY.md`](./DEPLOY.md).
82
82
  Naturally idempotent — no `idempotencyKey` needed (unlike spot orders, opens,
83
83
  and closes, which all require one; reuse replays the original result).
84
84
 
85
- Tool results return the raw HTTP status + JSON body so the model sees real
86
- server responses (including `{ error, blockReasons }` on blocked entries).
87
- They also include `ledgerEventId` and `ledgerStatus` when CoinRithm records the
88
- private action ledger row for the call.
89
-
90
- ## Private ledger and trace metadata
91
-
92
- Every `/api/agent/*` call is recorded privately for the calling key: reads,
93
- quotes, writes, rejects, idempotent replays, latency, sanitized summaries, and
94
- optional run/decision metadata. CoinRithm logs execution and performance for
95
- paper trading; it does **not** run your agent or verify hidden reasoning.
96
-
97
- All MCP read/quote/write tools accept optional `agentTrace`:
98
-
99
- ```json
100
- {
101
- "runId": "run-2026-06-12",
102
- "decisionId": "decision-7",
103
- "strategyLabel": "momentum",
104
- "confidence": 0.72,
105
- "rationaleSummary": "Short private summary only; no chain-of-thought."
106
- }
107
- ```
108
-
109
- Use the same `runId` across a session and a new `decisionId` per quote/write
110
- intent. Then call `get_agent_ledger` or `export_agent_ledger` to inspect/export
111
- the reproducible evidence trail. Public Arena surfaces only aggregate audit
112
- stats; raw request logs and rationale summaries stay private.
113
-
114
- `get_my_trades`, `list_open_orders`, and `get_positions` accept an optional
115
- `updatedSince` cursor and their responses carry `asOf` — pass it back to poll
85
+ Tool results return the raw HTTP status + JSON body so the model sees real
86
+ server responses (including `{ error, blockReasons }` on blocked entries).
87
+ They also include `ledgerEventId` and `ledgerStatus` when CoinRithm records the
88
+ private action ledger row for the call.
89
+
90
+ ## Private ledger and trace metadata
91
+
92
+ Every `/api/agent/*` call is recorded privately for the calling key: reads,
93
+ quotes, writes, rejects, idempotent replays, latency, sanitized summaries, and
94
+ optional run/decision metadata. CoinRithm logs execution and performance for
95
+ paper trading; it does **not** run your agent or verify hidden reasoning.
96
+
97
+ All MCP read/quote/write tools accept optional `agentTrace`:
98
+
99
+ ```json
100
+ {
101
+ "runId": "run-2026-06-12",
102
+ "decisionId": "decision-7",
103
+ "strategyLabel": "momentum",
104
+ "confidence": 0.72,
105
+ "rationaleSummary": "Short private summary only; no chain-of-thought."
106
+ }
107
+ ```
108
+
109
+ Use the same `runId` across a session and a new `decisionId` per quote/write
110
+ intent. Then call `get_agent_ledger` to inspect rows or `export_agent_ledger`
111
+ with `runId` to export a private run-evidence bundle:
112
+
113
+ ```json
114
+ {
115
+ "runId": "run-2026-06-12",
116
+ "limit": 1000
117
+ }
118
+ ```
119
+
120
+ The export includes a manifest and summary: first/last event time, venues,
121
+ ledger statuses, quote/write/reject/replay counts, related paper-trade ids, and
122
+ the sanitized ledger rows. It also includes `executionAssumptions`: paper
123
+ account only, latest stored market/probability snapshots, no explicit
124
+ commission/slippage in v1, no futures funding/fees, and worker-driven resting
125
+ order / SL / TP / settlement timing. It is a reproducibility artifact for your
126
+ run; it is not a full point-in-time market archive and does not expose hidden
127
+ reasoning. Aggregate audit stats include trace coverage for `runId` and
128
+ `decisionId`. Run exports also include `retentionPolicy`: private ledger rows
129
+ use a rolling retention window and exports are capped. They include
130
+ `evidenceChecklist`, a derived pass/warn/fail checklist for trace completeness,
131
+ decision ids, quote-before-trade coverage, rejected calls, export truncation,
132
+ execution assumptions, and outcome attribution; it does not create additional
133
+ retained data. `outcomeSummary` derives best-effort realized PnL from existing
134
+ related trade/position ids, and spot orders can also match through their
135
+ idempotency keys once a terminal `ClosedOrder` exists. It reports whether
136
+ coverage is `none`, `partial`, or `complete`; it does not store new data. Public
137
+ Arena surfaces only aggregate audit stats; raw request logs and rationale
138
+ summaries stay private.
139
+
140
+ `get_my_trades`, `list_open_orders`, and `get_positions` accept an optional
141
+ `updatedSince` cursor and their responses carry `asOf` — pass it back to poll
116
142
  only what changed (how an agent discovers worker-fired SL/TP, liquidations,
117
143
  and PM settlements).
118
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinrithm/mcp-trading",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "mcpName": "io.github.CoinRithm/mcp-trading",
5
5
  "description": "MCP server for paper-trading on CoinRithm (spot, futures, prediction markets) with a user-minted API key.",
6
6
  "type": "module",