Skip to content

Commit 569598b

Browse files
authored
fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274)
1 parent cc66aa5 commit 569598b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+347
-797
lines changed

apps/docs/content/docs/en/tools/kalshi.mdx

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Retrieve a list of prediction markets from Kalshi with optional filtering
5252

5353
| Parameter | Type | Description |
5454
| --------- | ---- | ----------- |
55-
| `success` | boolean | Operation success status |
56-
| `output` | object | Markets data and metadata |
55+
| `markets` | array | Array of market objects |
56+
| `paging` | object | Pagination cursor for fetching more results |
5757

5858
### `kalshi_get_market`
5959

@@ -69,8 +69,7 @@ Retrieve details of a specific prediction market by ticker
6969

7070
| Parameter | Type | Description |
7171
| --------- | ---- | ----------- |
72-
| `success` | boolean | Operation success status |
73-
| `output` | object | Market data and metadata |
72+
| `market` | object | Market object with details |
7473

7574
### `kalshi_get_events`
7675

@@ -90,8 +89,8 @@ Retrieve a list of events from Kalshi with optional filtering
9089

9190
| Parameter | Type | Description |
9291
| --------- | ---- | ----------- |
93-
| `success` | boolean | Operation success status |
94-
| `output` | object | Events data and metadata |
92+
| `events` | array | Array of event objects |
93+
| `paging` | object | Pagination cursor for fetching more results |
9594

9695
### `kalshi_get_event`
9796

@@ -108,8 +107,7 @@ Retrieve details of a specific event by ticker
108107

109108
| Parameter | Type | Description |
110109
| --------- | ---- | ----------- |
111-
| `success` | boolean | Operation success status |
112-
| `output` | object | Event data and metadata |
110+
| `event` | object | Event object with details |
113111

114112
### `kalshi_get_balance`
115113

@@ -126,8 +124,10 @@ Retrieve your account balance and portfolio value from Kalshi
126124

127125
| Parameter | Type | Description |
128126
| --------- | ---- | ----------- |
129-
| `success` | boolean | Operation success status |
130-
| `output` | object | Balance data and metadata |
127+
| `balance` | number | Account balance in cents |
128+
| `portfolioValue` | number | Portfolio value in cents |
129+
| `balanceDollars` | number | Account balance in dollars |
130+
| `portfolioValueDollars` | number | Portfolio value in dollars |
131131

132132
### `kalshi_get_positions`
133133

@@ -149,8 +149,8 @@ Retrieve your open positions from Kalshi
149149

150150
| Parameter | Type | Description |
151151
| --------- | ---- | ----------- |
152-
| `success` | boolean | Operation success status |
153-
| `output` | object | Positions data and metadata |
152+
| `positions` | array | Array of position objects |
153+
| `paging` | object | Pagination cursor for fetching more results |
154154

155155
### `kalshi_get_orders`
156156

@@ -172,8 +172,8 @@ Retrieve your orders from Kalshi with optional filtering
172172

173173
| Parameter | Type | Description |
174174
| --------- | ---- | ----------- |
175-
| `success` | boolean | Operation success status |
176-
| `output` | object | Orders data and metadata |
175+
| `orders` | array | Array of order objects |
176+
| `paging` | object | Pagination cursor for fetching more results |
177177

178178
### `kalshi_get_order`
179179

@@ -191,8 +191,7 @@ Retrieve details of a specific order by ID from Kalshi
191191

192192
| Parameter | Type | Description |
193193
| --------- | ---- | ----------- |
194-
| `success` | boolean | Operation success status |
195-
| `output` | object | Order data |
194+
| `order` | object | Order object with details |
196195

197196
### `kalshi_get_orderbook`
198197

@@ -208,8 +207,7 @@ Retrieve the orderbook (yes and no bids) for a specific market
208207

209208
| Parameter | Type | Description |
210209
| --------- | ---- | ----------- |
211-
| `success` | boolean | Operation success status |
212-
| `output` | object | Orderbook data and metadata |
210+
| `orderbook` | object | Orderbook with yes/no bids and asks |
213211

214212
### `kalshi_get_trades`
215213

@@ -226,8 +224,8 @@ Retrieve recent trades across all markets
226224

227225
| Parameter | Type | Description |
228226
| --------- | ---- | ----------- |
229-
| `success` | boolean | Operation success status |
230-
| `output` | object | Trades data and metadata |
227+
| `trades` | array | Array of trade objects |
228+
| `paging` | object | Pagination cursor for fetching more results |
231229

232230
### `kalshi_get_candlesticks`
233231

@@ -247,8 +245,7 @@ Retrieve OHLC candlestick data for a specific market
247245

248246
| Parameter | Type | Description |
249247
| --------- | ---- | ----------- |
250-
| `success` | boolean | Operation success status |
251-
| `output` | object | Candlestick data and metadata |
248+
| `candlesticks` | array | Array of OHLC candlestick data |
252249

253250
### `kalshi_get_fills`
254251

@@ -271,8 +268,8 @@ Retrieve your portfolio
271268

272269
| Parameter | Type | Description |
273270
| --------- | ---- | ----------- |
274-
| `success` | boolean | Operation success status |
275-
| `output` | object | Fills data and metadata |
271+
| `fills` | array | Array of fill/trade objects |
272+
| `paging` | object | Pagination cursor for fetching more results |
276273

277274
### `kalshi_get_series_by_ticker`
278275

@@ -288,8 +285,7 @@ Retrieve details of a specific market series by ticker
288285

289286
| Parameter | Type | Description |
290287
| --------- | ---- | ----------- |
291-
| `success` | boolean | Operation success status |
292-
| `output` | object | Series data and metadata |
288+
| `series` | object | Series object with details |
293289

294290
### `kalshi_get_exchange_status`
295291

@@ -304,8 +300,7 @@ Retrieve the current status of the Kalshi exchange (trading and exchange activit
304300

305301
| Parameter | Type | Description |
306302
| --------- | ---- | ----------- |
307-
| `success` | boolean | Operation success status |
308-
| `output` | object | Exchange status data and metadata |
303+
| `status` | object | Exchange status with trading_active and exchange_active flags |
309304

310305
### `kalshi_create_order`
311306

@@ -339,8 +334,7 @@ Create a new order on a Kalshi prediction market
339334

340335
| Parameter | Type | Description |
341336
| --------- | ---- | ----------- |
342-
| `success` | boolean | Operation success status |
343-
| `output` | object | Created order data |
337+
| `order` | object | The created order object |
344338

345339
### `kalshi_cancel_order`
346340

@@ -358,8 +352,8 @@ Cancel an existing order on Kalshi
358352

359353
| Parameter | Type | Description |
360354
| --------- | ---- | ----------- |
361-
| `success` | boolean | Operation success status |
362-
| `output` | object | Canceled order data |
355+
| `order` | object | The canceled order object |
356+
| `reducedBy` | number | Number of contracts canceled |
363357

364358
### `kalshi_amend_order`
365359

@@ -387,8 +381,7 @@ Modify the price or quantity of an existing order on Kalshi
387381

388382
| Parameter | Type | Description |
389383
| --------- | ---- | ----------- |
390-
| `success` | boolean | Operation success status |
391-
| `output` | object | Amended order data |
384+
| `order` | object | The amended order object |
392385

393386

394387

apps/docs/content/docs/en/tools/polymarket.mdx

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ Retrieve a list of prediction markets from Polymarket with optional filtering
4747
| `order` | string | No | Sort field \(e.g., volumeNum, liquidityNum, startDate, endDate, createdAt\) |
4848
| `ascending` | string | No | Sort direction \(true for ascending, false for descending\) |
4949
| `tagId` | string | No | Filter by tag ID |
50-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
50+
| `limit` | string | No | Number of results per page \(max 50\) |
5151
| `offset` | string | No | Pagination offset \(skip this many results\) |
5252

5353
#### Output
5454

5555
| Parameter | Type | Description |
5656
| --------- | ---- | ----------- |
57-
| `success` | boolean | Operation success status |
58-
| `output` | object | Markets data and metadata |
57+
| `markets` | array | Array of market objects |
5958

6059
### `polymarket_get_market`
6160

@@ -72,8 +71,7 @@ Retrieve details of a specific prediction market by ID or slug
7271

7372
| Parameter | Type | Description |
7473
| --------- | ---- | ----------- |
75-
| `success` | boolean | Operation success status |
76-
| `output` | object | Market data and metadata |
74+
| `market` | object | Market object with details |
7775

7876
### `polymarket_get_events`
7977

@@ -87,15 +85,14 @@ Retrieve a list of events from Polymarket with optional filtering
8785
| `order` | string | No | Sort field \(e.g., volume, liquidity, startDate, endDate, createdAt\) |
8886
| `ascending` | string | No | Sort direction \(true for ascending, false for descending\) |
8987
| `tagId` | string | No | Filter by tag ID |
90-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
88+
| `limit` | string | No | Number of results per page \(max 50\) |
9189
| `offset` | string | No | Pagination offset \(skip this many results\) |
9290

9391
#### Output
9492

9593
| Parameter | Type | Description |
9694
| --------- | ---- | ----------- |
97-
| `success` | boolean | Operation success status |
98-
| `output` | object | Events data and metadata |
95+
| `events` | array | Array of event objects |
9996

10097
### `polymarket_get_event`
10198

@@ -112,8 +109,7 @@ Retrieve details of a specific event by ID or slug
112109

113110
| Parameter | Type | Description |
114111
| --------- | ---- | ----------- |
115-
| `success` | boolean | Operation success status |
116-
| `output` | object | Event data and metadata |
112+
| `event` | object | Event object with details |
117113

118114
### `polymarket_get_tags`
119115

@@ -123,15 +119,14 @@ Retrieve available tags for filtering markets from Polymarket
123119

124120
| Parameter | Type | Required | Description |
125121
| --------- | ---- | -------- | ----------- |
126-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
122+
| `limit` | string | No | Number of results per page \(max 50\) |
127123
| `offset` | string | No | Pagination offset \(skip this many results\) |
128124

129125
#### Output
130126

131127
| Parameter | Type | Description |
132128
| --------- | ---- | ----------- |
133-
| `success` | boolean | Operation success status |
134-
| `output` | object | Tags data and metadata |
129+
| `tags` | array | Array of tag objects with id, label, and slug |
135130

136131
### `polymarket_search`
137132

@@ -142,15 +137,14 @@ Search for markets, events, and profiles on Polymarket
142137
| Parameter | Type | Required | Description |
143138
| --------- | ---- | -------- | ----------- |
144139
| `query` | string | Yes | Search query term |
145-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
146-
| `offset` | string | No | Pagination offset \(skip this many results\) |
140+
| `limit` | string | No | Number of results per page \(max 50\) |
141+
| `offset` | string | No | Pagination offset |
147142

148143
#### Output
149144

150145
| Parameter | Type | Description |
151146
| --------- | ---- | ----------- |
152-
| `success` | boolean | Operation success status |
153-
| `output` | object | Search results and metadata |
147+
| `results` | object | Search results containing markets, events, and profiles arrays |
154148

155149
### `polymarket_get_series`
156150

@@ -160,15 +154,14 @@ Retrieve series (related market groups) from Polymarket
160154

161155
| Parameter | Type | Required | Description |
162156
| --------- | ---- | -------- | ----------- |
163-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
157+
| `limit` | string | No | Number of results per page \(max 50\) |
164158
| `offset` | string | No | Pagination offset \(skip this many results\) |
165159

166160
#### Output
167161

168162
| Parameter | Type | Description |
169163
| --------- | ---- | ----------- |
170-
| `success` | boolean | Operation success status |
171-
| `output` | object | Series data and metadata |
164+
| `series` | array | Array of series objects |
172165

173166
### `polymarket_get_series_by_id`
174167

@@ -184,8 +177,7 @@ Retrieve a specific series (related market group) by ID from Polymarket
184177

185178
| Parameter | Type | Description |
186179
| --------- | ---- | ----------- |
187-
| `success` | boolean | Operation success status |
188-
| `output` | object | Series data and metadata |
180+
| `series` | object | Series object with details |
189181

190182
### `polymarket_get_orderbook`
191183

@@ -201,8 +193,7 @@ Retrieve the order book summary for a specific token
201193

202194
| Parameter | Type | Description |
203195
| --------- | ---- | ----------- |
204-
| `success` | boolean | Operation success status |
205-
| `output` | object | Orderbook data and metadata |
196+
| `orderbook` | object | Order book with bids and asks arrays |
206197

207198
### `polymarket_get_price`
208199

@@ -219,8 +210,7 @@ Retrieve the market price for a specific token and side
219210

220211
| Parameter | Type | Description |
221212
| --------- | ---- | ----------- |
222-
| `success` | boolean | Operation success status |
223-
| `output` | object | Price data and metadata |
213+
| `price` | string | Market price |
224214

225215
### `polymarket_get_midpoint`
226216

@@ -236,8 +226,7 @@ Retrieve the midpoint price for a specific token
236226

237227
| Parameter | Type | Description |
238228
| --------- | ---- | ----------- |
239-
| `success` | boolean | Operation success status |
240-
| `output` | object | Midpoint price data and metadata |
229+
| `midpoint` | string | Midpoint price |
241230

242231
### `polymarket_get_price_history`
243232

@@ -257,8 +246,7 @@ Retrieve historical price data for a specific market token
257246

258247
| Parameter | Type | Description |
259248
| --------- | ---- | ----------- |
260-
| `success` | boolean | Operation success status |
261-
| `output` | object | Price history data and metadata |
249+
| `history` | array | Array of price history entries with timestamp \(t\) and price \(p\) |
262250

263251
### `polymarket_get_last_trade_price`
264252

@@ -274,8 +262,7 @@ Retrieve the last trade price for a specific token
274262

275263
| Parameter | Type | Description |
276264
| --------- | ---- | ----------- |
277-
| `success` | boolean | Operation success status |
278-
| `output` | object | Last trade price and metadata |
265+
| `price` | string | Last trade price |
279266

280267
### `polymarket_get_spread`
281268

@@ -291,8 +278,7 @@ Retrieve the bid-ask spread for a specific token
291278

292279
| Parameter | Type | Description |
293280
| --------- | ---- | ----------- |
294-
| `success` | boolean | Operation success status |
295-
| `output` | object | Spread data and metadata |
281+
| `spread` | object | Bid-ask spread with bid and ask prices |
296282

297283
### `polymarket_get_tick_size`
298284

@@ -308,8 +294,7 @@ Retrieve the minimum tick size for a specific token
308294

309295
| Parameter | Type | Description |
310296
| --------- | ---- | ----------- |
311-
| `success` | boolean | Operation success status |
312-
| `output` | object | Tick size and metadata |
297+
| `tickSize` | string | Minimum tick size |
313298

314299
### `polymarket_get_positions`
315300

@@ -326,8 +311,7 @@ Retrieve user positions from Polymarket
326311

327312
| Parameter | Type | Description |
328313
| --------- | ---- | ----------- |
329-
| `success` | boolean | Operation success status |
330-
| `output` | object | Positions data and metadata |
314+
| `positions` | array | Array of position objects |
331315

332316
### `polymarket_get_trades`
333317

@@ -339,15 +323,14 @@ Retrieve trade history from Polymarket
339323
| --------- | ---- | -------- | ----------- |
340324
| `user` | string | No | User wallet address to filter trades |
341325
| `market` | string | No | Market ID to filter trades |
342-
| `limit` | string | No | Number of results per page \(recommended: 25-50\) |
326+
| `limit` | string | No | Number of results per page \(max 50\) |
343327
| `offset` | string | No | Pagination offset \(skip this many results\) |
344328

345329
#### Output
346330

347331
| Parameter | Type | Description |
348332
| --------- | ---- | ----------- |
349-
| `success` | boolean | Operation success status |
350-
| `output` | object | Trades data and metadata |
333+
| `trades` | array | Array of trade objects |
351334

352335

353336

0 commit comments

Comments
 (0)