@spfunctions/cli 1.1.5 → 1.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.
- package/dist/client.d.ts +5 -0
- package/dist/client.js +17 -0
- package/dist/commands/agent.d.ts +1 -0
- package/dist/commands/agent.js +1170 -76
- package/dist/commands/announcements.d.ts +3 -0
- package/dist/commands/announcements.js +28 -0
- package/dist/commands/balance.d.ts +3 -0
- package/dist/commands/balance.js +17 -0
- package/dist/commands/cancel.d.ts +5 -0
- package/dist/commands/cancel.js +41 -0
- package/dist/commands/dashboard.d.ts +11 -0
- package/dist/commands/dashboard.js +195 -0
- package/dist/commands/feed.d.ts +13 -0
- package/dist/commands/feed.js +73 -0
- package/dist/commands/fills.d.ts +4 -0
- package/dist/commands/fills.js +29 -0
- package/dist/commands/forecast.d.ts +4 -0
- package/dist/commands/forecast.js +53 -0
- package/dist/commands/history.d.ts +3 -0
- package/dist/commands/history.js +38 -0
- package/dist/commands/milestones.d.ts +8 -0
- package/dist/commands/milestones.js +56 -0
- package/dist/commands/orders.d.ts +4 -0
- package/dist/commands/orders.js +28 -0
- package/dist/commands/publish.js +21 -2
- package/dist/commands/rfq.d.ts +5 -0
- package/dist/commands/rfq.js +35 -0
- package/dist/commands/schedule.d.ts +3 -0
- package/dist/commands/schedule.js +38 -0
- package/dist/commands/settlements.d.ts +6 -0
- package/dist/commands/settlements.js +50 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +45 -3
- package/dist/commands/signal.js +12 -1
- package/dist/commands/strategies.d.ts +11 -0
- package/dist/commands/strategies.js +130 -0
- package/dist/commands/trade.d.ts +12 -0
- package/dist/commands/trade.js +78 -0
- package/dist/commands/whatif.d.ts +17 -0
- package/dist/commands/whatif.js +209 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +13 -0
- package/dist/index.js +177 -3
- package/dist/kalshi.d.ts +71 -0
- package/dist/kalshi.js +257 -17
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -17,9 +17,14 @@ export declare class SFClient {
|
|
|
17
17
|
createThesis(rawThesis: string, sync?: boolean): Promise<any>;
|
|
18
18
|
injectSignal(id: string, type: string, content: string, source?: string): Promise<any>;
|
|
19
19
|
evaluate(id: string): Promise<any>;
|
|
20
|
+
getFeed(hours?: number, limit?: number): Promise<any>;
|
|
20
21
|
updateThesis(id: string, data: Record<string, unknown>): Promise<any>;
|
|
21
22
|
publish(id: string, slug: string, description?: string): Promise<any>;
|
|
22
23
|
unpublish(id: string): Promise<any>;
|
|
24
|
+
getStrategies(id: string, status?: string): Promise<any>;
|
|
25
|
+
createStrategyAPI(id: string, data: Record<string, unknown>): Promise<any>;
|
|
26
|
+
updateStrategyAPI(thesisId: string, strategyId: string, data: Record<string, unknown>): Promise<any>;
|
|
27
|
+
deleteStrategyAPI(thesisId: string, strategyId: string): Promise<any>;
|
|
23
28
|
}
|
|
24
29
|
export declare function kalshiFetchAllSeries(): Promise<any[]>;
|
|
25
30
|
export declare function kalshiFetchEvents(seriesTicker: string): Promise<any[]>;
|
package/dist/client.js
CHANGED
|
@@ -62,6 +62,9 @@ class SFClient {
|
|
|
62
62
|
async evaluate(id) {
|
|
63
63
|
return this.request('POST', `/api/thesis/${id}/evaluate`);
|
|
64
64
|
}
|
|
65
|
+
async getFeed(hours = 24, limit = 200) {
|
|
66
|
+
return this.request('GET', `/api/feed?hours=${hours}&limit=${limit}`);
|
|
67
|
+
}
|
|
65
68
|
async updateThesis(id, data) {
|
|
66
69
|
return this.request('PATCH', `/api/thesis/${id}`, data);
|
|
67
70
|
}
|
|
@@ -71,6 +74,20 @@ class SFClient {
|
|
|
71
74
|
async unpublish(id) {
|
|
72
75
|
return this.request('DELETE', `/api/thesis/${id}/publish`);
|
|
73
76
|
}
|
|
77
|
+
// ── Strategy operations ──
|
|
78
|
+
async getStrategies(id, status) {
|
|
79
|
+
const qs = status ? `?status=${status}` : '';
|
|
80
|
+
return this.request('GET', `/api/thesis/${id}/strategies${qs}`);
|
|
81
|
+
}
|
|
82
|
+
async createStrategyAPI(id, data) {
|
|
83
|
+
return this.request('POST', `/api/thesis/${id}/strategies`, data);
|
|
84
|
+
}
|
|
85
|
+
async updateStrategyAPI(thesisId, strategyId, data) {
|
|
86
|
+
return this.request('PATCH', `/api/thesis/${thesisId}/strategies/${strategyId}`, data);
|
|
87
|
+
}
|
|
88
|
+
async deleteStrategyAPI(thesisId, strategyId) {
|
|
89
|
+
return this.request('DELETE', `/api/thesis/${thesisId}/strategies/${strategyId}`);
|
|
90
|
+
}
|
|
74
91
|
}
|
|
75
92
|
exports.SFClient = SFClient;
|
|
76
93
|
// ===== Kalshi Public API (no auth) =====
|