@keystrokehq/polymarket 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data.d.mts +4 -4
- package/dist/data.mjs +6 -6
- package/dist/discovery.mjs +9 -9
- package/dist/events.mjs +5 -5
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/markets.mjs +5 -5
- package/dist/orderbook.mjs +4 -4
- package/dist/pricing.mjs +6 -6
- package/dist/{schemas-C6SqZjA-.mjs → schemas-BHjW8Fcf.mjs} +4 -4
- package/package.json +2 -2
package/dist/data.d.mts
CHANGED
|
@@ -17,9 +17,9 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
17
17
|
market: z.ZodOptional<z.ZodString>;
|
|
18
18
|
asset_id: z.ZodOptional<z.ZodString>;
|
|
19
19
|
side: z.ZodOptional<z.ZodString>;
|
|
20
|
-
size: z.ZodOptional<z.
|
|
21
|
-
fee_rate_bps: z.ZodOptional<z.
|
|
22
|
-
price: z.ZodOptional<z.
|
|
20
|
+
size: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
21
|
+
fee_rate_bps: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
22
|
+
price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
23
23
|
status: z.ZodOptional<z.ZodString>;
|
|
24
24
|
match_time: z.ZodOptional<z.ZodString>;
|
|
25
25
|
last_update: z.ZodOptional<z.ZodString>;
|
|
@@ -30,7 +30,7 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
30
30
|
bucket_index: z.ZodOptional<z.ZodNumber>;
|
|
31
31
|
owner: z.ZodOptional<z.ZodString>;
|
|
32
32
|
type: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, z.core.$
|
|
33
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
34
34
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
35
35
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
36
36
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/data.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/data.ts
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
* via the Polymarket Data API.
|
|
10
10
|
*/
|
|
11
11
|
const listTrades = polymarketOperation({
|
|
12
|
-
id: "
|
|
12
|
+
id: "polymarket.list-polymarket-trades",
|
|
13
13
|
name: "List Polymarket Trades",
|
|
14
14
|
description: "List trades with filters via the Data API",
|
|
15
15
|
input: z.object({
|
|
@@ -32,7 +32,7 @@ const listTrades = polymarketOperation({
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
const getUserPositions = polymarketOperation({
|
|
35
|
-
id: "
|
|
35
|
+
id: "polymarket.get-polymarket-user-positions",
|
|
36
36
|
name: "Get Polymarket User Positions",
|
|
37
37
|
description: "Get positions for a user wallet via the Data API",
|
|
38
38
|
input: z.object({
|
|
@@ -57,7 +57,7 @@ const getUserPositions = polymarketOperation({
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
const getMarketHolders = polymarketOperation({
|
|
60
|
-
id: "
|
|
60
|
+
id: "polymarket.get-polymarket-market-holders",
|
|
61
61
|
name: "Get Polymarket Market Holders",
|
|
62
62
|
description: "Get top holders for a market via the Data API",
|
|
63
63
|
input: z.object({
|
|
@@ -80,7 +80,7 @@ const getMarketHolders = polymarketOperation({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const getOpenInterest = polymarketOperation({
|
|
83
|
-
id: "
|
|
83
|
+
id: "polymarket.get-polymarket-open-interest",
|
|
84
84
|
name: "Get Polymarket Open Interest",
|
|
85
85
|
description: "Get open interest for market(s) via the Data API",
|
|
86
86
|
input: z.object({ conditionId: z.string() }),
|
|
@@ -95,7 +95,7 @@ const getOpenInterest = polymarketOperation({
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
const getLiveVolume = polymarketOperation({
|
|
98
|
-
id: "
|
|
98
|
+
id: "polymarket.get-polymarket-live-volume",
|
|
99
99
|
name: "Get Polymarket Live Volume",
|
|
100
100
|
description: "Get live volume for an event via the Data API",
|
|
101
101
|
input: z.object({ eventId: z.string() }),
|
package/dist/discovery.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/discovery.ts
|
|
@@ -8,7 +8,7 @@ import { z } from "zod";
|
|
|
8
8
|
* Steps for tags, series, search, profiles, and sports metadata via the Gamma API.
|
|
9
9
|
*/
|
|
10
10
|
const listTags = polymarketOperation({
|
|
11
|
-
id: "
|
|
11
|
+
id: "polymarket.list-polymarket-tags",
|
|
12
12
|
name: "List Polymarket Tags",
|
|
13
13
|
description: "List all tags from the Gamma API",
|
|
14
14
|
input: z.object({}),
|
|
@@ -22,7 +22,7 @@ const listTags = polymarketOperation({
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
const listSeries = polymarketOperation({
|
|
25
|
-
id: "
|
|
25
|
+
id: "polymarket.list-polymarket-series",
|
|
26
26
|
name: "List Polymarket Series",
|
|
27
27
|
description: "List all series from the Gamma API",
|
|
28
28
|
input: z.object({}),
|
|
@@ -36,7 +36,7 @@ const listSeries = polymarketOperation({
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
const getSeries = polymarketOperation({
|
|
39
|
-
id: "
|
|
39
|
+
id: "polymarket.get-polymarket-series",
|
|
40
40
|
name: "Get Polymarket Series",
|
|
41
41
|
description: "Get a series by ID from the Gamma API",
|
|
42
42
|
input: z.object({ id: z.string() }),
|
|
@@ -50,7 +50,7 @@ const getSeries = polymarketOperation({
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
const search = polymarketOperation({
|
|
53
|
-
id: "
|
|
53
|
+
id: "polymarket.search-polymarket",
|
|
54
54
|
name: "Search Polymarket",
|
|
55
55
|
description: "Search markets, events, and profiles via the Gamma API",
|
|
56
56
|
input: z.object({ q: z.string() }),
|
|
@@ -65,7 +65,7 @@ const search = polymarketOperation({
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
const getProfile = polymarketOperation({
|
|
68
|
-
id: "
|
|
68
|
+
id: "polymarket.get-polymarket-profile",
|
|
69
69
|
name: "Get Polymarket Profile",
|
|
70
70
|
description: "Get a user profile by wallet address via the Gamma API",
|
|
71
71
|
input: z.object({ address: z.string().regex(/^0x[a-fA-F0-9]{40}$/) }),
|
|
@@ -80,7 +80,7 @@ const getProfile = polymarketOperation({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const getSportsMetadata = polymarketOperation({
|
|
83
|
-
id: "
|
|
83
|
+
id: "polymarket.get-polymarket-sports-metadata",
|
|
84
84
|
name: "Get Polymarket Sports Metadata",
|
|
85
85
|
description: "Get sports metadata from the Gamma API",
|
|
86
86
|
input: z.object({}),
|
|
@@ -94,7 +94,7 @@ const getSportsMetadata = polymarketOperation({
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
const getSportsMarketTypes = polymarketOperation({
|
|
97
|
-
id: "
|
|
97
|
+
id: "polymarket.get-polymarket-sports-market-types",
|
|
98
98
|
name: "Get Polymarket Sports Market Types",
|
|
99
99
|
description: "Get sports market types from the Gamma API",
|
|
100
100
|
input: z.object({}),
|
|
@@ -108,7 +108,7 @@ const getSportsMarketTypes = polymarketOperation({
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
const getSportsTeams = polymarketOperation({
|
|
111
|
-
id: "
|
|
111
|
+
id: "polymarket.get-polymarket-sports-teams",
|
|
112
112
|
name: "Get Polymarket Sports Teams",
|
|
113
113
|
description: "Get sports teams from the Gamma API",
|
|
114
114
|
input: z.object({}),
|
package/dist/events.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/events.ts
|
|
@@ -8,7 +8,7 @@ import { z } from "zod";
|
|
|
8
8
|
* Steps for listing, getting, and querying Polymarket events via the Gamma API.
|
|
9
9
|
*/
|
|
10
10
|
const listEvents = polymarketOperation({
|
|
11
|
-
id: "
|
|
11
|
+
id: "polymarket.list-polymarket-events",
|
|
12
12
|
name: "List Polymarket Events",
|
|
13
13
|
description: "List and filter events with query params via the Gamma API",
|
|
14
14
|
input: listEventsParamsSchema,
|
|
@@ -23,7 +23,7 @@ const listEvents = polymarketOperation({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const getEvent = polymarketOperation({
|
|
26
|
-
id: "
|
|
26
|
+
id: "polymarket.get-polymarket-event",
|
|
27
27
|
name: "Get Polymarket Event",
|
|
28
28
|
description: "Get a single event by ID from the Gamma API",
|
|
29
29
|
input: z.object({ id: z.string() }),
|
|
@@ -37,7 +37,7 @@ const getEvent = polymarketOperation({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
const getEventBySlug = polymarketOperation({
|
|
40
|
-
id: "
|
|
40
|
+
id: "polymarket.get-polymarket-event-by-slug",
|
|
41
41
|
name: "Get Polymarket Event by Slug",
|
|
42
42
|
description: "Get a single event by slug from the Gamma API",
|
|
43
43
|
input: z.object({ slug: z.string() }),
|
|
@@ -51,7 +51,7 @@ const getEventBySlug = polymarketOperation({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const getEventTags = polymarketOperation({
|
|
54
|
-
id: "
|
|
54
|
+
id: "polymarket.get-polymarket-event-tags",
|
|
55
55
|
name: "Get Polymarket Event Tags",
|
|
56
56
|
description: "Get tags for an event by event ID from the Gamma API",
|
|
57
57
|
input: z.object({ id: z.string() }),
|
package/dist/index.d.mts
CHANGED
|
@@ -311,9 +311,9 @@ declare const tradeSchema: z.ZodObject<{
|
|
|
311
311
|
market: z.ZodOptional<z.ZodString>;
|
|
312
312
|
asset_id: z.ZodOptional<z.ZodString>;
|
|
313
313
|
side: z.ZodOptional<z.ZodString>;
|
|
314
|
-
size: z.ZodOptional<z.
|
|
315
|
-
fee_rate_bps: z.ZodOptional<z.
|
|
316
|
-
price: z.ZodOptional<z.
|
|
314
|
+
size: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
315
|
+
fee_rate_bps: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
316
|
+
price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
317
317
|
status: z.ZodOptional<z.ZodString>;
|
|
318
318
|
match_time: z.ZodOptional<z.ZodString>;
|
|
319
319
|
last_update: z.ZodOptional<z.ZodString>;
|
|
@@ -324,7 +324,7 @@ declare const tradeSchema: z.ZodObject<{
|
|
|
324
324
|
bucket_index: z.ZodOptional<z.ZodNumber>;
|
|
325
325
|
owner: z.ZodOptional<z.ZodString>;
|
|
326
326
|
type: z.ZodOptional<z.ZodString>;
|
|
327
|
-
}, z.core.$
|
|
327
|
+
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
328
328
|
type Trade = z.infer<typeof tradeSchema>;
|
|
329
329
|
declare const positionSchema: z.ZodObject<{
|
|
330
330
|
asset: z.ZodOptional<z.ZodString>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-
|
|
1
|
+
import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { t as polymarket } from "./integration-KDxC97JC.mjs";
|
|
3
3
|
import { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades } from "./data.mjs";
|
|
4
4
|
import { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search } from "./discovery.mjs";
|
package/dist/markets.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/markets.ts
|
|
@@ -8,7 +8,7 @@ import { z } from "zod";
|
|
|
8
8
|
* Steps for listing, getting, and querying Polymarket markets via the Gamma API.
|
|
9
9
|
*/
|
|
10
10
|
const listMarkets = polymarketOperation({
|
|
11
|
-
id: "
|
|
11
|
+
id: "polymarket.list-polymarket-markets",
|
|
12
12
|
name: "List Polymarket Markets",
|
|
13
13
|
description: "List and filter markets with extensive query params via the Gamma API",
|
|
14
14
|
input: listMarketsParamsSchema,
|
|
@@ -23,7 +23,7 @@ const listMarkets = polymarketOperation({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const getMarket = polymarketOperation({
|
|
26
|
-
id: "
|
|
26
|
+
id: "polymarket.get-polymarket-market",
|
|
27
27
|
name: "Get Polymarket Market",
|
|
28
28
|
description: "Get a single market by ID from the Gamma API",
|
|
29
29
|
input: z.object({ id: z.string() }),
|
|
@@ -37,7 +37,7 @@ const getMarket = polymarketOperation({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
const getMarketBySlug = polymarketOperation({
|
|
40
|
-
id: "
|
|
40
|
+
id: "polymarket.get-polymarket-market-by-slug",
|
|
41
41
|
name: "Get Polymarket Market by Slug",
|
|
42
42
|
description: "Get a single market by slug from the Gamma API",
|
|
43
43
|
input: z.object({ slug: z.string() }),
|
|
@@ -51,7 +51,7 @@ const getMarketBySlug = polymarketOperation({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const getMarketTags = polymarketOperation({
|
|
54
|
-
id: "
|
|
54
|
+
id: "polymarket.get-polymarket-market-tags",
|
|
55
55
|
name: "Get Polymarket Market Tags",
|
|
56
56
|
description: "Get tags for a market by market ID from the Gamma API",
|
|
57
57
|
input: z.object({ id: z.string() }),
|
package/dist/orderbook.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-
|
|
1
|
+
import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/orderbook.ts
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
* Prices and sizes are returned as strings.
|
|
10
10
|
*/
|
|
11
11
|
const getOrderBook = polymarketOperation({
|
|
12
|
-
id: "
|
|
12
|
+
id: "polymarket.get-polymarket-order-book",
|
|
13
13
|
name: "Get Polymarket Order Book",
|
|
14
14
|
description: "Get order book (bids/asks) for a token via the CLOB API",
|
|
15
15
|
input: z.object({ tokenID: z.string() }),
|
|
@@ -24,7 +24,7 @@ const getOrderBook = polymarketOperation({
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
const batchGetOrderBooks = polymarketOperation({
|
|
27
|
-
id: "
|
|
27
|
+
id: "polymarket.batch-get-polymarket-order-books",
|
|
28
28
|
name: "Batch Get Polymarket Order Books",
|
|
29
29
|
description: "Get order books for multiple tokens (max 500) via the CLOB API",
|
|
30
30
|
input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
|
|
@@ -39,7 +39,7 @@ const batchGetOrderBooks = polymarketOperation({
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
const batchGetSpreads = polymarketOperation({
|
|
42
|
-
id: "
|
|
42
|
+
id: "polymarket.batch-get-polymarket-spreads",
|
|
43
43
|
name: "Batch Get Polymarket Spreads",
|
|
44
44
|
description: "Get spreads for multiple tokens (max 500) via the CLOB API",
|
|
45
45
|
input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
|
package/dist/pricing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-BHjW8Fcf.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/pricing.ts
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
* Note: CLOB API returns prices as strings, not numbers.
|
|
10
10
|
*/
|
|
11
11
|
const getPrice = polymarketOperation({
|
|
12
|
-
id: "
|
|
12
|
+
id: "polymarket.get-polymarket-price",
|
|
13
13
|
name: "Get Polymarket Price",
|
|
14
14
|
description: "Get price for a token and side (BUY/SELL) via the CLOB API",
|
|
15
15
|
input: z.object({
|
|
@@ -30,7 +30,7 @@ const getPrice = polymarketOperation({
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
const getMidpoint = polymarketOperation({
|
|
33
|
-
id: "
|
|
33
|
+
id: "polymarket.get-polymarket-midpoint",
|
|
34
34
|
name: "Get Polymarket Midpoint",
|
|
35
35
|
description: "Get midpoint price for a token via the CLOB API",
|
|
36
36
|
input: z.object({ tokenID: z.string() }),
|
|
@@ -45,7 +45,7 @@ const getMidpoint = polymarketOperation({
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
const listPrices = polymarketOperation({
|
|
48
|
-
id: "
|
|
48
|
+
id: "polymarket.list-polymarket-prices",
|
|
49
49
|
name: "List Polymarket Prices",
|
|
50
50
|
description: "Get all current prices via the CLOB API",
|
|
51
51
|
input: z.object({}),
|
|
@@ -59,7 +59,7 @@ const listPrices = polymarketOperation({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
const batchGetPrices = polymarketOperation({
|
|
62
|
-
id: "
|
|
62
|
+
id: "polymarket.batch-get-polymarket-prices",
|
|
63
63
|
name: "Batch Get Polymarket Prices",
|
|
64
64
|
description: "Get prices for multiple tokens (max 500) via the CLOB API",
|
|
65
65
|
input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
|
|
@@ -74,7 +74,7 @@ const batchGetPrices = polymarketOperation({
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
const getPriceHistory = polymarketOperation({
|
|
77
|
-
id: "
|
|
77
|
+
id: "polymarket.get-polymarket-price-history",
|
|
78
78
|
name: "Get Polymarket Price History",
|
|
79
79
|
description: "Get historical prices with interval/fidelity via the CLOB API",
|
|
80
80
|
input: z.object({
|
|
@@ -280,9 +280,9 @@ const tradeSchema = z.object({
|
|
|
280
280
|
market: z.string().optional(),
|
|
281
281
|
asset_id: z.string().optional(),
|
|
282
282
|
side: z.string().optional(),
|
|
283
|
-
size: z.union([z.string(), z.number()]).
|
|
284
|
-
fee_rate_bps: z.union([z.string(), z.number()]).
|
|
285
|
-
price: z.union([z.string(), z.number()]).
|
|
283
|
+
size: z.union([z.string(), z.number()]).optional(),
|
|
284
|
+
fee_rate_bps: z.union([z.string(), z.number()]).optional(),
|
|
285
|
+
price: z.union([z.string(), z.number()]).optional(),
|
|
286
286
|
status: z.string().optional(),
|
|
287
287
|
match_time: z.string().optional(),
|
|
288
288
|
last_update: z.string().optional(),
|
|
@@ -293,7 +293,7 @@ const tradeSchema = z.object({
|
|
|
293
293
|
bucket_index: z.number().optional(),
|
|
294
294
|
owner: z.string().optional(),
|
|
295
295
|
type: z.string().optional()
|
|
296
|
-
}).
|
|
296
|
+
}).catchall(z.json());
|
|
297
297
|
const positionSchema = z.object({
|
|
298
298
|
asset: z.string().optional(),
|
|
299
299
|
conditionId: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/polymarket",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@keystrokehq/integration-authoring": "^0.0.
|
|
47
|
+
"@keystrokehq/integration-authoring": "^0.0.8",
|
|
48
48
|
"zod": "^4.3.6"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|