@coinrithm/mcp-trading 0.7.7 → 0.7.8

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.
@@ -10,6 +10,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
10
10
  takeProfitPrice: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>;
11
11
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
12
12
  rationaleSummary: z.ZodOptional<z.ZodString>;
13
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
13
14
  }, "strict", z.ZodTypeAny, {
14
15
  symbol: string;
15
16
  side: "long" | "short";
@@ -20,6 +21,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
20
21
  takeProfitPrice?: any;
21
22
  confidence?: any;
22
23
  rationaleSummary?: string | undefined;
24
+ thesis?: import("./types.js").Thesis | undefined;
23
25
  }, {
24
26
  symbol: string;
25
27
  side: "long" | "short";
@@ -30,24 +32,28 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
30
32
  takeProfitPrice?: unknown;
31
33
  confidence?: unknown;
32
34
  rationaleSummary?: string | undefined;
35
+ thesis?: any;
33
36
  }>, z.ZodObject<{
34
37
  type: z.ZodLiteral<"futures_close">;
35
38
  positionId: z.ZodEffects<z.ZodTypeAny, any, unknown>;
36
39
  fraction: z.ZodOptional<z.ZodEffects<z.ZodTypeAny, any, unknown>>;
37
40
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
38
41
  rationaleSummary: z.ZodOptional<z.ZodString>;
42
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
39
43
  }, "strict", z.ZodTypeAny, {
40
44
  type: "futures_close";
41
45
  positionId?: any;
42
46
  fraction?: any;
43
47
  confidence?: any;
44
48
  rationaleSummary?: string | undefined;
49
+ thesis?: import("./types.js").Thesis | undefined;
45
50
  }, {
46
51
  type: "futures_close";
47
52
  positionId?: unknown;
48
53
  fraction?: unknown;
49
54
  confidence?: unknown;
50
55
  rationaleSummary?: string | undefined;
56
+ thesis?: any;
51
57
  }>, z.ZodObject<{
52
58
  type: z.ZodLiteral<"futures_set_sltp">;
53
59
  positionId: z.ZodEffects<z.ZodTypeAny, any, unknown>;
@@ -55,6 +61,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
55
61
  takeProfitPrice: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>;
56
62
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
57
63
  rationaleSummary: z.ZodOptional<z.ZodString>;
64
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
58
65
  }, "strict", z.ZodTypeAny, {
59
66
  type: "futures_set_sltp";
60
67
  stopLossPrice?: any;
@@ -62,6 +69,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
62
69
  positionId?: any;
63
70
  confidence?: any;
64
71
  rationaleSummary?: string | undefined;
72
+ thesis?: import("./types.js").Thesis | undefined;
65
73
  }, {
66
74
  type: "futures_set_sltp";
67
75
  stopLossPrice?: unknown;
@@ -69,6 +77,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
69
77
  positionId?: unknown;
70
78
  confidence?: unknown;
71
79
  rationaleSummary?: string | undefined;
80
+ thesis?: any;
72
81
  }>, z.ZodObject<{
73
82
  type: z.ZodLiteral<"spot_order">;
74
83
  symbol: z.ZodString;
@@ -79,6 +88,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
79
88
  stopPrice: z.ZodOptional<z.ZodEffects<z.ZodTypeAny, any, unknown>>;
80
89
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
81
90
  rationaleSummary: z.ZodOptional<z.ZodString>;
91
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
82
92
  }, "strict", z.ZodTypeAny, {
83
93
  symbol: string;
84
94
  side: "buy" | "sell";
@@ -89,6 +99,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
89
99
  stopPrice?: any;
90
100
  confidence?: any;
91
101
  rationaleSummary?: string | undefined;
102
+ thesis?: import("./types.js").Thesis | undefined;
92
103
  }, {
93
104
  symbol: string;
94
105
  side: "buy" | "sell";
@@ -99,21 +110,25 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
99
110
  stopPrice?: unknown;
100
111
  confidence?: unknown;
101
112
  rationaleSummary?: string | undefined;
113
+ thesis?: any;
102
114
  }>, z.ZodObject<{
103
115
  type: z.ZodLiteral<"spot_cancel">;
104
116
  orderId: z.ZodEffects<z.ZodTypeAny, any, unknown>;
105
117
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
106
118
  rationaleSummary: z.ZodOptional<z.ZodString>;
119
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
107
120
  }, "strict", z.ZodTypeAny, {
108
121
  type: "spot_cancel";
109
122
  confidence?: any;
110
123
  rationaleSummary?: string | undefined;
111
124
  orderId?: any;
125
+ thesis?: import("./types.js").Thesis | undefined;
112
126
  }, {
113
127
  type: "spot_cancel";
114
128
  confidence?: unknown;
115
129
  rationaleSummary?: string | undefined;
116
130
  orderId?: unknown;
131
+ thesis?: any;
117
132
  }>, z.ZodObject<{
118
133
  type: z.ZodLiteral<"pm_open">;
119
134
  ref: z.ZodOptional<z.ZodString>;
@@ -124,6 +139,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
124
139
  confidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodTypeAny, any, unknown>>>, any, unknown>;
125
140
  rationaleSummary: z.ZodOptional<z.ZodString>;
126
141
  forecastProbability: z.ZodOptional<z.ZodEffects<z.ZodAny, number | undefined, any>>;
142
+ thesis: z.ZodOptional<z.ZodEffects<z.ZodAny, import("./types.js").Thesis | undefined, any>>;
127
143
  }, "strict", z.ZodTypeAny, {
128
144
  type: "pm_open";
129
145
  source?: string | undefined;
@@ -133,6 +149,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
133
149
  forecastProbability?: number | undefined;
134
150
  confidence?: any;
135
151
  rationaleSummary?: string | undefined;
152
+ thesis?: import("./types.js").Thesis | undefined;
136
153
  ref?: string | undefined;
137
154
  }, {
138
155
  type: "pm_open";
@@ -143,8 +160,383 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
143
160
  forecastProbability?: any;
144
161
  confidence?: unknown;
145
162
  rationaleSummary?: string | undefined;
163
+ thesis?: any;
146
164
  ref?: string | undefined;
147
165
  }>]>;
166
+ export declare const DECISION_JSON_SCHEMA: {
167
+ readonly type: "object";
168
+ readonly properties: {
169
+ readonly actions: {
170
+ readonly type: "array";
171
+ readonly items: {
172
+ readonly oneOf: readonly [{
173
+ readonly type: "object";
174
+ readonly properties: {
175
+ readonly type: {
176
+ readonly const: "futures_open";
177
+ };
178
+ readonly symbol: {
179
+ readonly type: "string";
180
+ readonly minLength: 1;
181
+ };
182
+ readonly side: {
183
+ readonly enum: readonly ["long", "short"];
184
+ };
185
+ readonly leverage: {
186
+ readonly type: "number";
187
+ readonly exclusiveMinimum: 0;
188
+ };
189
+ readonly marginMusd: {
190
+ readonly type: "number";
191
+ readonly exclusiveMinimum: 0;
192
+ };
193
+ readonly stopLossPrice: {
194
+ anyOf: {
195
+ type: string;
196
+ }[];
197
+ };
198
+ readonly takeProfitPrice: {
199
+ anyOf: {
200
+ type: string;
201
+ }[];
202
+ };
203
+ readonly confidence: {
204
+ type: string;
205
+ minimum: number;
206
+ maximum: number;
207
+ };
208
+ readonly rationaleSummary: {
209
+ type: string;
210
+ };
211
+ readonly thesis: {
212
+ readonly type: "object";
213
+ readonly properties: {
214
+ readonly summary: {
215
+ readonly type: "string";
216
+ readonly maxLength: 200;
217
+ };
218
+ readonly invalidation: {
219
+ readonly type: "object";
220
+ readonly properties: {
221
+ readonly priceBelow: {
222
+ readonly type: "number";
223
+ readonly exclusiveMinimum: 0;
224
+ };
225
+ readonly priceAbove: {
226
+ readonly type: "number";
227
+ readonly exclusiveMinimum: 0;
228
+ };
229
+ readonly probabilityBelow: {
230
+ readonly type: "number";
231
+ readonly exclusiveMinimum: 0;
232
+ readonly maximum: 100;
233
+ };
234
+ readonly probabilityAbove: {
235
+ readonly type: "number";
236
+ readonly exclusiveMinimum: 0;
237
+ readonly maximum: 100;
238
+ };
239
+ readonly maxHoldMinutes: {
240
+ readonly type: "number";
241
+ readonly exclusiveMinimum: 0;
242
+ };
243
+ readonly catalyst: {
244
+ readonly type: "string";
245
+ readonly maxLength: 160;
246
+ };
247
+ };
248
+ readonly additionalProperties: false;
249
+ };
250
+ };
251
+ readonly required: readonly ["summary", "invalidation"];
252
+ readonly additionalProperties: false;
253
+ };
254
+ };
255
+ readonly required: readonly ["type", "symbol", "side", "leverage", "marginMusd", "thesis"];
256
+ readonly additionalProperties: false;
257
+ }, {
258
+ readonly type: "object";
259
+ readonly properties: {
260
+ readonly type: {
261
+ readonly const: "futures_close";
262
+ };
263
+ readonly positionId: {
264
+ readonly type: "number";
265
+ };
266
+ readonly fraction: {
267
+ readonly type: "number";
268
+ readonly exclusiveMinimum: 0;
269
+ readonly maximum: 1;
270
+ };
271
+ readonly confidence: {
272
+ type: string;
273
+ minimum: number;
274
+ maximum: number;
275
+ };
276
+ readonly rationaleSummary: {
277
+ type: string;
278
+ };
279
+ };
280
+ readonly required: readonly ["type", "positionId"];
281
+ readonly additionalProperties: false;
282
+ }, {
283
+ readonly type: "object";
284
+ readonly properties: {
285
+ readonly type: {
286
+ readonly const: "futures_set_sltp";
287
+ };
288
+ readonly positionId: {
289
+ readonly type: "number";
290
+ };
291
+ readonly stopLossPrice: {
292
+ anyOf: {
293
+ type: string;
294
+ }[];
295
+ };
296
+ readonly takeProfitPrice: {
297
+ anyOf: {
298
+ type: string;
299
+ }[];
300
+ };
301
+ readonly confidence: {
302
+ type: string;
303
+ minimum: number;
304
+ maximum: number;
305
+ };
306
+ readonly rationaleSummary: {
307
+ type: string;
308
+ };
309
+ };
310
+ readonly required: readonly ["type", "positionId"];
311
+ readonly additionalProperties: false;
312
+ }, {
313
+ readonly type: "object";
314
+ readonly properties: {
315
+ readonly type: {
316
+ readonly const: "spot_order";
317
+ };
318
+ readonly symbol: {
319
+ readonly type: "string";
320
+ readonly minLength: 1;
321
+ };
322
+ readonly side: {
323
+ readonly enum: readonly ["buy", "sell"];
324
+ };
325
+ readonly orderType: {
326
+ readonly enum: readonly ["market", "limit", "stop"];
327
+ };
328
+ readonly quantity: {
329
+ readonly type: "number";
330
+ readonly exclusiveMinimum: 0;
331
+ };
332
+ readonly limitPrice: {
333
+ readonly type: "number";
334
+ readonly exclusiveMinimum: 0;
335
+ };
336
+ readonly stopPrice: {
337
+ readonly type: "number";
338
+ readonly exclusiveMinimum: 0;
339
+ };
340
+ readonly confidence: {
341
+ type: string;
342
+ minimum: number;
343
+ maximum: number;
344
+ };
345
+ readonly rationaleSummary: {
346
+ type: string;
347
+ };
348
+ readonly thesis: {
349
+ readonly type: "object";
350
+ readonly properties: {
351
+ readonly summary: {
352
+ readonly type: "string";
353
+ readonly maxLength: 200;
354
+ };
355
+ readonly invalidation: {
356
+ readonly type: "object";
357
+ readonly properties: {
358
+ readonly priceBelow: {
359
+ readonly type: "number";
360
+ readonly exclusiveMinimum: 0;
361
+ };
362
+ readonly priceAbove: {
363
+ readonly type: "number";
364
+ readonly exclusiveMinimum: 0;
365
+ };
366
+ readonly probabilityBelow: {
367
+ readonly type: "number";
368
+ readonly exclusiveMinimum: 0;
369
+ readonly maximum: 100;
370
+ };
371
+ readonly probabilityAbove: {
372
+ readonly type: "number";
373
+ readonly exclusiveMinimum: 0;
374
+ readonly maximum: 100;
375
+ };
376
+ readonly maxHoldMinutes: {
377
+ readonly type: "number";
378
+ readonly exclusiveMinimum: 0;
379
+ };
380
+ readonly catalyst: {
381
+ readonly type: "string";
382
+ readonly maxLength: 160;
383
+ };
384
+ };
385
+ readonly additionalProperties: false;
386
+ };
387
+ };
388
+ readonly required: readonly ["summary", "invalidation"];
389
+ readonly additionalProperties: false;
390
+ };
391
+ };
392
+ readonly required: readonly ["type", "symbol", "side", "orderType", "quantity", "thesis"];
393
+ readonly additionalProperties: false;
394
+ }, {
395
+ readonly type: "object";
396
+ readonly properties: {
397
+ readonly type: {
398
+ readonly const: "spot_cancel";
399
+ };
400
+ readonly orderId: {
401
+ readonly type: "number";
402
+ };
403
+ readonly confidence: {
404
+ type: string;
405
+ minimum: number;
406
+ maximum: number;
407
+ };
408
+ readonly rationaleSummary: {
409
+ type: string;
410
+ };
411
+ };
412
+ readonly required: readonly ["type", "orderId"];
413
+ readonly additionalProperties: false;
414
+ }, {
415
+ readonly type: "object";
416
+ readonly properties: {
417
+ readonly type: {
418
+ readonly const: "pm_open";
419
+ };
420
+ readonly ref: {
421
+ readonly type: "string";
422
+ readonly minLength: 1;
423
+ };
424
+ readonly stakeMusd: {
425
+ readonly type: "number";
426
+ readonly exclusiveMinimum: 0;
427
+ };
428
+ readonly confidence: {
429
+ type: string;
430
+ minimum: number;
431
+ maximum: number;
432
+ };
433
+ readonly rationaleSummary: {
434
+ type: string;
435
+ };
436
+ readonly forecastProbability: {
437
+ readonly type: "number";
438
+ };
439
+ readonly thesis: {
440
+ readonly type: "object";
441
+ readonly properties: {
442
+ readonly summary: {
443
+ readonly type: "string";
444
+ readonly maxLength: 200;
445
+ };
446
+ readonly invalidation: {
447
+ readonly type: "object";
448
+ readonly properties: {
449
+ readonly priceBelow: {
450
+ readonly type: "number";
451
+ readonly exclusiveMinimum: 0;
452
+ };
453
+ readonly priceAbove: {
454
+ readonly type: "number";
455
+ readonly exclusiveMinimum: 0;
456
+ };
457
+ readonly probabilityBelow: {
458
+ readonly type: "number";
459
+ readonly exclusiveMinimum: 0;
460
+ readonly maximum: 100;
461
+ };
462
+ readonly probabilityAbove: {
463
+ readonly type: "number";
464
+ readonly exclusiveMinimum: 0;
465
+ readonly maximum: 100;
466
+ };
467
+ readonly maxHoldMinutes: {
468
+ readonly type: "number";
469
+ readonly exclusiveMinimum: 0;
470
+ };
471
+ readonly catalyst: {
472
+ readonly type: "string";
473
+ readonly maxLength: 160;
474
+ };
475
+ };
476
+ readonly additionalProperties: false;
477
+ };
478
+ };
479
+ readonly required: readonly ["summary", "invalidation"];
480
+ readonly additionalProperties: false;
481
+ };
482
+ };
483
+ readonly required: readonly ["type", "ref", "stakeMusd", "thesis"];
484
+ readonly additionalProperties: false;
485
+ }];
486
+ };
487
+ };
488
+ readonly confidence: {
489
+ type: string;
490
+ minimum: number;
491
+ maximum: number;
492
+ };
493
+ readonly reason: {
494
+ readonly type: "string";
495
+ };
496
+ readonly rationale: {
497
+ readonly type: "string";
498
+ readonly maxLength: 1200;
499
+ };
500
+ readonly decision: {
501
+ readonly enum: readonly ["skip", "act"];
502
+ };
503
+ };
504
+ readonly required: readonly ["decision", "actions"];
505
+ readonly additionalProperties: false;
506
+ readonly allOf: readonly [{
507
+ readonly if: {
508
+ readonly properties: {
509
+ readonly decision: {
510
+ readonly const: "act";
511
+ };
512
+ };
513
+ readonly required: readonly ["decision"];
514
+ };
515
+ readonly then: {
516
+ readonly properties: {
517
+ readonly actions: {
518
+ readonly minItems: 1;
519
+ };
520
+ };
521
+ };
522
+ }, {
523
+ readonly if: {
524
+ readonly properties: {
525
+ readonly decision: {
526
+ readonly const: "skip";
527
+ };
528
+ };
529
+ readonly required: readonly ["decision"];
530
+ };
531
+ readonly then: {
532
+ readonly properties: {
533
+ readonly actions: {
534
+ readonly maxItems: 0;
535
+ };
536
+ };
537
+ };
538
+ }];
539
+ };
148
540
  export type ParseDecisionResult = {
149
541
  ok: true;
150
542
  decision: Decision;