@b3os/cli 0.2.0 → 0.2.2

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 (217) hide show
  1. package/README.md +87 -7
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -0
  19. package/dist/commands/app.js +559 -54
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +88 -2
  22. package/dist/commands/auth.js +354 -44
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +81 -18
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +154 -0
  49. package/dist/commands/tool.js +785 -0
  50. package/dist/commands/tool.js.map +1 -0
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/apply.d.ts +4 -0
  190. package/dist/manifest/apply.js +2 -0
  191. package/dist/manifest/apply.js.map +1 -1
  192. package/dist/manifest/domains.d.ts +50 -0
  193. package/dist/manifest/domains.js +159 -0
  194. package/dist/manifest/domains.js.map +1 -0
  195. package/dist/manifest/link.d.ts +20 -0
  196. package/dist/manifest/link.js +24 -0
  197. package/dist/manifest/link.js.map +1 -0
  198. package/dist/manifest/record.d.ts +1 -1
  199. package/dist/tool/archive.d.ts +33 -0
  200. package/dist/tool/archive.js +174 -0
  201. package/dist/tool/archive.js.map +1 -0
  202. package/dist/tool/calls.d.ts +46 -0
  203. package/dist/tool/calls.js +274 -0
  204. package/dist/tool/calls.js.map +1 -0
  205. package/dist/tool/checks.d.ts +21 -0
  206. package/dist/tool/checks.js +145 -0
  207. package/dist/tool/checks.js.map +1 -0
  208. package/dist/tool/elf.d.ts +19 -0
  209. package/dist/tool/elf.js +107 -0
  210. package/dist/tool/elf.js.map +1 -0
  211. package/dist/tool/predict.d.ts +8 -0
  212. package/dist/tool/predict.js +38 -0
  213. package/dist/tool/predict.js.map +1 -0
  214. package/dist/tool/ustar.d.ts +5 -0
  215. package/dist/tool/ustar.js +220 -0
  216. package/dist/tool/ustar.js.map +1 -0
  217. package/package.json +6 -5
@@ -0,0 +1,917 @@
1
+ # Kalshi (read-only)
2
+
3
+ > The io.b3os/kalshi pack: 9 actions with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.
4
+
5
+ Source: https://docs.beta.b3os.org/actions/catalog/kalshi.md
6
+
7
+ <a id="kalshi"></a>
8
+
9
+ `io.b3os/kalshi` 1.0.0 · `prediction-markets`, `market-data`, `event-contracts` · MIT
10
+
11
+ Read-only market data from Kalshi, the CFTC-regulated US event-contract exchange: keyword search, markets with live bid, ask and last prices, events, series, order books, candlesticks and recent trades. Keyless public API; no trading and no account data. Prices are dollar strings from 0.0000 to 1.0000 per contract and read as implied probabilities; counts and volumes are fixed-point strings.
12
+
13
+ Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](https://docs.beta.b3os.org/actions/call)). The snippets below show no timing values, because a fixture records none.
14
+
15
+ ## Connection
16
+
17
+ No credential: a keyless public API. Calls name no connection.
18
+
19
+ Hosts it reaches: `api.elections.kalshi.com`.
20
+
21
+ ## Actions
22
+
23
+ | Action | Effect | MCP tool | Title |
24
+ |---|---|---|---|
25
+ | [`search`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-search) | read | `kalshi__search` | Search markets |
26
+ | [`list-markets`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-list-markets) | read | `kalshi__list-markets` | List markets |
27
+ | [`get-market`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-market) | read | `kalshi__get-market` | Kalshi Get Market |
28
+ | [`get-event`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-event) | read | `kalshi__get-event` | Kalshi Get Event |
29
+ | [`list-events`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-list-events) | read | `kalshi__list-events` | List events |
30
+ | [`get-series`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-series) | read | `kalshi__get-series` | Get series |
31
+ | [`get-orderbook`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-orderbook) | read | `kalshi__get-orderbook` | Get order book |
32
+ | [`get-candlesticks`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-candlesticks) | read | `kalshi__get-candlesticks` | Kalshi Get Market Candlesticks |
33
+ | [`get-trades`](https://docs.beta.b3os.org/actions/catalog/kalshi#kalshi-get-trades) | read | `kalshi__get-trades` | Kalshi Get Trades |
34
+
35
+ <h3 id="kalshi-search"><code>search</code></h3>
36
+
37
+ **Search markets.** Keyword search over Kalshi series and their live markets (for example knicks, fed rate, bitcoin), ranked by relevance and volume. Each result is a series with its current event and markets, including bid, ask and last prices. Use list-markets to filter by status, event or series instead.
38
+
39
+ Ref `io.b3os/kalshi/search@1.0.0` · effect `read` · no connection · MCP tool `kalshi__search`
40
+
41
+ **curl**
42
+
43
+ ```bash
44
+ curl -s https://beta-api.b3os.org/v1/actions/call \
45
+ -H "Authorization: Bearer $B3OS_API_KEY" \
46
+ -H "Content-Type: application/json" \
47
+ -d '{
48
+ "ref": "io.b3os/kalshi/search@1",
49
+ "input": {"query": "bitcoin", "page_size": 1}
50
+ }'
51
+ ```
52
+ **TypeScript**
53
+
54
+ ```ts
55
+ import { B3OS } from "@b3os/sdk";
56
+
57
+ const b3os = new B3OS();
58
+ const result = await b3os.actions.call({
59
+ ref: "io.b3os/kalshi/search@1",
60
+ input: { query: "bitcoin", page_size: 1 },
61
+ });
62
+ console.log(result.output);
63
+ ```
64
+ **Python**
65
+
66
+ ```python
67
+ from b3os import B3OS
68
+
69
+ b3os = B3OS()
70
+ result = b3os.actions.call({
71
+ "ref": "io.b3os/kalshi/search@1",
72
+ "input": {"query": "bitcoin", "page_size": 1},
73
+ })
74
+ print(result["output"])
75
+ ```
76
+ **MCP**
77
+
78
+ ```json
79
+ {
80
+ "method": "tools/call",
81
+ "params": {
82
+ "name": "kalshi__search",
83
+ "arguments": {"query": "bitcoin", "page_size": 1}
84
+ }
85
+ }
86
+ ```
87
+
88
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__search` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
89
+
90
+ Output, labeled `fixture`: Search markets (response recorded 2026-10-26). From the bundle's `fixtures/search.json`, not a live call.
91
+
92
+ ```json
93
+ {
94
+ "results": [
95
+ {
96
+ "series_ticker": "KXBTC15M",
97
+ "series_title": "Bitcoin price up down",
98
+ "event_ticker": "KXBTC15M-26OCT260345",
99
+ "event_title": "BTC 15 min · $79,920.08 target",
100
+ "event_subtitle": "Oct 26 - 3:30AM EDT to 3:45AM EDT",
101
+ "category": "Crypto",
102
+ "total_volume": 1124225,
103
+ "markets": [
104
+ {
105
+ "ticker": "KXBTC15M-26OCT260345-45",
106
+ "title": "BTC price up in next 15 mins?",
107
+ "yes_subtitle": "Target Price: $79,920.08",
108
+ "yes_bid_dollars": "0.2800",
109
+ "yes_ask_dollars": "0.2900",
110
+ "last_price_dollars": "0.2800",
111
+ "close_time": "2026-10-26T07:45:00Z"
112
+ }
113
+ ]
114
+ }
115
+ ],
116
+ "total": 31,
117
+ "next_cursor": "CAE"
118
+ }
119
+ ```
120
+
121
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
122
+
123
+ | `pack_error.code` | Service status | Retryable | Message |
124
+ |---|---|---|---|
125
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
126
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
127
+ | `invalid_request` | 400, 422 | no | built from the service's response |
128
+
129
+ <h3 id="kalshi-list-markets"><code>list-markets</code></h3>
130
+
131
+ **List markets.** List Kalshi markets filtered by status (unopened, open, closed, settled), event ticker, series ticker or a set of market tickers, with prices, volume, open interest and close time. Page with the returned cursor.
132
+
133
+ Ref `io.b3os/kalshi/list-markets@1.0.0` · effect `read` · no connection · MCP tool `kalshi__list-markets`
134
+
135
+ **curl**
136
+
137
+ ```bash
138
+ curl -s https://beta-api.b3os.org/v1/actions/call \
139
+ -H "Authorization: Bearer $B3OS_API_KEY" \
140
+ -H "Content-Type: application/json" \
141
+ -d '{
142
+ "ref": "io.b3os/kalshi/list-markets@1",
143
+ "input": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2}
144
+ }'
145
+ ```
146
+ **TypeScript**
147
+
148
+ ```ts
149
+ import { B3OS } from "@b3os/sdk";
150
+
151
+ const b3os = new B3OS();
152
+ const result = await b3os.actions.call({
153
+ ref: "io.b3os/kalshi/list-markets@1",
154
+ input: { status: "open", series_ticker: "KXFEDDECISION", limit: 2 },
155
+ });
156
+ console.log(result.output);
157
+ ```
158
+ **Python**
159
+
160
+ ```python
161
+ from b3os import B3OS
162
+
163
+ b3os = B3OS()
164
+ result = b3os.actions.call({
165
+ "ref": "io.b3os/kalshi/list-markets@1",
166
+ "input": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2},
167
+ })
168
+ print(result["output"])
169
+ ```
170
+ **MCP**
171
+
172
+ ```json
173
+ {
174
+ "method": "tools/call",
175
+ "params": {
176
+ "name": "kalshi__list-markets",
177
+ "arguments": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2}
178
+ }
179
+ }
180
+ ```
181
+
182
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__list-markets` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
183
+
184
+ Output, labeled `fixture`: List markets (response recorded 2026-10-26). From the bundle's `fixtures/list-markets.json`, not a live call.
185
+
186
+ ```json
187
+ {
188
+ "markets": [
189
+ {
190
+ "ticker": "KXFEDDECISION-28JAN-H26",
191
+ "title": "Will the Federal Reserve Hike rates by >25bps at their January 2028 meeting?",
192
+ "event_ticker": "KXFEDDECISION-28JAN",
193
+ "market_type": "binary",
194
+ "subtitle": "Hike >25bps",
195
+ "yes_sub_title": "Hike >25bps",
196
+ "no_sub_title": "Hike >25bps",
197
+ "status": "active",
198
+ "yes_bid_dollars": "0.0800",
199
+ "yes_ask_dollars": "0.2100",
200
+ "no_bid_dollars": "0.7900",
201
+ "no_ask_dollars": "0.9200",
202
+ "last_price_dollars": "0.2200",
203
+ "volume_fp": "2458.31",
204
+ "volume_24h_fp": "0.00",
205
+ "open_interest_fp": "1225.31",
206
+ "close_time": "2028-01-26T18:59:00Z"
207
+ },
208
+ {
209
+ "ticker": "KXFEDDECISION-28JAN-H25",
210
+ "title": "Will the Federal Reserve Hike rates by 25bps at their January 2028 meeting?",
211
+ "event_ticker": "KXFEDDECISION-28JAN",
212
+ "market_type": "binary",
213
+ "subtitle": "Hike 25bps",
214
+ "yes_sub_title": "Hike 25bps",
215
+ "no_sub_title": "Hike 25bps",
216
+ "status": "active",
217
+ "yes_bid_dollars": "0.1500",
218
+ "yes_ask_dollars": "0.2500",
219
+ "no_bid_dollars": "0.7500",
220
+ "no_ask_dollars": "0.8500",
221
+ "last_price_dollars": "0.0400",
222
+ "volume_fp": "637.70",
223
+ "volume_24h_fp": "0.00",
224
+ "open_interest_fp": "147.00",
225
+ "close_time": "2028-01-26T18:59:00Z"
226
+ }
227
+ ```
228
+
229
+ The first 40 of 44 lines; the fixture file has the rest.
230
+
231
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
232
+
233
+ | `pack_error.code` | Service status | Retryable | Message |
234
+ |---|---|---|---|
235
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
236
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
237
+ | `invalid_request` | 400, 422 | no | built from the service's response |
238
+
239
+ <h3 id="kalshi-get-market"><code>get-market</code></h3>
240
+
241
+ **Kalshi Get Market.** One Kalshi market by ticker: title, Yes and No labels, status, best bids and asks, last and previous prices, volume, 24-hour volume, open interest, open, close and expiration times, the result once settled, and the primary rules text. Prices are dollar strings per contract (0.0000 to 1.0000).
242
+
243
+ Ref `io.b3os/kalshi/get-market@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-market`
244
+
245
+ **curl**
246
+
247
+ ```bash
248
+ curl -s https://beta-api.b3os.org/v1/actions/call \
249
+ -H "Authorization: Bearer $B3OS_API_KEY" \
250
+ -H "Content-Type: application/json" \
251
+ -d '{
252
+ "ref": "io.b3os/kalshi/get-market@1",
253
+ "input": {"ticker": "KXFEDDECISION-26OCT-H0"}
254
+ }'
255
+ ```
256
+ **TypeScript**
257
+
258
+ ```ts
259
+ import { B3OS } from "@b3os/sdk";
260
+
261
+ const b3os = new B3OS();
262
+ const result = await b3os.actions.call({
263
+ ref: "io.b3os/kalshi/get-market@1",
264
+ input: { ticker: "KXFEDDECISION-26OCT-H0" },
265
+ });
266
+ console.log(result.output);
267
+ ```
268
+ **Python**
269
+
270
+ ```python
271
+ from b3os import B3OS
272
+
273
+ b3os = B3OS()
274
+ result = b3os.actions.call({
275
+ "ref": "io.b3os/kalshi/get-market@1",
276
+ "input": {"ticker": "KXFEDDECISION-26OCT-H0"},
277
+ })
278
+ print(result["output"])
279
+ ```
280
+ **MCP**
281
+
282
+ ```json
283
+ {
284
+ "method": "tools/call",
285
+ "params": {
286
+ "name": "kalshi__get-market",
287
+ "arguments": {"ticker": "KXFEDDECISION-26OCT-H0"}
288
+ }
289
+ }
290
+ ```
291
+
292
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-market` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
293
+
294
+ Output, labeled `fixture`: Kalshi Get Market (response recorded 2026-10-26). From the bundle's `fixtures/get-market.json`, not a live call.
295
+
296
+ ```json
297
+ {
298
+ "ticker": "KXFEDDECISION-26OCT-H0",
299
+ "title": "Will the Federal Reserve Hike rates by 0bps at their October 2026 meeting?",
300
+ "event_ticker": "KXFEDDECISION-26OCT",
301
+ "market_type": "binary",
302
+ "subtitle": "Hike 0bps",
303
+ "yes_sub_title": "Fed maintains rate",
304
+ "no_sub_title": "Fed maintains rate",
305
+ "status": "active",
306
+ "yes_bid_dollars": "0.9300",
307
+ "yes_ask_dollars": "0.9400",
308
+ "no_bid_dollars": "0.0600",
309
+ "no_ask_dollars": "0.0700",
310
+ "last_price_dollars": "0.9400",
311
+ "previous_price_dollars": "0.9300",
312
+ "previous_yes_bid_dollars": "0.9300",
313
+ "previous_yes_ask_dollars": "0.9400",
314
+ "volume_fp": "7649654.80",
315
+ "volume_24h_fp": "292559.16",
316
+ "open_interest_fp": "3154021.29",
317
+ "open_time": "2025-09-29T14:00:00Z",
318
+ "close_time": "2026-10-28T17:59:00Z",
319
+ "expiration_time": "2027-01-27T18:01:00Z",
320
+ "result": "",
321
+ "settlement_value_dollars": null,
322
+ "rules_primary": "If the Federal Reserve does a Hike of 0bps on October 28, 2026, then the market resolves to Yes.",
323
+ "can_close_early": true,
324
+ "notional_value_dollars": "1.0000",
325
+ "cap_strike": null,
326
+ "floor_strike": null
327
+ }
328
+ ```
329
+
330
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
331
+
332
+ | `pack_error.code` | Service status | Retryable | Message |
333
+ |---|---|---|---|
334
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
335
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
336
+ | `invalid_request` | 400, 422 | no | built from the service's response |
337
+
338
+ <h3 id="kalshi-get-event"><code>get-event</code></h3>
339
+
340
+ **Kalshi Get Event.** One Kalshi event (the question several markets share, such as one game or one rate decision) with its series, category, mutual exclusivity, strike date and, by default, every market in it with prices and volume.
341
+
342
+ Ref `io.b3os/kalshi/get-event@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-event`
343
+
344
+ **curl**
345
+
346
+ ```bash
347
+ curl -s https://beta-api.b3os.org/v1/actions/call \
348
+ -H "Authorization: Bearer $B3OS_API_KEY" \
349
+ -H "Content-Type: application/json" \
350
+ -d '{
351
+ "ref": "io.b3os/kalshi/get-event@1",
352
+ "input": {"eventTicker": "KXFEDDECISION-26OCT"}
353
+ }'
354
+ ```
355
+ **TypeScript**
356
+
357
+ ```ts
358
+ import { B3OS } from "@b3os/sdk";
359
+
360
+ const b3os = new B3OS();
361
+ const result = await b3os.actions.call({
362
+ ref: "io.b3os/kalshi/get-event@1",
363
+ input: { eventTicker: "KXFEDDECISION-26OCT" },
364
+ });
365
+ console.log(result.output);
366
+ ```
367
+ **Python**
368
+
369
+ ```python
370
+ from b3os import B3OS
371
+
372
+ b3os = B3OS()
373
+ result = b3os.actions.call({
374
+ "ref": "io.b3os/kalshi/get-event@1",
375
+ "input": {"eventTicker": "KXFEDDECISION-26OCT"},
376
+ })
377
+ print(result["output"])
378
+ ```
379
+ **MCP**
380
+
381
+ ```json
382
+ {
383
+ "method": "tools/call",
384
+ "params": {
385
+ "name": "kalshi__get-event",
386
+ "arguments": {"eventTicker": "KXFEDDECISION-26OCT"}
387
+ }
388
+ }
389
+ ```
390
+
391
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-event` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
392
+
393
+ Output, labeled `fixture`: Kalshi Get Event (response recorded 2026-10-26). From the bundle's `fixtures/get-event.json`, not a live call.
394
+
395
+ ```json
396
+ {
397
+ "event_ticker": "KXFEDDECISION-26OCT",
398
+ "series_ticker": "KXFEDDECISION",
399
+ "title": "Fed decision in Oct 2026?",
400
+ "sub_title": "On Oct 28, 2026",
401
+ "category": "Economics",
402
+ "mutually_exclusive": true,
403
+ "strike_date": "2026-10-28T18:00:00Z",
404
+ "strike_period": "",
405
+ "markets": [
406
+ {
407
+ "ticker": "KXFEDDECISION-26OCT-C26",
408
+ "title": "Will the Federal Reserve Cut rates by >25bps at their October 2026 meeting?",
409
+ "event_ticker": "KXFEDDECISION-26OCT",
410
+ "market_type": "binary",
411
+ "subtitle": "Cut >25bps",
412
+ "yes_sub_title": "Cut >25bps",
413
+ "no_sub_title": "Cut >25bps",
414
+ "status": "active",
415
+ "yes_bid_dollars": "0.0000",
416
+ "yes_ask_dollars": "0.0100",
417
+ "no_bid_dollars": "0.9900",
418
+ "no_ask_dollars": "1.0000",
419
+ "last_price_dollars": "0.0100",
420
+ "volume_fp": "247588.88",
421
+ "volume_24h_fp": "941.73",
422
+ "open_interest_fp": "234135.43",
423
+ "close_time": "2026-10-28T17:59:00Z"
424
+ },
425
+ {
426
+ "ticker": "KXFEDDECISION-26OCT-C25",
427
+ "title": "Will the Federal Reserve Cut rates by 25bps at their October 2026 meeting?",
428
+ "event_ticker": "KXFEDDECISION-26OCT",
429
+ "market_type": "binary",
430
+ "subtitle": "Cut 25bps",
431
+ "yes_sub_title": "Cut 25bps",
432
+ "no_sub_title": "Cut 25bps",
433
+ "status": "active",
434
+ "yes_bid_dollars": "0.0000",
435
+ "yes_ask_dollars": "0.0100",
436
+ ```
437
+
438
+ The first 40 of 51 lines; the fixture file has the rest.
439
+
440
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
441
+
442
+ | `pack_error.code` | Service status | Retryable | Message |
443
+ |---|---|---|---|
444
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
445
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
446
+ | `invalid_request` | 400, 422 | no | built from the service's response |
447
+
448
+ <h3 id="kalshi-list-events"><code>list-events</code></h3>
449
+
450
+ **List events.** List Kalshi events by status (open, closed, settled) or series, newest first, with title, category, series and strike date. Page with the cursor; get-event lists an event's markets.
451
+
452
+ Ref `io.b3os/kalshi/list-events@1.0.0` · effect `read` · no connection · MCP tool `kalshi__list-events`
453
+
454
+ **curl**
455
+
456
+ ```bash
457
+ curl -s https://beta-api.b3os.org/v1/actions/call \
458
+ -H "Authorization: Bearer $B3OS_API_KEY" \
459
+ -H "Content-Type: application/json" \
460
+ -d '{
461
+ "ref": "io.b3os/kalshi/list-events@1",
462
+ "input": {"status": "open", "limit": 2}
463
+ }'
464
+ ```
465
+ **TypeScript**
466
+
467
+ ```ts
468
+ import { B3OS } from "@b3os/sdk";
469
+
470
+ const b3os = new B3OS();
471
+ const result = await b3os.actions.call({
472
+ ref: "io.b3os/kalshi/list-events@1",
473
+ input: { status: "open", limit: 2 },
474
+ });
475
+ console.log(result.output);
476
+ ```
477
+ **Python**
478
+
479
+ ```python
480
+ from b3os import B3OS
481
+
482
+ b3os = B3OS()
483
+ result = b3os.actions.call({
484
+ "ref": "io.b3os/kalshi/list-events@1",
485
+ "input": {"status": "open", "limit": 2},
486
+ })
487
+ print(result["output"])
488
+ ```
489
+ **MCP**
490
+
491
+ ```json
492
+ {
493
+ "method": "tools/call",
494
+ "params": {
495
+ "name": "kalshi__list-events",
496
+ "arguments": {"status": "open", "limit": 2}
497
+ }
498
+ }
499
+ ```
500
+
501
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__list-events` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
502
+
503
+ Output, labeled `fixture`: List events (response recorded 2026-10-26). From the bundle's `fixtures/list-events.json`, not a live call.
504
+
505
+ ```json
506
+ {
507
+ "events": [
508
+ {
509
+ "event_ticker": "KXELONMARS-99",
510
+ "series_ticker": "KXELONMARS",
511
+ "title": "Will Elon Musk visit Mars in his lifetime?",
512
+ "sub_title": "Before 2099",
513
+ "category": "Science and Technology",
514
+ "mutually_exclusive": false,
515
+ "strike_date": null
516
+ },
517
+ {
518
+ "event_ticker": "KXNEXTNATOSECGEN-99",
519
+ "series_ticker": "KXNEXTNATOSECGEN",
520
+ "title": "Who will be the next Secretary General of NATO?",
521
+ "sub_title": "Before Jan 1, 2099",
522
+ "category": "Elections",
523
+ "mutually_exclusive": true,
524
+ "strike_date": null
525
+ }
526
+ ],
527
+ "cursor": "CgYI8OG8lQ8SE0tYTkVYVE5BVE9TRUNHRU4tOTk"
528
+ }
529
+ ```
530
+
531
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
532
+
533
+ | `pack_error.code` | Service status | Retryable | Message |
534
+ |---|---|---|---|
535
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
536
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
537
+ | `invalid_request` | 400, 422 | no | built from the service's response |
538
+
539
+ <h3 id="kalshi-get-series"><code>get-series</code></h3>
540
+
541
+ **Get series.** One Kalshi series (a recurring market template such as daily Bitcoin range or every Fed decision): title, category, frequency, tags, fee type and the settlement sources the exchange uses to resolve it.
542
+
543
+ Ref `io.b3os/kalshi/get-series@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-series`
544
+
545
+ **curl**
546
+
547
+ ```bash
548
+ curl -s https://beta-api.b3os.org/v1/actions/call \
549
+ -H "Authorization: Bearer $B3OS_API_KEY" \
550
+ -H "Content-Type: application/json" \
551
+ -d '{
552
+ "ref": "io.b3os/kalshi/get-series@1",
553
+ "input": {"series_ticker": "KXFEDDECISION"}
554
+ }'
555
+ ```
556
+ **TypeScript**
557
+
558
+ ```ts
559
+ import { B3OS } from "@b3os/sdk";
560
+
561
+ const b3os = new B3OS();
562
+ const result = await b3os.actions.call({
563
+ ref: "io.b3os/kalshi/get-series@1",
564
+ input: { series_ticker: "KXFEDDECISION" },
565
+ });
566
+ console.log(result.output);
567
+ ```
568
+ **Python**
569
+
570
+ ```python
571
+ from b3os import B3OS
572
+
573
+ b3os = B3OS()
574
+ result = b3os.actions.call({
575
+ "ref": "io.b3os/kalshi/get-series@1",
576
+ "input": {"series_ticker": "KXFEDDECISION"},
577
+ })
578
+ print(result["output"])
579
+ ```
580
+ **MCP**
581
+
582
+ ```json
583
+ {
584
+ "method": "tools/call",
585
+ "params": {
586
+ "name": "kalshi__get-series",
587
+ "arguments": {"series_ticker": "KXFEDDECISION"}
588
+ }
589
+ }
590
+ ```
591
+
592
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-series` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
593
+
594
+ Output, labeled `fixture`: Get series (response recorded 2026-10-26). From the bundle's `fixtures/get-series.json`, not a live call.
595
+
596
+ ```json
597
+ {
598
+ "ticker": "KXFEDDECISION",
599
+ "title": "Fed meeting",
600
+ "category": "Economics",
601
+ "frequency": "custom",
602
+ "tags": ["Fed"],
603
+ "fee_type": "quadratic_with_maker_fees",
604
+ "settlement_sources": [
605
+ {
606
+ "name": "Federal Reserve",
607
+ "url": "https://www.federalreserve.gov"
608
+ }
609
+ ],
610
+ "contract_url": "https://assets.kalshi.com/regulatory/product-certifications/FEDDECISION.pdf"
611
+ }
612
+ ```
613
+
614
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
615
+
616
+ | `pack_error.code` | Service status | Retryable | Message |
617
+ |---|---|---|---|
618
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
619
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
620
+ | `invalid_request` | 400, 422 | no | built from the service's response |
621
+
622
+ <h3 id="kalshi-get-orderbook"><code>get-orderbook</code></h3>
623
+
624
+ **Get order book.** The order book of one Kalshi market: resting Yes bids and No bids as price and contract count, best price last on each side. A No bid at price p is an offer to sell Yes at 1 - p, so the best Yes ask is 1 minus the best No bid. Limit levels per side with depth.
625
+
626
+ Ref `io.b3os/kalshi/get-orderbook@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-orderbook`
627
+
628
+ **curl**
629
+
630
+ ```bash
631
+ curl -s https://beta-api.b3os.org/v1/actions/call \
632
+ -H "Authorization: Bearer $B3OS_API_KEY" \
633
+ -H "Content-Type: application/json" \
634
+ -d '{
635
+ "ref": "io.b3os/kalshi/get-orderbook@1",
636
+ "input": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3}
637
+ }'
638
+ ```
639
+ **TypeScript**
640
+
641
+ ```ts
642
+ import { B3OS } from "@b3os/sdk";
643
+
644
+ const b3os = new B3OS();
645
+ const result = await b3os.actions.call({
646
+ ref: "io.b3os/kalshi/get-orderbook@1",
647
+ input: { ticker: "KXFEDDECISION-26OCT-H0", depth: 3 },
648
+ });
649
+ console.log(result.output);
650
+ ```
651
+ **Python**
652
+
653
+ ```python
654
+ from b3os import B3OS
655
+
656
+ b3os = B3OS()
657
+ result = b3os.actions.call({
658
+ "ref": "io.b3os/kalshi/get-orderbook@1",
659
+ "input": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3},
660
+ })
661
+ print(result["output"])
662
+ ```
663
+ **MCP**
664
+
665
+ ```json
666
+ {
667
+ "method": "tools/call",
668
+ "params": {
669
+ "name": "kalshi__get-orderbook",
670
+ "arguments": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3}
671
+ }
672
+ }
673
+ ```
674
+
675
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-orderbook` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
676
+
677
+ Output, labeled `fixture`: Get order book (response recorded 2026-10-26). From the bundle's `fixtures/get-orderbook.json`, not a live call.
678
+
679
+ ```json
680
+ {
681
+ "yes_dollars": [
682
+ {"price_dollars": "0.9100", "count_fp": "5650.00"},
683
+ {"price_dollars": "0.9200", "count_fp": "86213.58"},
684
+ {"price_dollars": "0.9300", "count_fp": "147543.00"}
685
+ ],
686
+ "no_dollars": [
687
+ {"price_dollars": "0.0400", "count_fp": "333974.86"},
688
+ {"price_dollars": "0.0500", "count_fp": "955689.70"},
689
+ {"price_dollars": "0.0600", "count_fp": "768013.58"}
690
+ ],
691
+ "yesLevels": 3,
692
+ "noLevels": 3,
693
+ "ticker": "KXFEDDECISION-26OCT-H0"
694
+ }
695
+ ```
696
+
697
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
698
+
699
+ | `pack_error.code` | Service status | Retryable | Message |
700
+ |---|---|---|---|
701
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
702
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
703
+ | `invalid_request` | 400, 422 | no | built from the service's response |
704
+
705
+ <h3 id="kalshi-get-candlesticks"><code>get-candlesticks</code></h3>
706
+
707
+ **Kalshi Get Market Candlesticks.** Candlesticks for one Kalshi market between two Unix times: per period the Yes bid and ask OHLC, the trade price distribution (open, high, low, close, mean), volume and open interest, at 1-minute, 1-hour or 1-day periods. Needs the market's series ticker too.
708
+
709
+ Ref `io.b3os/kalshi/get-candlesticks@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-candlesticks`
710
+
711
+ **curl**
712
+
713
+ ```bash
714
+ curl -s https://beta-api.b3os.org/v1/actions/call \
715
+ -H "Authorization: Bearer $B3OS_API_KEY" \
716
+ -H "Content-Type: application/json" \
717
+ -d '{
718
+ "ref": "io.b3os/kalshi/get-candlesticks@1",
719
+ "input": {
720
+ "seriesTicker": "KXFEDDECISION",
721
+ "ticker": "KXFEDDECISION-26OCT-H0",
722
+ "startTs": 1792900000,
723
+ "endTs": 1792990000,
724
+ "periodInterval": 1440
725
+ }
726
+ }'
727
+ ```
728
+ **TypeScript**
729
+
730
+ ```ts
731
+ import { B3OS } from "@b3os/sdk";
732
+
733
+ const b3os = new B3OS();
734
+ const result = await b3os.actions.call({
735
+ ref: "io.b3os/kalshi/get-candlesticks@1",
736
+ input: {
737
+ seriesTicker: "KXFEDDECISION",
738
+ ticker: "KXFEDDECISION-26OCT-H0",
739
+ startTs: 1792900000,
740
+ endTs: 1792990000,
741
+ periodInterval: 1440,
742
+ },
743
+ });
744
+ console.log(result.output);
745
+ ```
746
+ **Python**
747
+
748
+ ```python
749
+ from b3os import B3OS
750
+
751
+ b3os = B3OS()
752
+ result = b3os.actions.call({
753
+ "ref": "io.b3os/kalshi/get-candlesticks@1",
754
+ "input": {
755
+ "seriesTicker": "KXFEDDECISION",
756
+ "ticker": "KXFEDDECISION-26OCT-H0",
757
+ "startTs": 1792900000,
758
+ "endTs": 1792990000,
759
+ "periodInterval": 1440,
760
+ },
761
+ })
762
+ print(result["output"])
763
+ ```
764
+ **MCP**
765
+
766
+ ```json
767
+ {
768
+ "method": "tools/call",
769
+ "params": {
770
+ "name": "kalshi__get-candlesticks",
771
+ "arguments": {
772
+ "seriesTicker": "KXFEDDECISION",
773
+ "ticker": "KXFEDDECISION-26OCT-H0",
774
+ "startTs": 1792900000,
775
+ "endTs": 1792990000,
776
+ "periodInterval": 1440
777
+ }
778
+ }
779
+ }
780
+ ```
781
+
782
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-candlesticks` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
783
+
784
+ Output, labeled `fixture`: Kalshi Get Market Candlesticks (response recorded 2026-10-26). From the bundle's `fixtures/get-candlesticks.json`, not a live call.
785
+
786
+ ```json
787
+ {
788
+ "candlesticks": [
789
+ {
790
+ "end_period_ts": 1792900800,
791
+ "yes_bid": {
792
+ "open_dollars": "0.9200",
793
+ "low_dollars": "0.9200",
794
+ "high_dollars": "0.9200",
795
+ "close_dollars": "0.9200"
796
+ },
797
+ "yes_ask": {
798
+ "open_dollars": "0.9300",
799
+ "low_dollars": "0.9300",
800
+ "high_dollars": "0.9300",
801
+ "close_dollars": "0.9300"
802
+ },
803
+ "price": {
804
+ "open_dollars": "0.9200",
805
+ "low_dollars": "0.9200",
806
+ "high_dollars": "0.9300",
807
+ "close_dollars": "0.9300",
808
+ "mean_dollars": "0.9291",
809
+ "previous_dollars": "0.9300"
810
+ },
811
+ "volume_fp": "217799.63",
812
+ "open_interest_fp": "2946144.56"
813
+ },
814
+ {
815
+ "end_period_ts": 1792987200,
816
+ "yes_bid": {
817
+ "open_dollars": "0.9200",
818
+ "low_dollars": "0.9200",
819
+ "high_dollars": "0.9300",
820
+ "close_dollars": "0.9300"
821
+ },
822
+ "yes_ask": {
823
+ "open_dollars": "0.9300",
824
+ "low_dollars": "0.9300",
825
+ "high_dollars": "0.9400",
826
+ "close_dollars": "0.9400"
827
+ ```
828
+
829
+ The first 40 of 57 lines; the fixture file has the rest.
830
+
831
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
832
+
833
+ | `pack_error.code` | Service status | Retryable | Message |
834
+ |---|---|---|---|
835
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
836
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
837
+ | `invalid_request` | 400, 422 | no | built from the service's response |
838
+
839
+ <h3 id="kalshi-get-trades"><code>get-trades</code></h3>
840
+
841
+ **Kalshi Get Trades.** Recent Kalshi trades, newest first, across all markets or for one ticker: trade id, contract count, Yes and No prices, taker side and time. Filter by a Unix time window and page with the cursor.
842
+
843
+ Ref `io.b3os/kalshi/get-trades@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-trades`
844
+
845
+ **curl**
846
+
847
+ ```bash
848
+ curl -s https://beta-api.b3os.org/v1/actions/call \
849
+ -H "Authorization: Bearer $B3OS_API_KEY" \
850
+ -H "Content-Type: application/json" \
851
+ -d '{"ref": "io.b3os/kalshi/get-trades@1", "input": {"limit": 2}}'
852
+ ```
853
+ **TypeScript**
854
+
855
+ ```ts
856
+ import { B3OS } from "@b3os/sdk";
857
+
858
+ const b3os = new B3OS();
859
+ const result = await b3os.actions.call({ ref: "io.b3os/kalshi/get-trades@1", input: { limit: 2 } });
860
+ console.log(result.output);
861
+ ```
862
+ **Python**
863
+
864
+ ```python
865
+ from b3os import B3OS
866
+
867
+ b3os = B3OS()
868
+ result = b3os.actions.call({"ref": "io.b3os/kalshi/get-trades@1", "input": {"limit": 2}})
869
+ print(result["output"])
870
+ ```
871
+ **MCP**
872
+
873
+ ```json
874
+ {
875
+ "method": "tools/call",
876
+ "params": {"name": "kalshi__get-trades", "arguments": {"limit": 2}}
877
+ }
878
+ ```
879
+
880
+ Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-trades` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
881
+
882
+ Output, labeled `fixture`: Kalshi Get Trades (response recorded 2026-10-26). From the bundle's `fixtures/get-trades.json`, not a live call.
883
+
884
+ ```json
885
+ {
886
+ "trades": [
887
+ {
888
+ "trade_id": "0724abbc-65f1-adeb-a074-4f2dcd6ab576",
889
+ "ticker": "KXBTC15M-26OCT260345-45",
890
+ "count_fp": "4.18",
891
+ "yes_price_dollars": "0.2700",
892
+ "no_price_dollars": "0.7300",
893
+ "taker_side": "no",
894
+ "created_time": "2026-10-26T07:39:36.976527Z"
895
+ },
896
+ {
897
+ "trade_id": "0724abbc-4b11-a828-f908-4e6a587585f5",
898
+ "ticker": "KXITFMATCH-26OCT26NAKFUX-NAK",
899
+ "count_fp": "30.00",
900
+ "yes_price_dollars": "0.9300",
901
+ "no_price_dollars": "0.0700",
902
+ "taker_side": "yes",
903
+ "created_time": "2026-10-26T07:39:36.962304Z"
904
+ }
905
+ ],
906
+ "cursor": "EhIKEAckq7xLEago-QhOalh1hfUaDAi4h_zWBhCAsO7KAw",
907
+ "count": 2
908
+ }
909
+ ```
910
+
911
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
912
+
913
+ | `pack_error.code` | Service status | Retryable | Message |
914
+ |---|---|---|---|
915
+ | `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
916
+ | `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
917
+ | `invalid_request` | 400, 422 | no | built from the service's response |