investing 0.1.210 → 0.1.211

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 (266) hide show
  1. package/README.md +119 -167
  2. package/dist/{archiver-web.es-CRQLDa8H.js → archiver-web.es-B69gABHP.js} +1 -1
  3. package/dist/{archiver-web.es-CngZ0F1z.cjs → archiver-web.es-fg4bLLZa.cjs} +1 -1
  4. package/dist/bookmakerAnalysis-Bfo1zUVm.js +1 -0
  5. package/dist/bookmakerAnalysis-CHn1W8uX.cjs +1 -0
  6. package/dist/callGrok-D0D7zBHK.js +1 -0
  7. package/dist/callGrok-DWO719mN.cjs +1 -0
  8. package/dist/db/index.d.ts +0 -189
  9. package/dist/db/index.d.ts.map +1 -1
  10. package/dist/db/schema.d.ts +0 -200
  11. package/dist/db/schema.d.ts.map +1 -1
  12. package/dist/events-BJOyGWeU.cjs +1 -0
  13. package/dist/events-OvBb8rgy.js +1 -0
  14. package/dist/index-D7fsk2gy.js +15 -0
  15. package/dist/index-_V1Ql5Es.cjs +13 -0
  16. package/dist/index.d.ts +1 -2
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.mjs +1 -1
  20. package/dist/live-data/dukascopy-client.d.ts +2 -19
  21. package/dist/live-data/dukascopy-client.d.ts.map +1 -1
  22. package/dist/polymarket-updown-15-limit-order-bot-DCC8HE9Z.cjs +1 -0
  23. package/dist/polymarket-updown-15-limit-order-bot-Dv5oGAF4.js +1 -0
  24. package/dist/prediction/api/analytics.d.ts.map +1 -1
  25. package/dist/prediction/api/leaderboard.d.ts +11 -29
  26. package/dist/prediction/api/leaderboard.d.ts.map +1 -1
  27. package/dist/prediction/api/markets.d.ts.map +1 -1
  28. package/dist/prediction/api/prices.d.ts.map +1 -1
  29. package/dist/prediction/db/markets.d.ts +0 -13
  30. package/dist/prediction/db/markets.d.ts.map +1 -1
  31. package/dist/prediction/index.d.ts +0 -2
  32. package/dist/prediction/index.d.ts.map +1 -1
  33. package/dist/prediction/sync/incremental-markets.d.ts.map +1 -1
  34. package/dist/prediction/sync/leaderboard.d.ts +1 -1
  35. package/dist/prediction/sync/leaderboard.d.ts.map +1 -1
  36. package/dist/prediction/sync/markets.d.ts +2 -2
  37. package/dist/prediction/sync/markets.d.ts.map +1 -1
  38. package/dist/prediction/sync/orchestration.d.ts +1 -1
  39. package/dist/prediction/sync/trade-history.d.ts.map +1 -1
  40. package/dist/predictos/agents/bookmaker-agent.d.ts.map +1 -0
  41. package/dist/predictos/agents/event-analysis-agent.d.ts.map +1 -0
  42. package/dist/{prediction-markets → predictos}/agents/index.d.ts +1 -5
  43. package/dist/predictos/agents/index.d.ts.map +1 -0
  44. package/dist/predictos/agents/index.js +1 -0
  45. package/dist/predictos/agents/index.mjs +1 -0
  46. package/dist/predictos/agents/mapper-agent.d.ts.map +1 -0
  47. package/dist/{prediction-markets → predictos}/agents/polyfactual-research.d.ts +1 -1
  48. package/dist/predictos/agents/polyfactual-research.d.ts.map +1 -0
  49. package/dist/predictos/agents/polymarket-position-tracker.d.ts.map +1 -0
  50. package/dist/{prediction-markets → predictos}/agents/polymarket-put-order.d.ts +1 -1
  51. package/dist/predictos/agents/polymarket-put-order.d.ts.map +1 -0
  52. package/dist/predictos/agents/polymarket-updown-15-limit-order-bot.d.ts.map +1 -0
  53. package/dist/predictos/agents/x402-seller.d.ts.map +1 -0
  54. package/dist/predictos/ai/callBlockRun.d.ts.map +1 -0
  55. package/dist/predictos/ai/callGrok.d.ts.map +1 -0
  56. package/dist/predictos/ai/callOpenAI.d.ts.map +1 -0
  57. package/dist/predictos/ai/http.d.ts.map +1 -0
  58. package/dist/{prediction-markets → predictos}/ai/index.d.ts +1 -1
  59. package/dist/predictos/ai/index.d.ts.map +1 -0
  60. package/dist/predictos/ai/index.js +1 -0
  61. package/dist/predictos/ai/index.mjs +1 -0
  62. package/dist/predictos/ai/prompts/analyzeEventMarkets.d.ts.map +1 -0
  63. package/dist/predictos/ai/prompts/arbitrageAnalysis.d.ts.map +1 -0
  64. package/dist/predictos/ai/prompts/bookmakerAnalysis.d.ts.map +1 -0
  65. package/dist/predictos/ai/prompts/searchQueryGenerator.d.ts.map +1 -0
  66. package/dist/predictos/ai/types.d.ts.map +1 -0
  67. package/dist/predictos/arbitrage.d.ts.map +1 -0
  68. package/dist/predictos/arbitrage.js +1 -0
  69. package/dist/predictos/arbitrage.mjs +1 -0
  70. package/dist/{prediction-markets → predictos}/clients/polyfactual.d.ts +1 -1
  71. package/dist/predictos/clients/polyfactual.d.ts.map +1 -0
  72. package/dist/{prediction-markets → predictos}/clients/polymarket.d.ts +1 -1
  73. package/dist/predictos/clients/polymarket.d.ts.map +1 -0
  74. package/dist/{prediction-markets → predictos}/clients/x402.d.ts +1 -1
  75. package/dist/predictos/clients/x402.d.ts.map +1 -0
  76. package/dist/{prediction-markets → predictos}/data/kalshi.d.ts +1 -1
  77. package/dist/predictos/data/kalshi.d.ts.map +1 -0
  78. package/dist/predictos/data/kalshi.js +1 -0
  79. package/dist/predictos/data/kalshi.mjs +1 -0
  80. package/dist/{prediction-markets → predictos}/data/polymarket.d.ts +1 -1
  81. package/dist/predictos/data/polymarket.d.ts.map +1 -0
  82. package/dist/predictos/data/polymarket.js +1 -0
  83. package/dist/predictos/data/polymarket.mjs +1 -0
  84. package/dist/predictos/events.d.ts.map +1 -0
  85. package/dist/{prediction-markets → predictos}/index.d.ts +5 -8
  86. package/dist/predictos/index.d.ts.map +1 -0
  87. package/dist/predictos/index.js +1 -0
  88. package/dist/predictos/index.mjs +1 -0
  89. package/dist/{prediction-markets → predictos}/types.d.ts +6 -121
  90. package/dist/predictos/types.d.ts.map +1 -0
  91. package/dist/searchQueryGenerator-DIIs9xw5.js +1 -0
  92. package/dist/searchQueryGenerator-rCVblXJS.cjs +1 -0
  93. package/dist/stocks/index.d.ts +1 -2
  94. package/dist/stocks/index.d.ts.map +1 -1
  95. package/dist/stocks/quote-cache-service.d.ts +2 -11
  96. package/dist/stocks/quote-cache-service.d.ts.map +1 -1
  97. package/dist/stocks/unified-quote-service.d.ts +6 -15
  98. package/dist/stocks/unified-quote-service.d.ts.map +1 -1
  99. package/dist/stocks/yahoo-finance-wrapper.d.ts +3 -39
  100. package/dist/stocks/yahoo-finance-wrapper.d.ts.map +1 -1
  101. package/dist/trading-agents/agents/debate-facilitator.d.ts +3 -3
  102. package/dist/trading-agents/agents/debate-facilitator.d.ts.map +1 -1
  103. package/dist/trading-agents/agents/fund-manager.d.ts +2 -4
  104. package/dist/trading-agents/agents/fund-manager.d.ts.map +1 -1
  105. package/dist/trading-agents/agents/improved-researchers.d.ts +3 -3
  106. package/dist/trading-agents/agents/improved-researchers.d.ts.map +1 -1
  107. package/dist/trading-agents/agents/market-analyst.d.ts +2 -2
  108. package/dist/trading-agents/agents/market-analyst.d.ts.map +1 -1
  109. package/dist/trading-agents/agents/news-analyst.d.ts +2 -2
  110. package/dist/trading-agents/agents/news-analyst.d.ts.map +1 -1
  111. package/dist/trading-agents/agents/researchers.d.ts +4 -4
  112. package/dist/trading-agents/agents/researchers.d.ts.map +1 -1
  113. package/dist/trading-agents/agents/risk-team.d.ts +4 -4
  114. package/dist/trading-agents/agents/risk-team.d.ts.map +1 -1
  115. package/dist/trading-agents/agents/trader.d.ts +2 -2
  116. package/dist/trading-agents/agents/trader.d.ts.map +1 -1
  117. package/dist/trading-agents/graph/trading-graph.d.ts +2 -28
  118. package/dist/trading-agents/graph/trading-graph.d.ts.map +1 -1
  119. package/dist/trading-agents/index.d.ts +0 -4
  120. package/dist/trading-agents/index.d.ts.map +1 -1
  121. package/dist/trading-agents/types/index.d.ts +4 -11
  122. package/dist/trading-agents/types/index.d.ts.map +1 -1
  123. package/dist/trading-agents/utils/llm-client.d.ts +1 -4
  124. package/dist/trading-agents/utils/llm-client.d.ts.map +1 -1
  125. package/package.json +50 -19
  126. package/THIRD_PARTY_NOTICES.md +0 -144
  127. package/dist/index-D4DvlP-l.cjs +0 -13
  128. package/dist/index-DRlnLib9.js +0 -15
  129. package/dist/prediction/sync/refill-limits.d.ts +0 -9
  130. package/dist/prediction/sync/refill-limits.d.ts.map +0 -1
  131. package/dist/prediction/sync/refill.d.ts +0 -34
  132. package/dist/prediction/sync/refill.d.ts.map +0 -1
  133. package/dist/prediction/utils/token-ids.d.ts +0 -17
  134. package/dist/prediction/utils/token-ids.d.ts.map +0 -1
  135. package/dist/prediction-markets/adapters/trading-agents.d.ts +0 -21
  136. package/dist/prediction-markets/adapters/trading-agents.d.ts.map +0 -1
  137. package/dist/prediction-markets/agents/bookmaker-agent.d.ts.map +0 -1
  138. package/dist/prediction-markets/agents/event-analysis-agent.d.ts.map +0 -1
  139. package/dist/prediction-markets/agents/index.d.ts.map +0 -1
  140. package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts +0 -7
  141. package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts.map +0 -1
  142. package/dist/prediction-markets/agents/mapper-agent.d.ts.map +0 -1
  143. package/dist/prediction-markets/agents/polyfactual-research.d.ts.map +0 -1
  144. package/dist/prediction-markets/agents/polymarket-position-tracker.d.ts.map +0 -1
  145. package/dist/prediction-markets/agents/polymarket-put-order.d.ts.map +0 -1
  146. package/dist/prediction-markets/agents/polymarket-updown-15-limit-order-bot.d.ts.map +0 -1
  147. package/dist/prediction-markets/agents/x402-seller.d.ts.map +0 -1
  148. package/dist/prediction-markets/ai/callBlockRun.d.ts.map +0 -1
  149. package/dist/prediction-markets/ai/callGrok.d.ts.map +0 -1
  150. package/dist/prediction-markets/ai/callOpenAI.d.ts.map +0 -1
  151. package/dist/prediction-markets/ai/http.d.ts.map +0 -1
  152. package/dist/prediction-markets/ai/index.d.ts.map +0 -1
  153. package/dist/prediction-markets/ai/prompts/analyzeEventMarkets.d.ts.map +0 -1
  154. package/dist/prediction-markets/ai/prompts/arbitrageAnalysis.d.ts.map +0 -1
  155. package/dist/prediction-markets/ai/prompts/bookmakerAnalysis.d.ts.map +0 -1
  156. package/dist/prediction-markets/ai/prompts/searchQueryGenerator.d.ts.map +0 -1
  157. package/dist/prediction-markets/ai/types.d.ts.map +0 -1
  158. package/dist/prediction-markets/arbitrage.d.ts.map +0 -1
  159. package/dist/prediction-markets/clients/polyfactual.d.ts.map +0 -1
  160. package/dist/prediction-markets/clients/polymarket.d.ts.map +0 -1
  161. package/dist/prediction-markets/clients/x402.d.ts.map +0 -1
  162. package/dist/prediction-markets/data/kalshi.d.ts.map +0 -1
  163. package/dist/prediction-markets/data/polymarket.d.ts.map +0 -1
  164. package/dist/prediction-markets/events.d.ts.map +0 -1
  165. package/dist/prediction-markets/execution/paper.d.ts +0 -19
  166. package/dist/prediction-markets/execution/paper.d.ts.map +0 -1
  167. package/dist/prediction-markets/index.cjs +0 -1
  168. package/dist/prediction-markets/index.d.ts.map +0 -1
  169. package/dist/prediction-markets/index.mjs +0 -1
  170. package/dist/prediction-markets/kalshi-momentum.LICENSE +0 -21
  171. package/dist/prediction-markets/strategies/btc15m-fusion.d.ts +0 -27
  172. package/dist/prediction-markets/strategies/btc15m-fusion.d.ts.map +0 -1
  173. package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts +0 -27
  174. package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts.map +0 -1
  175. package/dist/prediction-markets/strategies/gabagool.d.ts +0 -26
  176. package/dist/prediction-markets/strategies/gabagool.d.ts.map +0 -1
  177. package/dist/prediction-markets/strategies/kalshi-momentum.d.ts +0 -13
  178. package/dist/prediction-markets/strategies/kalshi-momentum.d.ts.map +0 -1
  179. package/dist/prediction-markets/types.d.ts.map +0 -1
  180. package/dist/prediction-markets/validation.d.ts +0 -5
  181. package/dist/prediction-markets/validation.d.ts.map +0 -1
  182. package/dist/scripted-llm-C6y_Dk4q.cjs +0 -1
  183. package/dist/scripted-llm-DqaYX5Zn.js +0 -1
  184. package/dist/stocks/strategies/bb-rsi-breakout.d.ts +0 -63
  185. package/dist/stocks/strategies/bb-rsi-breakout.d.ts.map +0 -1
  186. package/dist/stocks/strategies/ema-crossover.d.ts +0 -51
  187. package/dist/stocks/strategies/ema-crossover.d.ts.map +0 -1
  188. package/dist/strategy-signals/data/fixture-data-provider.d.ts +0 -8
  189. package/dist/strategy-signals/data/fixture-data-provider.d.ts.map +0 -1
  190. package/dist/strategy-signals/data/openbb-mapping.d.ts +0 -7
  191. package/dist/strategy-signals/data/openbb-mapping.d.ts.map +0 -1
  192. package/dist/strategy-signals/demo.d.ts +0 -446
  193. package/dist/strategy-signals/demo.d.ts.map +0 -1
  194. package/dist/strategy-signals/execution.d.ts +0 -18
  195. package/dist/strategy-signals/execution.d.ts.map +0 -1
  196. package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts +0 -10
  197. package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts.map +0 -1
  198. package/dist/strategy-signals/index.d.ts +0 -32
  199. package/dist/strategy-signals/index.d.ts.map +0 -1
  200. package/dist/strategy-signals/proposal.d.ts +0 -10
  201. package/dist/strategy-signals/proposal.d.ts.map +0 -1
  202. package/dist/strategy-signals/report.d.ts +0 -6
  203. package/dist/strategy-signals/report.d.ts.map +0 -1
  204. package/dist/strategy-signals/risk-gate.d.ts +0 -3
  205. package/dist/strategy-signals/risk-gate.d.ts.map +0 -1
  206. package/dist/strategy-signals/sources/btc15m-fusion.d.ts +0 -16
  207. package/dist/strategy-signals/sources/btc15m-fusion.d.ts.map +0 -1
  208. package/dist/strategy-signals/sources/copy-trade-sizing.d.ts +0 -15
  209. package/dist/strategy-signals/sources/copy-trade-sizing.d.ts.map +0 -1
  210. package/dist/strategy-signals/sources/gabagool.d.ts +0 -12
  211. package/dist/strategy-signals/sources/gabagool.d.ts.map +0 -1
  212. package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts +0 -42
  213. package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts.map +0 -1
  214. package/dist/strategy-signals/sources/kalshi-momentum.d.ts +0 -10
  215. package/dist/strategy-signals/sources/kalshi-momentum.d.ts.map +0 -1
  216. package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts +0 -15
  217. package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts.map +0 -1
  218. package/dist/strategy-signals/sources/kalshi-vibe.d.ts +0 -11
  219. package/dist/strategy-signals/sources/kalshi-vibe.d.ts.map +0 -1
  220. package/dist/strategy-signals/sources/red-flags.d.ts +0 -13
  221. package/dist/strategy-signals/sources/red-flags.d.ts.map +0 -1
  222. package/dist/strategy-signals/survival-posture.d.ts +0 -13
  223. package/dist/strategy-signals/survival-posture.d.ts.map +0 -1
  224. package/dist/strategy-signals/types.d.ts +0 -138
  225. package/dist/strategy-signals/types.d.ts.map +0 -1
  226. package/dist/strategy-signals/validate.d.ts +0 -15
  227. package/dist/strategy-signals/validate.d.ts.map +0 -1
  228. package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts +0 -3
  229. package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts.map +0 -1
  230. package/dist/strategy-signals/venues/mock-equity-broker.d.ts +0 -16
  231. package/dist/strategy-signals/venues/mock-equity-broker.d.ts.map +0 -1
  232. package/dist/strategy-signals/venues/mock-venue.d.ts +0 -14
  233. package/dist/strategy-signals/venues/mock-venue.d.ts.map +0 -1
  234. package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts +0 -7
  235. package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts.map +0 -1
  236. package/dist/trading-agents/agents/risk-judge.d.ts +0 -13
  237. package/dist/trading-agents/agents/risk-judge.d.ts.map +0 -1
  238. package/dist/trading-agents/index.cjs +0 -1
  239. package/dist/trading-agents/index.mjs +0 -1
  240. package/dist/trading-agents/utils/parse-final-line.d.ts +0 -7
  241. package/dist/trading-agents/utils/parse-final-line.d.ts.map +0 -1
  242. package/dist/trading-agents/utils/scripted-llm.d.ts +0 -17
  243. package/dist/trading-agents/utils/scripted-llm.d.ts.map +0 -1
  244. package/dist/trading-agents/utils/strategy-prompt.d.ts +0 -6
  245. package/dist/trading-agents/utils/strategy-prompt.d.ts.map +0 -1
  246. package/dist/trading-agents-Bh9OORHe.js +0 -1
  247. package/dist/trading-agents-C8M7tbB0.cjs +0 -1
  248. package/dist/validate-C1MS8RhG.js +0 -1
  249. package/dist/validate-DBxPUXqH.cjs +0 -1
  250. /package/dist/{prediction-markets → predictos}/agents/bookmaker-agent.d.ts +0 -0
  251. /package/dist/{prediction-markets → predictos}/agents/event-analysis-agent.d.ts +0 -0
  252. /package/dist/{prediction-markets → predictos}/agents/mapper-agent.d.ts +0 -0
  253. /package/dist/{prediction-markets → predictos}/agents/polymarket-position-tracker.d.ts +0 -0
  254. /package/dist/{prediction-markets → predictos}/agents/polymarket-updown-15-limit-order-bot.d.ts +0 -0
  255. /package/dist/{prediction-markets → predictos}/agents/x402-seller.d.ts +0 -0
  256. /package/dist/{prediction-markets → predictos}/ai/callBlockRun.d.ts +0 -0
  257. /package/dist/{prediction-markets → predictos}/ai/callGrok.d.ts +0 -0
  258. /package/dist/{prediction-markets → predictos}/ai/callOpenAI.d.ts +0 -0
  259. /package/dist/{prediction-markets → predictos}/ai/http.d.ts +0 -0
  260. /package/dist/{prediction-markets → predictos}/ai/prompts/analyzeEventMarkets.d.ts +0 -0
  261. /package/dist/{prediction-markets → predictos}/ai/prompts/arbitrageAnalysis.d.ts +0 -0
  262. /package/dist/{prediction-markets → predictos}/ai/prompts/bookmakerAnalysis.d.ts +0 -0
  263. /package/dist/{prediction-markets → predictos}/ai/prompts/searchQueryGenerator.d.ts +0 -0
  264. /package/dist/{prediction-markets → predictos}/ai/types.d.ts +0 -0
  265. /package/dist/{prediction-markets → predictos}/arbitrage.d.ts +0 -0
  266. /package/dist/{prediction-markets → predictos}/events.d.ts +0 -0
package/README.md CHANGED
@@ -4,22 +4,22 @@
4
4
 
5
5
  <!-- template-git-repo:badges:start -->
6
6
  <p align="center">
7
- <a href="https://docs.autoinvestment.broker/"><img src="https://img.shields.io/badge/Docs-blue?logo=ReadTheDocs&logoColor=white" alt="Documentation" /></a>
7
+ <a href="https://qwksearch.com/api"><img src="https://img.shields.io/badge/Docs-blue?logo=ReadTheDocs&logoColor=white" alt="Documentation" /></a>
8
8
  <br />
9
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/stargazers"><img src="https://img.shields.io/github/stars/OpenSourceAGI/ai-broker-investing-agent" alt="GitHub Stars" /></a>
9
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/stargazers"><img src="https://img.shields.io/github/stars/OpenSourceAGI/qwksearch-research-agent" alt="GitHub Stars" /></a>
10
10
  <a href="https://www.npmjs.com/package/investing"><img src="https://img.shields.io/npm/dm/investing.svg" alt="NPM Monthly Downloads" /></a>
11
11
  <a href="https://www.npmjs.com/package/investing"><img src="https://img.shields.io/npm/v/investing.svg" alt="npm version" /></a>
12
12
  <a href="https://www.npmjs.com/package/investing"><img src="https://img.shields.io/npm/dt/investing.svg" alt="NPM Total Downloads" /></a>
13
13
  <a href="https://www.npmjs.com/package/investing"><img src="https://img.shields.io/npm/types/investing" alt="TypeScript types" /></a>
14
14
  <a href="https://packagephobia.com/result?p=investing"><img src="https://packagephobia.com/badge?p=investing" alt="Install size" /></a>
15
15
  <br />
16
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/issues"><img src="https://img.shields.io/github/issues/OpenSourceAGI/ai-broker-investing-agent?logo=github" alt="GitHub Issues" /></a>
17
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/pulls"><img src="https://img.shields.io/github/issues-pr/OpenSourceAGI/ai-broker-investing-agent?logo=github&label=PRs" alt="Open Pull Requests" /></a>
18
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OpenSourceAGI/ai-broker-investing-agent?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
19
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/discussions"><img src="https://img.shields.io/github/discussions/OpenSourceAGI/ai-broker-investing-agent" alt="GitHub Discussions" /></a>
20
- <a href="https://github.com/OpenSourceAGI/ai-broker-investing-agent/commits/main/"><img src="https://img.shields.io/github/last-commit/OpenSourceAGI/ai-broker-investing-agent.svg" alt="GitHub last commit" /></a>
16
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/issues"><img src="https://img.shields.io/github/issues/OpenSourceAGI/qwksearch-research-agent?logo=github" alt="GitHub Issues" /></a>
17
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/pulls"><img src="https://img.shields.io/github/issues-pr/OpenSourceAGI/qwksearch-research-agent?logo=github&label=PRs" alt="Open Pull Requests" /></a>
18
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OpenSourceAGI/qwksearch-research-agent?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
19
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/discussions"><img src="https://img.shields.io/github/discussions/OpenSourceAGI/qwksearch-research-agent" alt="GitHub Discussions" /></a>
20
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/commits/master/"><img src="https://img.shields.io/github/last-commit/OpenSourceAGI/qwksearch-research-agent.svg" alt="GitHub last commit" /></a>
21
21
  <br />
22
- <a href="https://stackblitz.com/github/OpenSourceAGI/ai-broker-investing-agent/tree/main/packages/investing"><img height="20px" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt="Open in StackBlitz" /></a>
22
+ <a href="https://stackblitz.com/github/OpenSourceAGI/qwksearch-research-agent/tree/master/packages/investing"><img height="20px" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt="Open in StackBlitz" /></a>
23
23
  <img src="https://img.shields.io/badge/Bun-14151A?logo=bun&logoColor=white" alt="Bun" /> <img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white" alt="TypeScript" /> <img src="https://img.shields.io/badge/Drizzle%20ORM-C5F74F?logo=drizzle&logoColor=white" alt="Drizzle ORM" /> <img src="https://img.shields.io/badge/Zod-3E67B1?logo=zod&logoColor=white" alt="Zod" /> <img src="https://img.shields.io/badge/Vite-646CFF?logo=vite&logoColor=white" alt="Vite" /> <img src="https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=white" alt="Vitest" />
24
24
  </p>
25
25
  <!-- template-git-repo:badges:end -->
@@ -33,98 +33,14 @@ A comprehensive TypeScript/JavaScript library for investment analysis, trading a
33
33
  - 🤖 **Trading Agents** - Multi-agent framework for automated trading strategies
34
34
  - 📊 **Stock Data** - Fetch and analyze stock data from Yahoo Finance, SEC filings, and more
35
35
  - 💹 **Prediction Markets** - Polymarket integration for prediction market data
36
+ - 🔮 **PredictOS Core** - Multi-agent prediction-market analysis, Kalshi/Polymarket
37
+ data clients, and cross-platform arbitrage (merged in from the `predictos` package)
36
38
  - 🔌 **Alpaca Trading API** - Easy-to-use wrapper for Alpaca trading platform
37
39
  - 📈 **Technical Analysis** - Algorithmic trading strategies and indicators
38
40
  - 🎯 **Social Trading** - Track and analyze top traders and strategies
39
41
  - 🧠 **AI-Powered Analysis** - LLM-based investment research and debate generation
40
42
  - 📦 **Data Files** - Pre-packaged stock indexes, sector information, and market data
41
43
 
42
- ## Third-party strategy signals
43
-
44
- The source integration connects all ten vendored project folders to the agent
45
- pipeline through pure sources, venue/data mappings and a survival risk posture.
46
- The [integration overview](../../devdocs/third-party-trading-bots-overview.md)
47
- records each project's runtime, license, native assessment and operational scope.
48
- Full notices ship in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
49
-
50
- From the repository root, run the credential-free paper demo in Docker:
51
-
52
- ```bash
53
- bash devdocs/third-party-integration/harness/run.sh install
54
- bash devdocs/third-party-integration/harness/run.sh demo
55
- ```
56
-
57
- The image uses pinned Bun 1.3.11 with Node/native build prerequisites. Dependencies
58
- live in container-only volumes; the staged repository excludes credentials and
59
- host node_modules. Tests and the demo run with `--network=none`.
60
-
61
- The demo first prints a readable summary: six numbered stages per run (strategy,
62
- normalized signal, research input, Trader, Portfolio Manager, execution). It then
63
- prints the full JSON trace: signals → report → proposal → Trader → risk debate → judge →
64
- verdict → Fund Manager → approval → fill → account snapshots. It includes momentum
65
- BUY/SELL, Vibe YES/NO, BTC bullish/bearish, copy sizing, sequential Gabagool targets,
66
- PyKalshi and pmxt mappings, OpenBB-backed stock BUY/SELL and Defensive sizing.
67
- The pmxt fixture opts into explicitly synthetic quotes; a point price is not a
68
- live executable quote. Models are scripted and all prices/forecasts are fixtures.
69
-
70
- Source consumers can opt into the new stage with the fourth graph argument and
71
- the third `propagate` argument:
72
-
73
- ```typescript
74
- // Source-level example inside packages/investing. Avoid src/index.ts: it loads
75
- // native dependencies and dotenv. Built package/subpath imports remain broken.
76
- import { TradingAgentsGraph } from './src/trading-agents/graph/trading-graph'
77
- import { kalshiMomentumSource } from './src/strategy-signals/sources/kalshi-momentum'
78
-
79
- const graph = new TradingAgentsGraph([], false, undefined, {
80
- llm: { deep: suppliedLLM, quick: suppliedLLM },
81
- riskReview: true,
82
- riskLimits: { maxPositionPerMarket: 50, maxOpenPositions: 5 },
83
- })
84
- const context = { account: venue.snapshot(), evaluationTime }
85
- const strategySignals = kalshiMomentumSource.run({ ticks }, context)
86
- const result = await graph.propagate(market.title, evaluationTime.slice(0, 10), {
87
- instrument: { type: 'event', venue: venue.venue, marketId: market.marketId },
88
- strategySignals,
89
- account: context.account,
90
- evaluationTime,
91
- event: market,
92
- sources: { [kalshiMomentumSource.id]: kalshiMomentumSource },
93
- })
94
- if (result.state.approval) await venue.execute(result.state.approval)
95
- ```
96
-
97
- The caller supplies the LLM, current venue/account, market and evaluation time. With `riskReview: true`, an `account` snapshot is required for stocks too: without one the gate cannot check cash or holdings, so the run ends at HOLD.
98
- Register each executable source so its freshness and guards can run; unregistered
99
- third-party proposals fail closed. Event runs skip stock analysts. Fixture stock
100
- runs select no external analysts and execute an Alpaca-shaped order against
101
- `MockEquityBroker` after a cash/share preflight. Existing callers without `run`
102
- retain byte-identical prompts; risk review is opt-in.
103
-
104
- Every executable result binds to one selected `proposalId`. BLOCK means HOLD;
105
- REDUCE supplies a whole-number cap. Final quantity is the minimum of the proposal,
106
- common/source risk caps, judge cap and Fund Manager quantity. Invalid model output
107
- or model errors cannot grant approval. Red flags remain advisory input. Forecast
108
- guards/Kelly apply only to genuine forecasts, never a substituted market price.
109
-
110
- Gabagool portfolio targets execute one leg per call, recomputed from actual
111
- holdings and fill costs. A rejected leg does not create a holding. Strategy prices
112
- retain decimal-cent precision; the paper execution bridge rejects unsupported
113
- sub-cent prices. Fractional weighted average costs are valid account values.
114
- Survival multipliers (1 / 1 / 0.75 / 0.5 / 0) are new demo policy, not upstream rules.
115
-
116
- Verification commands are `run.sh test`, `test-root`, `tsc`, `build`, `coverage`
117
- and `pack`. The type gate permits only reproduced pre-existing diagnostic
118
- identities/occurrences; it does not claim a clean TypeScript build. Coverage is
119
- reported for the new module and changed graph/risk-judge files.
120
-
121
- **Scope:** source-level fixture/paper execution only. Built exports, the web app
122
- and Workers runtime are not validated by this demo. Live broker/venue execution,
123
- an execution ledger, portfolio versioning and concurrency control are outside
124
- this integration. Current snapshots must be refreshed and callers must serialize
125
- execution. See the [workflow](../../devdocs/third-party-integration/skills/integrate-trading-bot/SKILL.md)
126
- to add a source, mapping or posture.
127
-
128
44
  ## Installation
129
45
 
130
46
  ```bash
@@ -197,68 +113,36 @@ const leaders = await fetchLeaderboard({
197
113
  });
198
114
  ```
199
115
 
200
- ### Kalshi Momentum Paper Agent
116
+ ### PredictOS — Prediction-Market Analysis & Arbitrage
201
117
 
202
- The prediction-markets package includes a deterministic TypeScript port of the
203
- momentum rules from PyKalshi's MIT-licensed
204
- `kalshi-bot-api/examples/momentum_bot.py`. It consumes recorded ticks and uses
205
- an in-memory paper executor, so it never connects to Kalshi, submits orders, or
206
- requires credentials.
118
+ ```typescript
119
+ import {
120
+ runEventAnalysisAgent,
121
+ findArbitrage,
122
+ getEvents,
123
+ } from "investing/predictos";
207
124
 
208
- Run the included replay from `packages/investing`:
125
+ const url = "https://polymarket.com/event/will-x-happen-by-2026";
209
126
 
210
- ```bash
211
- bun run demo:kalshi-momentum
212
- ```
127
+ // Resolve a Polymarket / Kalshi / Jupiter event URL into its raw markets
128
+ const event = await getEvents({ url });
213
129
 
214
- ```typescript
215
- import { runKalshiMomentumPaperAgent } from "investing/prediction-markets";
216
-
217
- const result = runKalshiMomentumPaperAgent({
218
- initialCashCents: 10_000,
219
- ticks: [50, 51, 52, 53, 58].map((yesPriceCents, index) => ({
220
- ticker: "DEMO-KALSHI-MARKET",
221
- timestamp: new Date(Date.UTC(2026, 0, 1, 0, index)).toISOString(),
222
- yesPriceCents,
223
- })),
130
+ // Analyze those markets for alpha and a predicted winner
131
+ const { analysis } = await runEventAnalysisAgent({
132
+ markets: event.markets,
133
+ eventIdentifier: event.eventIdentifier,
134
+ pmType: event.pmType,
135
+ model: "grok-4-fast",
136
+ tools: ["x_search"], // Grok models only
224
137
  });
225
138
 
226
- console.log(result.report);
139
+ // Look for the same event mispriced on the other venue
140
+ const arb = await findArbitrage({ url, model: "grok-4-fast" });
227
141
  ```
228
142
 
229
- Prices are integer cents per contract. A YES tick of `53` implies a NO price
230
- of `47`. Trade `action` (`BUY`, `SELL`, `HOLD`) is separate from the binary
231
- `outcome` (`YES`, `NO`): selling YES closes YES contracts and does not mean
232
- buying NO.
233
-
234
- Configuration controls `lookback`, `momentumThreshold`, `positionSize`,
235
- `profitTargetCents`, `stopLossCents`, and `maxPosition`. The defaults preserve
236
- the upstream example: three consecutive moves, 10 contracts, a 5-cent target,
237
- a 3-cent stop, and a 50-contract limit. The paper executor fills immediately at
238
- the recorded outcome price with no fees or slippage and reports cash, open
239
- positions, and realized/unrealized P&L.
240
-
241
- This replay is a strategy demonstration, not a backtest or live execution
242
- system. It assumes complementary YES/NO prices, does not model an order book,
243
- partial fills, fees, latency, settlement, or market resolution, and does not
244
- enable the existing unimplemented Kalshi live mapper.
245
-
246
- The recorded demo also runs actionable intents through the existing
247
- strategy-signal graph, research judge, Trader, risk review and proposal-bound
248
- FundManager before this same paper executor. It requires no keys or services.
249
- The original synchronous API remains direct strategy/paper replay.
250
-
251
- For graph review, use `runKalshiMomentumPaperAgentWithResearch` and
252
- `reviewPredictionMarketIntent`. Configure the existing graph with
253
- `riskReview: true`, and pass `{ fundManagerReview: true }` to the review
254
- adapter to require unchanged explicit approval. MODIFY, missing approval or
255
- a changed quantity becomes HOLD for this replay; the executor retains its
256
- own cash, inventory and combined market-position checks.
257
-
258
- After building, run `node scripts/verify-prediction-market-build.mjs` to check
259
- actual ESM/CommonJS subpaths and the packaged MIT notice. See the
260
- [walkthrough](../../devdocs/prediction-markets-agent-system-walkthrough.md) for
261
- the full flow and the recorded result of $100.50 cash and $0.50 realized P&L.
143
+ Every entry point takes a typed `request` object and an optional second
144
+ `config` (`AIConfig` / `DataConfig`) that falls back to `process.env`. Missing
145
+ required fields **throw** rather than returning an error result.
262
146
 
263
147
  ### Trading Agents Framework
264
148
 
@@ -364,7 +248,7 @@ Get Polymarket leaderboard of top traders.
364
248
  - `limit` - Number of results (default: 20)
365
249
  - `category` - Market category (default: 'overall')
366
250
 
367
- ### Prediction-Market Agents & Arbitrage
251
+ ### PredictOS Core
368
252
 
369
253
  ```typescript
370
254
  import {
@@ -373,26 +257,80 @@ import {
373
257
  runMapperAgent,
374
258
  findArbitrage,
375
259
  getEvents,
376
- } from "investing/prediction-markets";
260
+ } from "investing/predictos";
377
261
  ```
378
262
 
379
- Multi-agent analysis over Polymarket and Kalshi, refactored from Deno/Supabase
380
- edge functions into plain typed async functions (MIT, see
381
- `src/prediction-markets/LICENSE`):
382
-
383
- - **AI clients** — OpenAI, Grok/xAI and BlockRun (x402 micropayments), plus the
384
- analysis prompt builders.
385
- - **Market data** — Kalshi via DFlow and Polymarket via Dome/Gamma.
386
- - `runEventAnalysisAgent` — analyzes an event's markets for alpha and a
387
- predicted winner.
388
- - `runBookmakerAgent` — aggregates several agent analyses into one assessment.
389
- - `runMapperAgent` — turns an analysis into Polymarket order parameters.
390
- - `findArbitrage` — finds the same event on the other venue and checks whether
391
- it is mispriced across venues.
392
- - `getEvents` — resolves a Polymarket/Kalshi URL into its raw markets.
393
-
394
- Keys are read from options, falling back to `OPENAI_API_KEY`, `XAI_API_KEY`,
395
- `BLOCKRUN_WALLET_KEY`, `DOME_API_KEY` and `DFLOW_API_KEY`.
263
+ > Adapted from [PredictOS](https://github.com/PredictionXBT/PredictOS) by
264
+ > **PredictionXBT** (MIT licensed, © 2025). The original code shipped as
265
+ > Deno/Supabase edge functions; here it is refactored into plain, typed,
266
+ > dependency-light library functions with no HTTP/CORS layer. It lived in a
267
+ > sibling `predictos` package until that package was merged into `investing`.
268
+ > See [`NOTICE`](./NOTICE) and
269
+ > [`LICENSE-PredictOS-MIT`](./LICENSE-PredictOS-MIT).
270
+
271
+ #### What it covers
272
+
273
+ - **AI provider clients** — OpenAI (Responses API), Grok/xAI (Responses API,
274
+ with optional `x_search` / `web_search` tools), and BlockRun (x402
275
+ wallet-based micropayments across 20+ models), plus the analysis prompt
276
+ builders (`analyzeEventMarkets`, `bookmakerAnalysis`, `arbitrageAnalysis`,
277
+ `searchQueryGenerator`).
278
+ - **Market data clients** — Kalshi via the DFlow API
279
+ (`investing/predictos/data/kalshi`) and Polymarket via the Dome API
280
+ (`investing/predictos/data/polymarket`).
281
+ - **Multi-agent pipeline** (`investing/predictos/agents`):
282
+ - `runEventAnalysisAgent` — analyzes an event's markets for alpha and a
283
+ predicted winner.
284
+ - `runBookmakerAgent` — aggregates multiple agent analyses (and optional
285
+ external data sources) into a single consolidated assessment.
286
+ - `runMapperAgent` — turns an analysis into Polymarket order parameters
287
+ (pure logic; Kalshi mapping not yet implemented).
288
+ - **Cross-platform arbitrage** (`investing/predictos/arbitrage`) —
289
+ `findArbitrage` parses a Polymarket/Kalshi URL, generates a search query with
290
+ AI, searches the other platform, and evaluates whether the same event is
291
+ mispriced across venues.
292
+ - **Event fetching** (`getEvents`) — resolves a Polymarket/Kalshi/Jupiter URL
293
+ into its raw markets (Kalshi via DFlow, Polymarket via the Gamma API).
294
+
295
+ #### Subpath exports
296
+
297
+ | Import | Contents |
298
+ | --- | --- |
299
+ | `investing/predictos` | Everything (barrel) |
300
+ | `investing/predictos/ai` | AI clients + prompt builders |
301
+ | `investing/predictos/data/kalshi` | Kalshi (DFlow) data client |
302
+ | `investing/predictos/data/polymarket` | Polymarket (Dome) data client |
303
+ | `investing/predictos/agents` | `runEventAnalysisAgent`, `runBookmakerAgent`, `runMapperAgent` |
304
+ | `investing/predictos/arbitrage` | `findArbitrage` |
305
+
306
+ The barrel re-exports the Kalshi (DFlow) client at the top level. The Polymarket
307
+ (Dome) client exposes Kalshi helpers under the same names, so the barrel renames
308
+ those two to `getDomeKalshiMarketsByEvent` / `buildDomeKalshiMarketUrl` — import
309
+ from `investing/predictos/data/polymarket` for their original names. The
310
+ Gamma/CLOB trading client, Polyfactual and x402 are namespaced on the barrel as
311
+ `polymarketClob`, `polyfactual` and `x402` for the same reason.
312
+
313
+ #### Refactor notes (Deno → Node)
314
+
315
+ - Deno HTTP handlers (`Deno.serve`, `new Response(...)`, CORS headers) were
316
+ removed. Each endpoint is now a plain exported async function taking typed
317
+ parameters and returning a typed result; validation failures `throw`.
318
+ - `Deno.env.get("X")` was replaced with config/options objects
319
+ (`AIConfig`, `DataConfig`, per-call `apiKey`/`walletKey`) that fall back to
320
+ `process.env` (`OPENAI_API_KEY`, `XAI_API_KEY`, `BLOCKRUN_WALLET_KEY`,
321
+ `DOME_API_KEY`, `DFLOW_API_KEY`). No secrets are hardcoded.
322
+ - Remote (`https://...`) and `npm:` import specifiers were replaced with normal
323
+ package imports (`ethers`). The global `fetch` (Node 18+) is used throughout.
324
+ - Prompt text and analysis logic are preserved verbatim.
325
+
326
+ #### Not ported (yet)
327
+
328
+ Intentionally left out of the core port — noted for future work: the Next.js
329
+ `terminal/` frontend, the Python alpha-hunter examples, the **pay.sh** payment
330
+ serving flows, **Irys** verifiable-agent storage, wallet-tracking websockets, and
331
+ on-chain order execution (the mapper produces order parameters, but placing
332
+ orders is out of scope). The BlockRun client *is* ported (it only needs `ethers`
333
+ + `fetch`), but its on-chain micropayment flow is untested in this environment.
396
334
 
397
335
  ### Trading Agents
398
336
 
@@ -473,6 +411,12 @@ ALPACA_SECRET=your_secret_here
473
411
  # OpenAI for AI-powered analysis
474
412
  OPENAI_API_KEY=your_openai_key
475
413
 
414
+ # PredictOS: prediction-market analysis and data
415
+ XAI_API_KEY=your_xai_key # Grok/xAI
416
+ BLOCKRUN_WALLET_KEY=your_wallet_key # BlockRun x402 micropayments
417
+ DOME_API_KEY=your_dome_key # Polymarket market data
418
+ DFLOW_API_KEY=your_dflow_key # Kalshi market data
419
+
476
420
  # Optional: Alternative LLM providers
477
421
  ANTHROPIC_API_KEY=your_anthropic_key
478
422
  GOOGLE_API_KEY=your_google_key
@@ -585,7 +529,15 @@ See the `/examples` directory for complete working examples:
585
529
 
586
530
  - [GitHub Repository](https://github.com/vtempest/ai-broker-investment-agent)
587
531
  - [Documentation](https://invest.vtempest.com/docs)
532
+ - [Agent skill](../../skills/ask-investing/SKILL.md)
588
533
  - [Examples](./examples)
589
534
 
535
+ ## Credits
536
+
537
+ The `predictos` module is a derivative work of
538
+ [PredictOS](https://github.com/PredictionXBT/PredictOS) — all original design and
539
+ logic © 2025 PredictionXBT, MIT licensed. See [`NOTICE`](./NOTICE) and
540
+ [`LICENSE-PredictOS-MIT`](./LICENSE-PredictOS-MIT).
541
+
590
542
  - [GitHub Issues](https://github.com/vtempest/ai-broker-investment-agent/issues)
591
543
  - [Documentation](https://invest.vtempest.com/docs)