@predictorsdk/client 0.14.0 → 0.15.1

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 (48) hide show
  1. package/dist/Client.d.ts +25 -7
  2. package/dist/Client.js +48 -8
  3. package/dist/api/client/requests/GetEventRequest.d.ts +9 -3
  4. package/dist/api/client/requests/GetMarketRequest.d.ts +9 -3
  5. package/dist/api/client/requests/GetMarketsRequest.d.ts +10 -0
  6. package/dist/api/client/requests/GetSportsMatchingMarketsRequest.d.ts +12 -6
  7. package/dist/api/errors/ConflictError.d.ts +7 -0
  8. package/dist/api/errors/ConflictError.js +17 -0
  9. package/dist/api/errors/index.d.ts +1 -0
  10. package/dist/api/errors/index.js +1 -0
  11. package/dist/api/types/AmbiguousIdentifierError.d.ts +14 -0
  12. package/dist/api/types/AmbiguousIdentifierError.js +2 -0
  13. package/dist/api/types/CanonicalSportsEvent.d.ts +2 -2
  14. package/dist/api/types/CanonicalSportsSourceMarket.d.ts +5 -1
  15. package/dist/api/types/CanonicalSportsSourceOutcome.d.ts +7 -1
  16. package/dist/api/types/EventMarket.d.ts +1 -1
  17. package/dist/api/types/GetMarketsRequestProvider.d.ts +9 -0
  18. package/dist/api/types/GetMarketsRequestProvider.js +9 -0
  19. package/dist/api/types/MarketDetailOutcome.d.ts +7 -1
  20. package/dist/api/types/MarketDetailPricing.d.ts +46 -3
  21. package/dist/api/types/MarketDetailPricingAsOfKind.d.ts +18 -0
  22. package/dist/api/types/MarketDetailPricingAsOfKind.js +18 -0
  23. package/dist/api/types/MarketDetailPricingAvailability.d.ts +14 -1
  24. package/dist/api/types/MarketDetailPricingAvailability.js +14 -1
  25. package/dist/api/types/MarketsListResponse.d.ts +2 -0
  26. package/dist/api/types/MarketsSnapshot.d.ts +17 -0
  27. package/dist/api/types/MarketsSnapshot.js +2 -0
  28. package/dist/api/types/PlatformMarket.d.ts +1 -1
  29. package/dist/api/types/UnifiedMarket.d.ts +1 -1
  30. package/dist/api/types/index.d.ts +4 -0
  31. package/dist/api/types/index.js +4 -0
  32. package/dist/serialization/types/AmbiguousIdentifierError.d.ts +12 -0
  33. package/dist/serialization/types/AmbiguousIdentifierError.js +8 -0
  34. package/dist/serialization/types/GetMarketsRequestProvider.d.ts +7 -0
  35. package/dist/serialization/types/GetMarketsRequestProvider.js +3 -0
  36. package/dist/serialization/types/MarketDetailPricing.d.ts +3 -0
  37. package/dist/serialization/types/MarketDetailPricing.js +3 -0
  38. package/dist/serialization/types/MarketDetailPricingAsOfKind.d.ts +7 -0
  39. package/dist/serialization/types/MarketDetailPricingAsOfKind.js +3 -0
  40. package/dist/serialization/types/MarketDetailPricingAvailability.d.ts +1 -1
  41. package/dist/serialization/types/MarketDetailPricingAvailability.js +1 -1
  42. package/dist/serialization/types/MarketsListResponse.d.ts +2 -0
  43. package/dist/serialization/types/MarketsListResponse.js +2 -0
  44. package/dist/serialization/types/MarketsSnapshot.d.ts +9 -0
  45. package/dist/serialization/types/MarketsSnapshot.js +5 -0
  46. package/dist/serialization/types/index.d.ts +4 -0
  47. package/dist/serialization/types/index.js +4 -0
  48. package/package.json +1 -1
package/dist/Client.d.ts CHANGED
@@ -25,7 +25,7 @@ export declare class PredictorSDKClient {
25
25
  getPlans(requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.PlansResponse>;
26
26
  private __getPlans;
27
27
  /**
28
- * Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, and MLB; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
28
+ * Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, MLB, and NFL; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`) — games whose date has passed are excluded unless you ask for them with `include_settled=true`. Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
29
29
  *
30
30
  * @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
31
31
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -48,6 +48,10 @@ export declare class PredictorSDKClient {
48
48
  /**
49
49
  * Returns a paginated list of unified markets from all supported prediction market providers. Uses cursor-based pagination with default `limit=25`, max `100`.
50
50
  *
51
+ * Providers are walked in a fixed sequence, so without a filter the first pages are all Kalshi. Narrow the traversal with `provider` and/or `category`; both are membership filters on the same immutable catalog snapshot, both compose, and `pagination.total` always counts the filtered set rather than the whole catalog.
52
+ *
53
+ * This endpoint reads a stored snapshot rather than calling the venues, so the rows are as old as the last ingestion crawl, not as old as the request. `snapshot.observed_at` reports that age and is stable across a cursor traversal.
54
+ *
51
55
  * @param {PredictorSDK.GetMarketsRequest} request
52
56
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
53
57
  *
@@ -86,11 +90,19 @@ export declare class PredictorSDKClient {
86
90
  getCategories(requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.CategoriesResponse>;
87
91
  private __getCategories;
88
92
  /**
89
- * Returns a single market across the six supported platforms (Kalshi, Polymarket, Predict, SX Bet, Hyperliquid, AlphaArcade). The `market_id` is either the composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `kalshi:KXNBA-26-SAS`) or the platform-native identifier. Composite IDs dispatch unambiguously by prefix. Native IDs are routed by format inference: Kalshi tickers match the all-caps-with-hyphens shape (`KX…-…`); SX Bet hashes match `0x` + 64 hex characters; numeric ids and kebab-case slugs are shared shape between Polymarket and Predict and probe Polymarket first, falling back to Predict on 404. Hyperliquid integer outcome ids collide with Polymarket/Predict numeric ids and are deliberately not inferred — route them via the composite form (`hyperliquid:<id>`) or `?platform=hyperliquid` (alias `hl`). AlphaArcade market ids are ULIDs (26-char Crockford base32, e.g. `01KQV5TQ9CE20WPEVJZX2ETNQD`); like Hyperliquid they are not inferred in v1 — route them via the composite form (`alpha-arcade:<ulid>`) or `?platform=alpha-arcade` (alias `aa`). Pass `?platform=` explicitly to skip the probe.
93
+ * Returns a single market across the six supported platforms (Kalshi, Polymarket, Predict, SX Bet, Hyperliquid, AlphaArcade). The `market_id` is either the composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `kalshi:KXNBA-27-SAS`) or the platform-native identifier. Composite IDs dispatch unambiguously by prefix. Native IDs are routed by format inference: Kalshi tickers match the all-caps-with-hyphens shape (`KX…-…`); SX Bet hashes match `0x` + 64 hex characters.
94
+ *
95
+ * **A bare numeric id or kebab-case slug does not name its platform.** Polymarket and Predict share both shapes, so when `?platform=` is omitted the service probes every candidate and answers only if exactly one of them holds that identifier. If two do, the identifier names two different real markets and the request fails with `409` listing both — it does not pick one. Retry with `?platform=` or the composite form. Hyperliquid integer outcome ids collide with Polymarket/Predict numeric ids and are deliberately not inferred — route them via the composite form (`hyperliquid:<id>`) or `?platform=hyperliquid` (alias `hl`). AlphaArcade market ids are ULIDs (26-char Crockford base32, e.g. `01K0HQE3CEM2T2RDRWSCJ3V647`); like Hyperliquid they are not inferred in v1 — route them via the composite form (`alpha-arcade:<ulid>`) or `?platform=alpha-arcade` (alias `aa`).
96
+ *
97
+ * **If you already know the platform, always say so.** Every listing that hands you an identifier also hands you its platform, so the composite form — which `GET /v1/markets` returns natively in `data[].id` — or `?platform={row.platform}` costs nothing, skips the probe, and cannot 409. It is also strictly more available: the probe has to reach both candidates to prove there is no collision, so it fails when either is having an outage, while a named platform only depends on that one.
90
98
  *
91
99
  * Identity fields (id/provider/provider_id/title/status/ outcomes[].name) are strict-universal: every platform's single-market endpoint exposes them natively without a second fetch. close timestamps and parent event ids remain omitted (not nullable) — Predict's close time lives on the parent category and Polymarket's market record carries no event id.
92
100
  *
93
- * The pricing tier adds per-outcome quotes (`price`/`bid`/`ask`/ `last` as 0–1 probability numbers price IS the implied probability), a `pricing` envelope (`availability`/`scale`/ `source`/`as_of`/`neg_risk`), and market-level aggregates (`liquidity_usd`, `volume_24h_usd`, `volume_total_usd`, plus Kalshi contract-count mirrors and `open_interest`). Kalshi/ Polymarket/Predict quotes come from the same record the identity fetch returns (`pricing.source=market_record`). SX Bet, Hyperliquid, and AlphaArcade carry no pricing on the market record, so the server makes one bounded second fetch to the order book (`pricing.source=orderbook`) SX Bet's best-odds endpoint, Hyperliquid's merged `l2Book`, or AlphaArcade's `get-full-orderbook` (a 4-sided YES/NO book; the second side's quotes are derived from the first by the cross-side complement, and the catalog midpoint serves as the price mark when the book is empty). On a book error the lookup still succeeds with identity intact and `pricing.availability` reflecting the marks. On timeout/error it degrades to `pricing.availability=unavailable` with identity intact pricing failures never fail the lookup. Aggregates a platform doesn't natively expose are explicit `null` (e.g. Kalshi reports volume in contracts, so `volume_*_usd` stays null rather than fabricating a USD figure; its upstream `liquidity_dollars` field is deprecated and always zero, so `liquidity_usd` is null too).
101
+ * **What the pricing tier is for, and what it is not.** It reports the top of each venue's book, once, at the moment of your request. That is enough to see where a market is quoted, to compare venues, and to decide where to go and look harder. It is NOT an execution feed: there is no depth beyond the best level, no streaming, no per-outcome book on the platforms that publish only a market-wide mark, and nothing here is reserved for you by the time you act, the level may be gone. Two limits are worth knowing before you write a strategy against it. First, `price` is a derived display number and a non-null `price` does not imply a tradeable one; read `pricing.availability` and prefer `bid`/`ask` for anything you intend to act on. Second, quote freshness is a property of the venue, not of this API see *Bounding quote freshness* below. Route the actual order through the venue's own book.
102
+ *
103
+ * The pricing tier adds per-outcome quotes (`price`/`bid`/`ask`/ `last` as 0–1 probability numbers — price IS the implied probability), a `pricing` envelope (`availability`/`scale`/ `source`/`as_of`/`as_of_kind`/`observed_at`/`neg_risk`), and market-level aggregates (`liquidity_usd`, `volume_24h_usd`, `volume_total_usd`, plus Kalshi contract-count mirrors and `open_interest`). Kalshi/ Polymarket/Predict quotes come from the same record the identity fetch returns (`pricing.source=market_record`). SX Bet, Hyperliquid, and AlphaArcade carry no pricing on the market record, so the server makes one bounded second fetch to the order book (`pricing.source=orderbook`) — SX Bet's best-odds endpoint, Hyperliquid's merged `l2Book`, or AlphaArcade's `get-full-orderbook` (a 4-sided YES/NO book; the second side's quotes are derived from the first by the cross-side complement, and the catalog midpoint serves as the price mark when the book is empty — reported as `pricing.availability=indicative`, since a mark that outlives its book is not a quote). On a book error the lookup still succeeds with identity intact and `pricing.availability` reflecting the marks. On timeout/error it degrades to `pricing.availability=unavailable` with identity intact — pricing failures never fail the lookup. Predict publishes a per-market `spreadThreshold` — the widest bid/ask spread it counts as liquidity — and this route honours it, so a Predict book outside its own market's threshold reports `indicative` rather than lending its midpoint the authority of `live`. Aggregates a platform doesn't natively expose are explicit `null` (e.g. Kalshi reports volume in contracts, so `volume_*_usd` stays null rather than fabricating a USD figure; its upstream `liquidity_dollars` field is deprecated and always zero, so `liquidity_usd` is null too).
104
+ *
105
+ * **Bounding quote freshness.** `pricing.as_of` is the provider's own timestamp and does not mean the same thing on every platform — on Hyperliquid it moves with the order book, while on Kalshi it is a record write measured anywhere from 15 hours to 137 days old on markets reporting `status: open` with a live two-sided book. `pricing.as_of_kind` names which one you received (`quote` / `record_refresh` / `record_static` / `unknown`), so read it before applying an age bound to `as_of`; only `quote` tracks the quote closely enough to bound at all. `pricing.observed_at` is when this server read the quotes, means the same thing on every provider, and is therefore the field to bound when you need one threshold that behaves identically across platforms. It bounds the age of the read, not of the quote: this route reads the venue live per request and caches nothing, so on a `record_static` provider a fresh `observed_at` beside a day-old `as_of` is the honest description of what the venue served, and the executable price should come from that venue's own book.
94
106
  *
95
107
  * The `trading_fees` tier reports what the VENUE charges to trade this market — its own published fee parameters, normalized to one shape across all six platforms, so cross-venue cost comparison stops requiring six private formulas. Nothing here relates to PredictorSDK's subscription pricing. It is always present, and `trading_fees.availability` distinguishes published parameters from per-account rates that need your own venue credentials (SX Bet, Hyperliquid), from a venue that publishes nothing, and from a fee of genuinely zero. Only Kalshi costs extra upstream hops for it (its parameters live on the parent series plus any scheduled per-event override, all TTL-cached and bounded); those degrade to `availability: "unavailable"` rather than failing the lookup, exactly like the pricing tier. See the `MarketDetailTradingFees` schema for the formulas and for what is deliberately out of scope.
96
108
  *
@@ -102,6 +114,7 @@ export declare class PredictorSDKClient {
102
114
  * @throws {@link PredictorSDK.PaymentRequiredError}
103
115
  * @throws {@link PredictorSDK.ForbiddenError}
104
116
  * @throws {@link PredictorSDK.NotFoundError}
117
+ * @throws {@link PredictorSDK.ConflictError}
105
118
  * @throws {@link PredictorSDK.TooManyRequestsError}
106
119
  * @throws {@link PredictorSDK.BadGatewayError}
107
120
  * @throws {@link PredictorSDK.ServiceUnavailableError}
@@ -110,7 +123,7 @@ export declare class PredictorSDKClient {
110
123
  *
111
124
  * @example
112
125
  * await client.getMarket({
113
- * marketId: "kalshi:KXNBA-26-SAS"
126
+ * marketId: "kalshi:KXNBA-27-SAS"
114
127
  * })
115
128
  */
116
129
  getMarket(request: PredictorSDK.GetMarketRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.MarketDetailResponse>;
@@ -197,11 +210,15 @@ export declare class PredictorSDKClient {
197
210
  listPolymarketWalletPositions(request?: PredictorSDK.ListPolymarketWalletPositionsRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.PolymarketPositionsResponse>;
198
211
  private __listPolymarketWalletPositions;
199
212
  /**
200
- * Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, a Predict market identifier, a Hyperliquid question/outcome integer id, or an AlphaArcade market ULID. The `platform` is inferred from the ID format when unambiguous (`KX…` → Kalshi, `L\d+` → SX Bet). Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; if `?platform=` is omitted in that case, the service probes Polymarket first and falls back to Predict when Polymarket returns 404. Hyperliquid integer ids also collide with those numeric ids and require `?platform=hyperliquid` (alias `hl`). AlphaArcade ULIDs are not inferred in v1 either — require `?platform=alpha-arcade` (alias `aa`). An AlphaArcade multi-choice market resolves to an event whose nested markets are its options; a binary market (or a single option id) resolves to a single-market event. Pass `?platform=` explicitly to skip the probe.
213
+ * Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, a Predict market identifier, a Hyperliquid question/outcome integer id, or an AlphaArcade market ULID. The `platform` is inferred from the ID format when unambiguous (`KX…` → Kalshi, `L\d+` → SX Bet). The composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `predict:1607914`) also dispatches unambiguously by prefix.
214
+ *
215
+ * **A bare numeric id or kebab-case slug does not name its platform.** Polymarket and Predict share both shapes, so when `?platform=` is omitted the service probes every candidate and answers only if exactly one of them holds that identifier. If two do, the identifier names two different real events and the request fails with `409` listing both — it does not pick one. Retry with `?platform=` or the composite form. Hyperliquid integer ids also collide with those numerics and require `?platform=hyperliquid` (alias `hl`). AlphaArcade ULIDs are not inferred in v1 either — require `?platform=alpha-arcade` (alias `aa`). An AlphaArcade multi-choice market resolves to an event whose nested markets are its options; a binary market (or a single option id) resolves to a single-market event.
216
+ *
217
+ * **If you already know the platform, always say so.** Every listing that hands you an identifier also hands you its platform, so `?platform={row.platform}` (or the composite form) costs nothing, skips the probe, and cannot 409. It is also strictly more available: the probe has to reach both candidates to prove there is no collision, so it fails when either is having an outage, while a named platform only depends on that one.
201
218
  *
202
219
  * Response is minimal in v0: each market is returned with its platform-native `market_id` and a human-readable `title`. Pricing, volume, status, and timestamps are intentionally deferred — they'll be added as additive fields to `EventMarket` in a later release. The endpoint mirrors the `/v1/markets` rollout pattern (titles first, fields later).
203
220
  *
204
- * **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26MAY221840CLEPHI` holds the moneyline, `KXMLBF5TOTAL-26MAY221840CLEPHI` holds the totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
221
+ * **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26AUG272145AZSF` holds the moneyline, `KXMLBF5TOTAL-26AUG272145AZSF` holds the first-five-innings totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
205
222
  *
206
223
  * **Polymarket** events already nest the moneyline plus all spread/totals/game-level prop markets under a single event slug, so no fanout is performed. **SX Bet** fixtures similarly bundle game lines per `eventId`. **Predict** currently treats `event_id` as a market identifier and wraps the single market as a 1-element event response, since the upstream `event` concept on Predict is closer to a category than to a multi-market container. **Hyperliquid** maps a question id to its named outcome markets, or wraps a standalone outcome id as a single-market event.
207
224
  *
@@ -213,6 +230,7 @@ export declare class PredictorSDKClient {
213
230
  * @throws {@link PredictorSDK.PaymentRequiredError}
214
231
  * @throws {@link PredictorSDK.ForbiddenError}
215
232
  * @throws {@link PredictorSDK.NotFoundError}
233
+ * @throws {@link PredictorSDK.ConflictError}
216
234
  * @throws {@link PredictorSDK.TooManyRequestsError}
217
235
  * @throws {@link PredictorSDK.BadGatewayError}
218
236
  * @throws {@link PredictorSDK.ServiceUnavailableError}
@@ -221,7 +239,7 @@ export declare class PredictorSDKClient {
221
239
  *
222
240
  * @example
223
241
  * await client.getEvent({
224
- * eventId: "KXMLBGAME-26MAY221840CLEPHI"
242
+ * eventId: "KXNBAGAME-26OCT20OKCSAS"
225
243
  * })
226
244
  */
227
245
  getEvent(request: PredictorSDK.GetEventRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.EventResponse>;
package/dist/Client.js CHANGED
@@ -75,7 +75,7 @@ export class PredictorSDKClient {
75
75
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/plans");
76
76
  }
77
77
  /**
78
- * Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, and MLB; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
78
+ * Find cross-platform market matches for sports events. Coverage is NBA, WNBA, NHL, MLB, and NFL; `canonical_events[].league` names the league and is the first segment of the canonical `event_id`. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`) — games whose date has passed are excluded unless you ask for them with `include_settled=true`. Provide a canonical event key, Kalshi event ticker, Polymarket slug, Predict market ID, or SX Bet market ID to look up a specific event — lookups return the full match immediately and skip pagination. Every platform row includes its provider-native `event_id` for use with `GET /v1/events/{event_id}`; pass that row's `platform` value as the events endpoint's `platform` query parameter, which is required to disambiguate Predict and AlphaArcade identifiers.
79
79
  *
80
80
  * @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
81
81
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -211,6 +211,10 @@ export class PredictorSDKClient {
211
211
  /**
212
212
  * Returns a paginated list of unified markets from all supported prediction market providers. Uses cursor-based pagination with default `limit=25`, max `100`.
213
213
  *
214
+ * Providers are walked in a fixed sequence, so without a filter the first pages are all Kalshi. Narrow the traversal with `provider` and/or `category`; both are membership filters on the same immutable catalog snapshot, both compose, and `pagination.total` always counts the filtered set rather than the whole catalog.
215
+ *
216
+ * This endpoint reads a stored snapshot rather than calling the venues, so the rows are as old as the last ingestion crawl, not as old as the request. `snapshot.observed_at` reports that age and is stable across a cursor traversal.
217
+ *
214
218
  * @param {PredictorSDK.GetMarketsRequest} request
215
219
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
216
220
  *
@@ -231,7 +235,7 @@ export class PredictorSDKClient {
231
235
  return core.HttpResponsePromise.fromPromise(this.__getMarkets(request, requestOptions));
232
236
  }
233
237
  async __getMarkets(request = {}, requestOptions) {
234
- const { limit, cursor, category } = request;
238
+ const { limit, cursor, category, provider } = request;
235
239
  const _queryParams = {
236
240
  limit,
237
241
  cursor,
@@ -241,6 +245,12 @@ export class PredictorSDKClient {
241
245
  omitUndefined: true,
242
246
  })
243
247
  : undefined,
248
+ provider: provider != null
249
+ ? serializers.GetMarketsRequestProvider.jsonOrThrow(provider, {
250
+ unrecognizedObjectKeys: "strip",
251
+ omitUndefined: true,
252
+ })
253
+ : undefined,
244
254
  };
245
255
  const _authRequest = await this._options.authProvider.getAuthRequest();
246
256
  const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
@@ -450,11 +460,19 @@ export class PredictorSDKClient {
450
460
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/categories");
451
461
  }
452
462
  /**
453
- * Returns a single market across the six supported platforms (Kalshi, Polymarket, Predict, SX Bet, Hyperliquid, AlphaArcade). The `market_id` is either the composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `kalshi:KXNBA-26-SAS`) or the platform-native identifier. Composite IDs dispatch unambiguously by prefix. Native IDs are routed by format inference: Kalshi tickers match the all-caps-with-hyphens shape (`KX…-…`); SX Bet hashes match `0x` + 64 hex characters; numeric ids and kebab-case slugs are shared shape between Polymarket and Predict and probe Polymarket first, falling back to Predict on 404. Hyperliquid integer outcome ids collide with Polymarket/Predict numeric ids and are deliberately not inferred — route them via the composite form (`hyperliquid:<id>`) or `?platform=hyperliquid` (alias `hl`). AlphaArcade market ids are ULIDs (26-char Crockford base32, e.g. `01KQV5TQ9CE20WPEVJZX2ETNQD`); like Hyperliquid they are not inferred in v1 — route them via the composite form (`alpha-arcade:<ulid>`) or `?platform=alpha-arcade` (alias `aa`). Pass `?platform=` explicitly to skip the probe.
463
+ * Returns a single market across the six supported platforms (Kalshi, Polymarket, Predict, SX Bet, Hyperliquid, AlphaArcade). The `market_id` is either the composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `kalshi:KXNBA-27-SAS`) or the platform-native identifier. Composite IDs dispatch unambiguously by prefix. Native IDs are routed by format inference: Kalshi tickers match the all-caps-with-hyphens shape (`KX…-…`); SX Bet hashes match `0x` + 64 hex characters.
464
+ *
465
+ * **A bare numeric id or kebab-case slug does not name its platform.** Polymarket and Predict share both shapes, so when `?platform=` is omitted the service probes every candidate and answers only if exactly one of them holds that identifier. If two do, the identifier names two different real markets and the request fails with `409` listing both — it does not pick one. Retry with `?platform=` or the composite form. Hyperliquid integer outcome ids collide with Polymarket/Predict numeric ids and are deliberately not inferred — route them via the composite form (`hyperliquid:<id>`) or `?platform=hyperliquid` (alias `hl`). AlphaArcade market ids are ULIDs (26-char Crockford base32, e.g. `01K0HQE3CEM2T2RDRWSCJ3V647`); like Hyperliquid they are not inferred in v1 — route them via the composite form (`alpha-arcade:<ulid>`) or `?platform=alpha-arcade` (alias `aa`).
466
+ *
467
+ * **If you already know the platform, always say so.** Every listing that hands you an identifier also hands you its platform, so the composite form — which `GET /v1/markets` returns natively in `data[].id` — or `?platform={row.platform}` costs nothing, skips the probe, and cannot 409. It is also strictly more available: the probe has to reach both candidates to prove there is no collision, so it fails when either is having an outage, while a named platform only depends on that one.
454
468
  *
455
469
  * Identity fields (id/provider/provider_id/title/status/ outcomes[].name) are strict-universal: every platform's single-market endpoint exposes them natively without a second fetch. close timestamps and parent event ids remain omitted (not nullable) — Predict's close time lives on the parent category and Polymarket's market record carries no event id.
456
470
  *
457
- * The pricing tier adds per-outcome quotes (`price`/`bid`/`ask`/ `last` as 0–1 probability numbers price IS the implied probability), a `pricing` envelope (`availability`/`scale`/ `source`/`as_of`/`neg_risk`), and market-level aggregates (`liquidity_usd`, `volume_24h_usd`, `volume_total_usd`, plus Kalshi contract-count mirrors and `open_interest`). Kalshi/ Polymarket/Predict quotes come from the same record the identity fetch returns (`pricing.source=market_record`). SX Bet, Hyperliquid, and AlphaArcade carry no pricing on the market record, so the server makes one bounded second fetch to the order book (`pricing.source=orderbook`) SX Bet's best-odds endpoint, Hyperliquid's merged `l2Book`, or AlphaArcade's `get-full-orderbook` (a 4-sided YES/NO book; the second side's quotes are derived from the first by the cross-side complement, and the catalog midpoint serves as the price mark when the book is empty). On a book error the lookup still succeeds with identity intact and `pricing.availability` reflecting the marks. On timeout/error it degrades to `pricing.availability=unavailable` with identity intact pricing failures never fail the lookup. Aggregates a platform doesn't natively expose are explicit `null` (e.g. Kalshi reports volume in contracts, so `volume_*_usd` stays null rather than fabricating a USD figure; its upstream `liquidity_dollars` field is deprecated and always zero, so `liquidity_usd` is null too).
471
+ * **What the pricing tier is for, and what it is not.** It reports the top of each venue's book, once, at the moment of your request. That is enough to see where a market is quoted, to compare venues, and to decide where to go and look harder. It is NOT an execution feed: there is no depth beyond the best level, no streaming, no per-outcome book on the platforms that publish only a market-wide mark, and nothing here is reserved for you by the time you act, the level may be gone. Two limits are worth knowing before you write a strategy against it. First, `price` is a derived display number and a non-null `price` does not imply a tradeable one; read `pricing.availability` and prefer `bid`/`ask` for anything you intend to act on. Second, quote freshness is a property of the venue, not of this API see *Bounding quote freshness* below. Route the actual order through the venue's own book.
472
+ *
473
+ * The pricing tier adds per-outcome quotes (`price`/`bid`/`ask`/ `last` as 0–1 probability numbers — price IS the implied probability), a `pricing` envelope (`availability`/`scale`/ `source`/`as_of`/`as_of_kind`/`observed_at`/`neg_risk`), and market-level aggregates (`liquidity_usd`, `volume_24h_usd`, `volume_total_usd`, plus Kalshi contract-count mirrors and `open_interest`). Kalshi/ Polymarket/Predict quotes come from the same record the identity fetch returns (`pricing.source=market_record`). SX Bet, Hyperliquid, and AlphaArcade carry no pricing on the market record, so the server makes one bounded second fetch to the order book (`pricing.source=orderbook`) — SX Bet's best-odds endpoint, Hyperliquid's merged `l2Book`, or AlphaArcade's `get-full-orderbook` (a 4-sided YES/NO book; the second side's quotes are derived from the first by the cross-side complement, and the catalog midpoint serves as the price mark when the book is empty — reported as `pricing.availability=indicative`, since a mark that outlives its book is not a quote). On a book error the lookup still succeeds with identity intact and `pricing.availability` reflecting the marks. On timeout/error it degrades to `pricing.availability=unavailable` with identity intact — pricing failures never fail the lookup. Predict publishes a per-market `spreadThreshold` — the widest bid/ask spread it counts as liquidity — and this route honours it, so a Predict book outside its own market's threshold reports `indicative` rather than lending its midpoint the authority of `live`. Aggregates a platform doesn't natively expose are explicit `null` (e.g. Kalshi reports volume in contracts, so `volume_*_usd` stays null rather than fabricating a USD figure; its upstream `liquidity_dollars` field is deprecated and always zero, so `liquidity_usd` is null too).
474
+ *
475
+ * **Bounding quote freshness.** `pricing.as_of` is the provider's own timestamp and does not mean the same thing on every platform — on Hyperliquid it moves with the order book, while on Kalshi it is a record write measured anywhere from 15 hours to 137 days old on markets reporting `status: open` with a live two-sided book. `pricing.as_of_kind` names which one you received (`quote` / `record_refresh` / `record_static` / `unknown`), so read it before applying an age bound to `as_of`; only `quote` tracks the quote closely enough to bound at all. `pricing.observed_at` is when this server read the quotes, means the same thing on every provider, and is therefore the field to bound when you need one threshold that behaves identically across platforms. It bounds the age of the read, not of the quote: this route reads the venue live per request and caches nothing, so on a `record_static` provider a fresh `observed_at` beside a day-old `as_of` is the honest description of what the venue served, and the executable price should come from that venue's own book.
458
476
  *
459
477
  * The `trading_fees` tier reports what the VENUE charges to trade this market — its own published fee parameters, normalized to one shape across all six platforms, so cross-venue cost comparison stops requiring six private formulas. Nothing here relates to PredictorSDK's subscription pricing. It is always present, and `trading_fees.availability` distinguishes published parameters from per-account rates that need your own venue credentials (SX Bet, Hyperliquid), from a venue that publishes nothing, and from a fee of genuinely zero. Only Kalshi costs extra upstream hops for it (its parameters live on the parent series plus any scheduled per-event override, all TTL-cached and bounded); those degrade to `availability: "unavailable"` rather than failing the lookup, exactly like the pricing tier. See the `MarketDetailTradingFees` schema for the formulas and for what is deliberately out of scope.
460
478
  *
@@ -466,6 +484,7 @@ export class PredictorSDKClient {
466
484
  * @throws {@link PredictorSDK.PaymentRequiredError}
467
485
  * @throws {@link PredictorSDK.ForbiddenError}
468
486
  * @throws {@link PredictorSDK.NotFoundError}
487
+ * @throws {@link PredictorSDK.ConflictError}
469
488
  * @throws {@link PredictorSDK.TooManyRequestsError}
470
489
  * @throws {@link PredictorSDK.BadGatewayError}
471
490
  * @throws {@link PredictorSDK.ServiceUnavailableError}
@@ -474,7 +493,7 @@ export class PredictorSDKClient {
474
493
  *
475
494
  * @example
476
495
  * await client.getMarket({
477
- * marketId: "kalshi:KXNBA-26-SAS"
496
+ * marketId: "kalshi:KXNBA-27-SAS"
478
497
  * })
479
498
  */
480
499
  getMarket(request, requestOptions) {
@@ -563,6 +582,14 @@ export class PredictorSDKClient {
563
582
  skipValidation: true,
564
583
  breadcrumbsPrefix: ["response"],
565
584
  }), _response.rawResponse);
585
+ case 409:
586
+ throw new PredictorSDK.ConflictError(serializers.AmbiguousIdentifierError.parseOrThrow(_response.error.body, {
587
+ unrecognizedObjectKeys: "passthrough",
588
+ allowUnrecognizedUnionMembers: true,
589
+ allowUnrecognizedEnumValues: true,
590
+ skipValidation: true,
591
+ breadcrumbsPrefix: ["response"],
592
+ }), _response.rawResponse);
566
593
  case 429:
567
594
  throw new PredictorSDK.TooManyRequestsError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
568
595
  unrecognizedObjectKeys: "passthrough",
@@ -1018,11 +1045,15 @@ export class PredictorSDKClient {
1018
1045
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/polymarket/wallet/positions");
1019
1046
  }
1020
1047
  /**
1021
- * Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, a Predict market identifier, a Hyperliquid question/outcome integer id, or an AlphaArcade market ULID. The `platform` is inferred from the ID format when unambiguous (`KX…` → Kalshi, `L\d+` → SX Bet). Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; if `?platform=` is omitted in that case, the service probes Polymarket first and falls back to Predict when Polymarket returns 404. Hyperliquid integer ids also collide with those numeric ids and require `?platform=hyperliquid` (alias `hl`). AlphaArcade ULIDs are not inferred in v1 either — require `?platform=alpha-arcade` (alias `aa`). An AlphaArcade multi-choice market resolves to an event whose nested markets are its options; a binary market (or a single option id) resolves to a single-market event. Pass `?platform=` explicitly to skip the probe.
1048
+ * Returns a single event and the markets nested under it on the identified platform. The `event_id` is the platform's native identifier — a Kalshi `event_ticker`, a Polymarket event slug, an SX Bet `eventId`, a Predict market identifier, a Hyperliquid question/outcome integer id, or an AlphaArcade market ULID. The `platform` is inferred from the ID format when unambiguous (`KX…` → Kalshi, `L\d+` → SX Bet). The composite form returned by `GET /v1/markets` (`{provider}:{native_id}`, e.g. `predict:1607914`) also dispatches unambiguously by prefix.
1049
+ *
1050
+ * **A bare numeric id or kebab-case slug does not name its platform.** Polymarket and Predict share both shapes, so when `?platform=` is omitted the service probes every candidate and answers only if exactly one of them holds that identifier. If two do, the identifier names two different real events and the request fails with `409` listing both — it does not pick one. Retry with `?platform=` or the composite form. Hyperliquid integer ids also collide with those numerics and require `?platform=hyperliquid` (alias `hl`). AlphaArcade ULIDs are not inferred in v1 either — require `?platform=alpha-arcade` (alias `aa`). An AlphaArcade multi-choice market resolves to an event whose nested markets are its options; a binary market (or a single option id) resolves to a single-market event.
1051
+ *
1052
+ * **If you already know the platform, always say so.** Every listing that hands you an identifier also hands you its platform, so `?platform={row.platform}` (or the composite form) costs nothing, skips the probe, and cannot 409. It is also strictly more available: the probe has to reach both candidates to prove there is no collision, so it fails when either is having an outage, while a named platform only depends on that one.
1022
1053
  *
1023
1054
  * Response is minimal in v0: each market is returned with its platform-native `market_id` and a human-readable `title`. Pricing, volume, status, and timestamps are intentionally deferred — they'll be added as additive fields to `EventMarket` in a later release. The endpoint mirrors the `/v1/markets` rollout pattern (titles first, fields later).
1024
1055
  *
1025
- * **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26MAY221840CLEPHI` holds the moneyline, `KXMLBF5TOTAL-26MAY221840CLEPHI` holds the totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
1056
+ * **Kalshi sibling fanout.** A single Kalshi sports game lives across multiple event tickers that share a game suffix — e.g. `KXMLBGAME-26AUG272145AZSF` holds the moneyline, `KXMLBF5TOTAL-26AUG272145AZSF` holds the first-five-innings totals, and so on. When the supplied event_ticker belongs to a sport in the sibling registry (MLB, NBA, NFL, NHL, WNBA today), this endpoint fans out across known sibling series in parallel and merges their markets into one response. Siblings that don't exist for a particular game silently drop. Siblings that error are reported under `fanout.siblings_missing`; the primary event still returns 200 in that case. Only the primary fetch failing produces a 4xx/5xx — partial fanouts never fail the request.
1026
1057
  *
1027
1058
  * **Polymarket** events already nest the moneyline plus all spread/totals/game-level prop markets under a single event slug, so no fanout is performed. **SX Bet** fixtures similarly bundle game lines per `eventId`. **Predict** currently treats `event_id` as a market identifier and wraps the single market as a 1-element event response, since the upstream `event` concept on Predict is closer to a category than to a multi-market container. **Hyperliquid** maps a question id to its named outcome markets, or wraps a standalone outcome id as a single-market event.
1028
1059
  *
@@ -1034,6 +1065,7 @@ export class PredictorSDKClient {
1034
1065
  * @throws {@link PredictorSDK.PaymentRequiredError}
1035
1066
  * @throws {@link PredictorSDK.ForbiddenError}
1036
1067
  * @throws {@link PredictorSDK.NotFoundError}
1068
+ * @throws {@link PredictorSDK.ConflictError}
1037
1069
  * @throws {@link PredictorSDK.TooManyRequestsError}
1038
1070
  * @throws {@link PredictorSDK.BadGatewayError}
1039
1071
  * @throws {@link PredictorSDK.ServiceUnavailableError}
@@ -1042,7 +1074,7 @@ export class PredictorSDKClient {
1042
1074
  *
1043
1075
  * @example
1044
1076
  * await client.getEvent({
1045
- * eventId: "KXMLBGAME-26MAY221840CLEPHI"
1077
+ * eventId: "KXNBAGAME-26OCT20OKCSAS"
1046
1078
  * })
1047
1079
  */
1048
1080
  getEvent(request, requestOptions) {
@@ -1131,6 +1163,14 @@ export class PredictorSDKClient {
1131
1163
  skipValidation: true,
1132
1164
  breadcrumbsPrefix: ["response"],
1133
1165
  }), _response.rawResponse);
1166
+ case 409:
1167
+ throw new PredictorSDK.ConflictError(serializers.AmbiguousIdentifierError.parseOrThrow(_response.error.body, {
1168
+ unrecognizedObjectKeys: "passthrough",
1169
+ allowUnrecognizedUnionMembers: true,
1170
+ allowUnrecognizedEnumValues: true,
1171
+ skipValidation: true,
1172
+ breadcrumbsPrefix: ["response"],
1173
+ }), _response.rawResponse);
1134
1174
  case 429:
1135
1175
  throw new PredictorSDK.TooManyRequestsError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
1136
1176
  unrecognizedObjectKeys: "passthrough",
@@ -2,12 +2,18 @@ import type * as PredictorSDK from "../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * eventId: "KXMLBGAME-26MAY221840CLEPHI"
5
+ * eventId: "KXNBAGAME-26OCT20OKCSAS"
6
6
  * }
7
7
  */
8
8
  export interface GetEventRequest {
9
- /** Platform-native event identifier. Examples per platform: Kalshi event ticker (`KXMLBGAME-26MAY221840CLEPHI`), Polymarket event slug (`mlb-cle-phi-2026-05-22`), SX Bet event id (`L10073358`), Predict market id (`110629`), Hyperliquid question or outcome integer id (`19` or `172`; requires `?platform=hyperliquid` since integer ids aren't inferred). */
9
+ /**
10
+ * Platform-native event identifier. Examples per platform: Kalshi event ticker (`KXNBAGAME-26OCT20OKCSAS`), Polymarket event slug (`mlb-tor-cle-2026-09-02`), SX Bet event id (`L19766755`), Predict market id (`1607914`), Hyperliquid question or outcome integer id (requires `?platform=hyperliquid` since integer ids aren't inferred). The composite `{provider}:{native_id}` form (e.g. `predict:1607914`) is accepted here too and dispatches without probing.
11
+ *
12
+ * **A bare numeric id or slug is not unique across platforms.** Polymarket and Predict both use these shapes and their id spaces overlap, so sending one without a platform can fail with `409` (see that response). Pass `?platform=` — every row of `GET /v1/matching-markets/sports` carries the `platform` that goes with its `event_id`.
13
+ *
14
+ * **Sports identifiers expire.** Game tickers and slugs are delisted once an event settles, and Hyperliquid ids roll over daily. Take current ones from `GET /v1/matching-markets/sports` (every platform row carries its provider-native `event_id`) rather than copying one out of this reference.
15
+ */
10
16
  eventId: string;
11
- /** Optional platform override. When omitted, inferred from the `event_id` format: `KX…` → Kalshi, `L\d+` → SX Bet. Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes Polymarket first and falls back to Predict on 404. Hyperliquid question/outcome integer ids collide with these numerics and are not inferred — pass `?platform=hyperliquid` (alias `hl`). Pass `platform` explicitly to skip the probe. */
17
+ /** Optional platform override. When omitted, inferred from the `event_id` format: `KX…` → Kalshi, `L\d+` → SX Bet. Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes both and returns `409` rather than guessing if the identifier resolves on both. Hyperliquid question/outcome integer ids collide with these numerics and are not inferred — pass `?platform=hyperliquid` (alias `hl`). Passing `platform` explicitly skips the probe entirely and is the recommended call whenever you know it. Supplying a value that contradicts a composite `{provider}:` prefix is a `400`. */
12
18
  platform?: PredictorSDK.GetEventRequestPlatform;
13
19
  }
@@ -2,12 +2,18 @@ import type * as PredictorSDK from "../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * marketId: "kalshi:KXNBA-26-SAS"
5
+ * marketId: "kalshi:KXNBA-27-SAS"
6
6
  * }
7
7
  */
8
8
  export interface GetMarketRequest {
9
- /** Composite (`{provider}:{native_id}`) or platform-native market identifier. Examples per platform: Kalshi market ticker (`KXNBA-26-SAS`), Polymarket numeric id or slug (`540817` or `new-rhianna-album-before-gta-vi-926`), Predict market id (`356635`), SX Bet `marketHash` (`0x…64hex`), Hyperliquid outcome id (use the composite `hyperliquid:172` or `?platform=hyperliquid` — bare integer ids aren't inferred). */
9
+ /**
10
+ * Composite (`{provider}:{native_id}`) or platform-native market identifier. Examples per platform: Kalshi market ticker (`KXNBA-27-SAS`), Polymarket numeric id or slug (`540817` or `mlb-tor-cle-2026-09-02`), Predict market id (`356635`), SX Bet `marketHash` (`0x…64hex`), Hyperliquid outcome id (use the composite `hyperliquid:<outcome-id>` or `?platform=hyperliquid` — bare integer ids aren't inferred).
11
+ *
12
+ * **A bare numeric id or slug is not unique across platforms.** Polymarket and Predict both use these shapes and their id spaces overlap, so sending one without a platform can fail with `409` (see that response). Prefer the composite form — it is what `GET /v1/markets` returns in `data[].id` — or pass `?platform=`.
13
+ *
14
+ * **Sports identifiers expire.** Kalshi game tickers, Polymarket game slugs, and Hyperliquid outcome ids are recycled or delisted as events settle — Hyperliquid's live catalog is a handful of daily-recurring outcomes, so any specific integer id there is valid for roughly a day. Take current ids from `GET /v1/markets` or `GET /v1/matching-markets/sports` rather than copying one out of this reference. Long-dated markets (Kalshi season futures, multi-year AlphaArcade questions) and settled Polymarket/Predict/SX Bet ids stay resolvable.
15
+ */
10
16
  marketId: string;
11
- /** Optional platform override. When omitted, inferred from the composite prefix or from the native ID format (`KX…` → Kalshi, `0x…64hex` → SX Bet). Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes Polymarket first and falls back to Predict on 404. Hyperliquid integer ids collide with these numerics and are not inferred — use the composite `hyperliquid:<id>` or `?platform=hyperliquid` (alias `hl`). Pass `platform` explicitly to skip the probe. When the override contradicts a composite prefix (e.g. `kalshi:X` with `?platform=polymarket`), the request returns 400. */
17
+ /** Optional platform override. When omitted, inferred from the composite prefix or from the native ID format (`KX…` → Kalshi, `0x…64hex` → SX Bet). Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes both and returns `409` rather than guessing if the identifier resolves on both. Hyperliquid integer ids collide with these numerics and are not inferred — use the composite `hyperliquid:<id>` or `?platform=hyperliquid` (alias `hl`). Passing `platform` explicitly skips the probe entirely and is the recommended call whenever you know it. When the override contradicts a composite prefix (e.g. `kalshi:X` with `?platform=polymarket`), the request returns 400. */
12
18
  platform?: PredictorSDK.GetMarketRequestPlatform;
13
19
  }
@@ -10,4 +10,14 @@ export interface GetMarketsRequest {
10
10
  cursor?: string;
11
11
  /** Canonical top-level category filter. This is PredictorSDK's normalized category, not a provider-native tag. Cursors are bound to the category filter used to create them. */
12
12
  category?: PredictorSDK.MarketCategory;
13
+ /**
14
+ * Restrict the page to one provider, matched against each row's own `provider` value. Without it, providers are walked in the order below and a caller wanting a later one has to paginate through every earlier provider's rows first.
15
+ *
16
+ * Only the canonical provider IDs are accepted, case-insensitively. Any other value returns `400` listing the legal ones — an unrecognized filter is never ignored, because a silently dropped filter returns a full unfiltered page that looks filtered.
17
+ *
18
+ * `pagination.total` counts only the selected provider's rows, and cursors are bound to the filter that created them: replay a `next_cursor` with the same `provider` value, or start again from the first page.
19
+ *
20
+ * This is a catalog membership filter, and it is spelled `provider` because that is the field it selects on. It is unrelated to the `platform` override on `GET /v1/markets/{market_id}` and `GET /v1/events/{event_id}`, which names the venue an identifier should be resolved against rather than filtering a list.
21
+ */
22
+ provider?: PredictorSDK.GetMarketsRequestProvider;
13
23
  }
@@ -7,18 +7,24 @@ export interface GetSportsMatchingMarketsRequest {
7
7
  limit?: number;
8
8
  /** Opaque cursor from a previous response's `pagination.nextCursor` in the SDKs (raw JSON: `pagination.next_cursor`). Must be used with the same filter set — a cursor from `include_settled=true` cannot be replayed against `include_settled=false` and will return `400`. */
9
9
  cursor?: string;
10
- /** When `true`, include settled/archived events alongside currently live matches. Defaults to `false`. */
10
+ /**
11
+ * Selects which events this request draws from, in list mode and in lookup mode alike. Defaults to `false`: only events whose scheduled start has not certainly passed — today's games, plus a one-day grace so a late start that runs past midnight Eastern is never dropped mid-play. Set it to `true` to also get events whose game date is further in the past, including ones a venue still lists as open.
12
+ *
13
+ * A venue can keep quoting a market for months after the game (a 94-day-old row was still `status: open` with a live two-sided book when this was written), so the endpoint filters on the game date it already holds — the trailing date of the canonical `event_id` — rather than on an upstream status it cannot verify. Nothing is reported as settled that the venue has not settled; these events are simply not *current*, which is what the default page is for.
14
+ *
15
+ * Because it selects the population, a lookup (`?event_id=`, `?polymarket_market_slug=`, …) for a past-dated event answers `200` with an empty `markets` object unless this is `true`.
16
+ */
11
17
  includeSettled?: boolean;
12
18
  /** When `true`, add `canonical_events` with normalized event, submarket, line, segment, outcome, and exact source market/outcome identity. This is an identity mapping only; fetch current status, quotes, and liquidity from the referenced market resources. Defaults to `false` so the compact Dome-compatible response is unchanged. */
13
19
  includeSubmarkets?: boolean;
14
- /** Canonical event key(s) to look up directly (for example, `mlb-tex-hou-2026-07-31`). Provide the parameter multiple times for multiple events, up to 100 unique keys. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
20
+ /** Canonical event key(s) to look up directly (for example, `nba-okc-sas-2026-10-20`). Provide the parameter multiple times for multiple events, up to 100 unique keys. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
15
21
  eventId?: string | string[];
16
- /** Kalshi event ticker(s) to find matching markets for (e.g. `KXNFLGAME-25AUG16ARIDEN`). Provide the parameter multiple times for multiple tickers, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
22
+ /** Kalshi event ticker(s) to find matching markets for (e.g. `KXNBAGAME-26OCT20OKCSAS`). Provide the parameter multiple times for multiple tickers, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
17
23
  kalshiEventTicker?: string | string[];
18
- /** Polymarket market slug(s) to find matching markets for (e.g. `nfl-ari-den-2025-08-16`). Provide the parameter multiple times for multiple slugs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
24
+ /** Polymarket market slug(s) to find matching markets for (e.g. `mlb-tor-cle-2026-09-02`). Provide the parameter multiple times for multiple slugs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
19
25
  polymarketMarketSlug?: string | string[];
20
- /** Predict market ID(s) to find matching markets for (e.g. `110629`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
26
+ /** Predict market ID(s) to find matching markets for (e.g. `1607914`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
21
27
  predictMarketId?: string | string[];
22
- /** SX Bet market ID(s) to find matching markets for (e.g. `0x4c000abdbf197ef32ecdf15561b1d636f1e5b02629f466678757fd83e2ec3599`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
28
+ /** SX Bet market ID(s) to find matching markets for (e.g. `0xb4d047a709aae881e5ccad9d123592967644ee1df1f17078c762b388e41b81c5`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
23
29
  sxbetMarketId?: string | string[];
24
30
  }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as PredictorSDK from "../index.js";
4
+ export declare class ConflictError extends errors.PredictorSDKError {
5
+ readonly body: PredictorSDK.AmbiguousIdentifierError;
6
+ constructor(body: PredictorSDK.AmbiguousIdentifierError, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.js";
3
+ export class ConflictError extends errors.PredictorSDKError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ConflictError",
7
+ statusCode: 409,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "ConflictError";
16
+ }
17
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./BadGatewayError.js";
2
2
  export * from "./BadRequestError.js";
3
+ export * from "./ConflictError.js";
3
4
  export * from "./ForbiddenError.js";
4
5
  export * from "./NotFoundError.js";
5
6
  export * from "./PaymentRequiredError.js";
@@ -1,5 +1,6 @@
1
1
  export * from "./BadGatewayError.js";
2
2
  export * from "./BadRequestError.js";
3
+ export * from "./ConflictError.js";
3
4
  export * from "./ForbiddenError.js";
4
5
  export * from "./NotFoundError.js";
5
6
  export * from "./PaymentRequiredError.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Error body returned with HTTP 409. The identifier you sent is well-formed but not unique: it names a real resource on more than one platform, and nothing in the request says which one you meant. Polymarket and Predict share both the bare-numeric and kebab-case identifier shapes and their id spaces genuinely overlap, so this is a routine outcome rather than an edge case — measured 2026-08-25, 53 of 93 Predict market ids drawn from `GET /v1/matching-markets/sports` also resolved on Polymarket.
3
+ *
4
+ * `candidates` lists exactly the platforms the identifier resolved on, in a stable order, and every entry is a legal `?platform=` value. Retry the same identifier with `?platform={candidate}`, or with the composite `{platform}:{id}` form, and the lookup is deterministic. Clients that fan out over identifiers should handle 409 by re-issuing with the platform they already know from the listing that produced the id — every list and matching response that emits an identifier also emits its platform.
5
+ */
6
+ export interface AmbiguousIdentifierError {
7
+ /** Short machine-stable reason, e.g. `ambiguous market_id`. */
8
+ error: string;
9
+ /** Human-readable detail naming the identifier, the platforms it resolved on, and how to disambiguate. */
10
+ message?: string;
11
+ /** The platforms this identifier resolved on. Each value is accepted verbatim by the `platform` query parameter. */
12
+ candidates: string[];
13
+ statusCode: number;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,9 +2,9 @@ import type * as PredictorSDK from "../index.js";
2
2
  export interface CanonicalSportsEvent {
3
3
  /** Stable canonical event key. */
4
4
  eventId: string;
5
- /** Canonical sport slug. `basketball`, `hockey`, or `baseball` today. */
5
+ /** Canonical sport slug. `basketball`, `hockey`, `baseball`, or `football` today. */
6
6
  sport?: string;
7
- /** Canonical league slug. Cross-platform matching covers `nba`, `wnba`, `nhl`, and `mlb` today. The value is the first segment of `event_id`, so `wnba-tor-wsh-2026-08-19` is a WNBA game. Treat this as an open set — leagues are added without a breaking change. */
7
+ /** Canonical league slug. Cross-platform matching covers `nba`, `wnba`, `nhl`, `mlb`, and `nfl` today. The value is the first segment of `event_id`, so `nba-okc-sas-2026-10-20` is an NBA game. Treat this as an open set — leagues are added without a breaking change. */
8
8
  league?: string;
9
9
  title: string;
10
10
  participants?: PredictorSDK.CanonicalSportsParticipant[];
@@ -1,7 +1,11 @@
1
1
  import type * as PredictorSDK from "../index.js";
2
2
  export interface CanonicalSportsSourceMarket {
3
3
  provider: PredictorSDK.CanonicalSportsSourceMarketProvider;
4
- /** Exact provider-native market identifier. */
4
+ /**
5
+ * Exact provider-native market identifier. It resolves on `GET /v1/markets/{market_id}`, either as-is or prefixed with this row's `provider` in the composite form `{provider}:{market_id}`.
6
+ *
7
+ * One provider can contribute MORE THAN ONE entry to the same submarket, because a provider is free to model one canonical market as several native ones. Kalshi does exactly that for a game moneyline: it lists one binary market per team ("Arizona wins", "San Francisco wins"), so a Kalshi moneyline row appears twice, once per team ticker, each with its own `yes`/`no` outcomes. Group by `provider` if you need one row per venue; do not assume the list has at most one entry per provider.
8
+ */
5
9
  marketId: string;
6
10
  marketName?: string;
7
11
  marketSlug?: string;
@@ -2,7 +2,13 @@ export interface CanonicalSportsSourceOutcome {
2
2
  /** Canonical outcome this source-native selection represents. */
3
3
  canonicalOutcomeKey: string;
4
4
  label?: string;
5
- /** Exact provider-native outcome/token identifier when available. SX Bet exposes one market hash and two named positions rather than separate outcome tokens, so its source-local selection reference is `<market_hash>:1` or `<market_hash>:2`. This field is never a universal cross-provider outcome ID. */
5
+ /**
6
+ * Exact provider-native outcome identifier. It is never a universal cross-provider outcome ID.
7
+ *
8
+ * On every provider this is the same value `GET /v1/markets/{market_id}` returns as `outcomes[].outcome_id` for the market named by this row's `market_id`, so the two surfaces join directly.
9
+ *
10
+ * `polymarket`, `predict` and `alpha-arcade` publish a globally unique per-outcome token (Polymarket CLOB token id, Predict on-chain id, AlphaArcade CLOB token id). `sxbet` and `kalshi` publish no per-outcome token at all, so their references are market-scoped and must be read together with `market_id`: an SX Bet market has one hash and two named positions (`outcomeOne` / `outcomeTwo`), and a Kalshi market is binary (`yes` / `no`). Both are the spelling the venue itself uses to address a side — SX Bet keys its order-book snapshot by `outcomeOne`/`outcomeTwo`, and Kalshi keys its book by `yes`/`no` and reports a trade's `taker_side` the same way.
11
+ */
6
12
  outcomeId?: string;
7
13
  /** Optional source-native side such as `yes` or `no`. */
8
14
  side?: string;
@@ -1,5 +1,5 @@
1
1
  export interface EventMarket {
2
- /** Platform-native market identifier. Kalshi ticker (`KXMLBGAME-26MAY221840CLEPHI-CLE`), Polymarket numeric market id, SX Bet `marketHash`, or Predict market id. */
2
+ /** Platform-native market identifier. Kalshi ticker (`KXMLBGAME-26AUG272145AZSF-AZ`), Polymarket numeric market id, SX Bet `marketHash`, or Predict market id. */
3
3
  marketId: string;
4
4
  /** Human-readable market title/question. */
5
5
  title: string;
@@ -0,0 +1,9 @@
1
+ export declare const GetMarketsRequestProvider: {
2
+ readonly Kalshi: "kalshi";
3
+ readonly Polymarket: "polymarket";
4
+ readonly Predict: "predict";
5
+ readonly Sxbet: "sxbet";
6
+ readonly Hyperliquid: "hyperliquid";
7
+ readonly AlphaArcade: "alpha-arcade";
8
+ };
9
+ export type GetMarketsRequestProvider = (typeof GetMarketsRequestProvider)[keyof typeof GetMarketsRequestProvider];
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetMarketsRequestProvider = {
3
+ Kalshi: "kalshi",
4
+ Polymarket: "polymarket",
5
+ Predict: "predict",
6
+ Sxbet: "sxbet",
7
+ Hyperliquid: "hyperliquid",
8
+ AlphaArcade: "alpha-arcade",
9
+ };
@@ -3,7 +3,13 @@ export interface MarketDetailOutcome {
3
3
  name: string;
4
4
  /** Stable per-platform key for this outcome: Kalshi `yes`/`no`, Polymarket CLOB token id, Predict on-chain id, SX Bet `outcomeOne`/`outcomeTwo`, Hyperliquid coin encoding (`#<10*outcome+side>`). The join key for future per-outcome sub-resources (order-book depth). */
5
5
  outcomeId?: string;
6
- /** Current implied probability of this outcome in 0–1 — the headline field, equal to the implied probability on every supported platform. Derivation cascade: mid of bid/ask when two-sided → the single available side → last trade → platform mark (Polymarket `outcomePrices`, which preserves 0/1 resolution marks on settled markets). Because the cascade differs by what each platform exposes, `price` is a DISPLAY number — when comparing across platforms or sizing trades, prefer `bid`/`ask` directly where present. Null when no quote of any kind exists. GUARANTEE: when `pricing.availability` is `live`, `price` is non-null on every outcome. Values are rounded to at most 6 decimal places. */
6
+ /**
7
+ * Current implied probability of this outcome in 0–1 — the headline field, equal to the implied probability on every supported platform. Derivation cascade: mid of bid/ask when two-sided → the single available side → last trade → platform mark (Polymarket `outcomePrices`, which preserves 0/1 resolution marks on settled markets; AlphaArcade's catalog midpoint). Because the cascade differs by what each platform exposes, `price` is a DISPLAY number — when comparing across platforms or sizing trades, prefer `bid`/`ask` directly where present. Null when no quote of any kind exists.
8
+ *
9
+ * **A non-null `price` does not mean a tradeable price.** The last two rungs of the cascade produce a number with no book behind it, and the mid of a 0.01 / 0.99 book produces a confident-looking 0.5 that no one will fill. Read `pricing.availability` first: `live` says at least one outcome has a book the venue treats as quoted; `indicative` says every price here is a mark, a lone side, or a book the venue's own spread threshold rejects.
10
+ *
11
+ * GUARANTEE: when `pricing.availability` is `live` or `indicative`, `price` is non-null on every outcome. Values are rounded to at most 6 decimal places.
12
+ */
7
13
  price: number | null;
8
14
  /** Best bid for this outcome in 0–1 probability. Null when that book side is empty or the platform doesn't publish per-outcome quotes on the record (Polymarket non-primary outcomes). Hyperliquid's second side is derived from the merged book complement (`1 − first-side ask`), matching the platform's order-book structure; no other platform synthesizes bid from `1 − ask`. */
9
15
  bid: number | null;
@@ -1,19 +1,62 @@
1
1
  import type * as PredictorSDK from "../index.js";
2
2
  /**
3
3
  * Market-wide quote metadata for the pricing tier. Always present on the response; `availability` tells the truth about what the tier could hydrate instead of leaving consumers to guess from nulls.
4
+ *
5
+ * **Bounding quote freshness.** `as_of` is the provider's own stamp and means something different on each platform, so read `as_of_kind` before applying an age bound to it — only `as_of_kind: quote` tracks the quote closely enough to bound at all, and how tight that bound can be still varies by venue. `observed_at` is PredictorSDK's own read time and means the same thing on every provider, so it is the field to bound when you need one threshold that behaves identically across platforms.
4
6
  */
5
7
  export interface MarketDetailPricing {
6
- /** `live` — every outcome carries a price. `partial` — some but not all outcomes priced. `no_quotes` — the pricing fetch succeeded but the book is empty (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders). `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served. */
8
+ /**
9
+ * How completely — and how honestly — the pricing tier hydrated. It answers two questions in this precedence order: did every outcome get a price, and is any of those prices backed by a book you could actually cross.
10
+ *
11
+ * `live` — every outcome carries a price AND at least one outcome has a two-sided book the venue itself treats as quoted. **This is the only value that licenses reading `price` as a tradeable level.**
12
+ *
13
+ * `indicative` — every outcome carries a price, but no outcome has such a book behind it. The prices are marks, one side of a book with nothing facing it, or a two-sided book wider than the venue's own published spread threshold for that market. Concretely: an AlphaArcade market whose order book is empty, where the catalog midpoint is the only price left standing; a Predict market quoted 0.01 / 0.99, whose 0.5 midpoint is arithmetic rather than a market (Predict publishes a per-market `spreadThreshold` and this server honours it); a settled Polymarket market whose 1/0 `outcomePrices` are resolution marks; or a book with one resting order and nothing on the other side. `price` is still populated and still the venue's own number — treat it as roughly where the market is thought to be, never as a level you can trade or arbitrage against. **Filter or flag `indicative` before computing cross-venue edges**: an `indicative` 0.5 next to a `live` 0.735 elsewhere is not a 23¢ opportunity, it is one venue with no book.
14
+ *
15
+ * `partial` — some but not all outcomes priced. Incompleteness is reported ahead of quote quality because it is the louder warning, so a `partial` market says nothing about the book behind the prices it does carry.
16
+ *
17
+ * `no_quotes` — the pricing read succeeded and there is nothing at all: no book and no mark (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders; AlphaArcade markets that have never traded). An empty book truthfully read is still an observation, so `observed_at` is populated.
18
+ *
19
+ * `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served and `observed_at` is null.
20
+ */
7
21
  availability: PredictorSDK.MarketDetailPricingAvailability;
8
22
  /** Self-describing unit declaration for all price fields. Single canonical scale today; new values would be added alongside (never replacing) this one. */
9
23
  scale: PredictorSDK.MarketDetailPricingScale;
10
24
  /** Where the quotes came from. `market_record` — embedded in the same single-market record as the identity fetch (Kalshi, Polymarket, Predict). `orderbook` — required one bounded second fetch against the platform's order-book surface (SX Bet `/orderbook-v3/snapshot`, Hyperliquid `l2Book`). */
11
25
  source: PredictorSDK.MarketDetailPricingSource;
12
26
  /**
13
- * Quote freshness as RFC3339. When the two sides carry independent upstream timestamps, this is the OLDER of them — a conservative floor that never over-claims freshness. Hyperliquid uses the `l2Book` server timestamp. Null when the upstream record carries no quote timestamp at all (Predict, AlphaArcade, and SX Bet) — treat freshness as UNKNOWN, not as fresh. Timestamps come from each platform's own clock; for Kalshi/Polymarket the value is the record's last-update time, the closest the platform exposes to a quote timestamp.
14
- * SX Bet moved from timestamped to null at its V3 order-book cutover (2026-08-25): V3 publishes an opaque monotonic book `version` and no wall-clock stamp anywhere, and server ingest time is not substituted because it would masquerade as an upstream stamp.
27
+ * The upstream timestamp on this platform's own clock, as RFC3339. When the two sides carry independent stamps this is the OLDER of them — a conservative floor that never over-claims freshness. Null when the record carries no timestamp at all (Predict, AlphaArcade, and SX Bet).
28
+ *
29
+ * **This field is NOT a uniform freshness bound. Read `as_of_kind` first.** What it measures differs per platform: on Hyperliquid it is the order book's server time and moves with the book, while on Kalshi it is a record write that does not move while the market is quoted. Measured live on 2026-08-24 over two runs — 100 open markets read twice 7.5 minutes apart, and 96 open markets read twice 11 minutes apart:
30
+ *
31
+ * * `kalshi` — **15 hours to 137 days old** on markets reporting `status: open` and `availability: live` with a real two-sided book. The age tracks how long ago the record was last written, so it depends entirely on the market: same-day game markets ran a median of ~23 h in one sample and ~43 h in another, while a broad sample of the market list ran a median of ~101 days (`CHINAUSGDP-30`, `status: open`, quoted 0.15 / 0.19, was stamped 2026-04-09). Advanced on 0 of 39 and 0 of 42 markets across the two runs, including five whose prices moved inside the window. **Not boundable at any threshold — do not infer one from these numbers.**
32
+ * * `polymarket` — 45 s to 405 s old; advanced on 60 of 60 and 25 of 25 markets, while only 1 of those 25 prices changed. Values recur identically across dozens of unrelated markets (one batch write, not one quote). Bounds record age in minutes, not quote age in seconds.
33
+ * * `sxbet` — a real per-side quote stamp on the V2 best-odds path, but it marks when the resting top-of-book order was posted, so on a thin book it is legitimately old: measured 39 s to 2.5 h, median ~24 min. It advances when the quote advances, which is what makes it a quote stamp — but size the bound to the venue's liquidity, not in seconds. Null from the 2026-08-25 V3 cutover onward.
34
+ * * `hyperliquid` — the `l2Book` server timestamp, a real quote stamp and the one field here that genuinely supports a seconds-scale bound: polled directly it tracks wall clock to the second.
35
+ * * `predict`, `alpha-arcade` — always null.
36
+ *
37
+ * These ranges are observed behaviour, not a contract: they are published so a consumer can pick a threshold from measured data rather than guessing, and they can change whenever a venue changes how it writes its records. Server ingest time is never substituted into this field — that would masquerade as an upstream stamp. Use `observed_at` for the read time.
15
38
  */
16
39
  asOf: Date | null;
40
+ /**
41
+ * What `as_of` MEASURES on this provider, so one consumer code path can bound freshness tightly where the value is a quote time and refuse to pretend where it is not. Always present; `unknown` whenever `as_of` is null, never an empty string.
42
+ *
43
+ * `quote` — the stamp advances when the quote advances, so an age bound on it is meaningful. Hyperliquid (`l2Book` server time) and SX Bet's V2 best-odds path. How TIGHT that bound can be still depends on the venue: Hyperliquid's tracks wall clock to the second, while SX Bet's marks when the resting top-of-book order was posted and is legitimately tens of minutes old on a thin book. Size the threshold to the venue's liquidity; a blanket seconds-scale bound rejects most of SX Bet.
44
+ *
45
+ * `record_refresh` — the stamp advances on a periodic rewrite of the provider's record, independent of whether the quote moved. Bounds RECORD age (minutes), not quote age. Polymarket.
46
+ *
47
+ * `record_static` — the stamp does not advance while the market is actively quoted, so it bounds nothing at any threshold. Kalshi. Treat quote freshness as unknown here and do not gate on `as_of`; bound `observed_at` instead and take executable price from the venue's own book.
48
+ *
49
+ * `unknown` — `as_of` is null: the record carries no timestamp of any kind (Predict, AlphaArcade, SX Bet V3). Kept distinct from `record_static` because the underlying fact differs even though the consumer's action does not.
50
+ */
51
+ asOfKind: PredictorSDK.MarketDetailPricingAsOfKind;
52
+ /**
53
+ * When PREDICTORSDK read these quotes, as RFC3339 — an observation timestamp, not an upstream one. Named `observed_at` rather than `as_of` for the same reason `trading_fees.observed_at` is: `as_of` is the provider's own stamp, and reusing the name for a differently-defined value would bake that confusion into a second field.
54
+ *
55
+ * This is the one timestamp on the response whose definition does not vary by platform, which makes it the field to bound when you need a single threshold that behaves identically everywhere. It bounds the age of the READ, not the age of the quote: on a `record_static` provider a fresh `observed_at` beside a 23-hour `as_of` is the honest description of what the venue served. `/v1/markets/{market_id}` reads the venue live on every request and caches nothing, so this stamp is the request time.
56
+ *
57
+ * Taken BEFORE the upstream call, so it is never newer than the moment the quotes were actually observed and `now - observed_at` never understates their age. Null only when `availability` is `unavailable` — no quotes were observed, so there is nothing to stamp. Populated for `no_quotes`, where an empty book is a successful observation.
58
+ */
59
+ observedAt: Date | null;
17
60
  /** True when this market belongs to a negative-risk multi-outcome event (Polymarket `negRisk`, Predict `isNegRisk`). On a multi-outcome record, outcome prices intentionally need not sum to 1 — do not "normalize" the book. Note that for the BINARY member markets these platforms serve today the flag signals event-level structure (this market is one leg of a mutually-exclusive set); the binary pair itself still sums to ~1. Omitted when false. */
18
61
  negRisk?: boolean;
19
62
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * What `as_of` MEASURES on this provider, so one consumer code path can bound freshness tightly where the value is a quote time and refuse to pretend where it is not. Always present; `unknown` whenever `as_of` is null, never an empty string.
3
+ *
4
+ * `quote` — the stamp advances when the quote advances, so an age bound on it is meaningful. Hyperliquid (`l2Book` server time) and SX Bet's V2 best-odds path. How TIGHT that bound can be still depends on the venue: Hyperliquid's tracks wall clock to the second, while SX Bet's marks when the resting top-of-book order was posted and is legitimately tens of minutes old on a thin book. Size the threshold to the venue's liquidity; a blanket seconds-scale bound rejects most of SX Bet.
5
+ *
6
+ * `record_refresh` — the stamp advances on a periodic rewrite of the provider's record, independent of whether the quote moved. Bounds RECORD age (minutes), not quote age. Polymarket.
7
+ *
8
+ * `record_static` — the stamp does not advance while the market is actively quoted, so it bounds nothing at any threshold. Kalshi. Treat quote freshness as unknown here and do not gate on `as_of`; bound `observed_at` instead and take executable price from the venue's own book.
9
+ *
10
+ * `unknown` — `as_of` is null: the record carries no timestamp of any kind (Predict, AlphaArcade, SX Bet V3). Kept distinct from `record_static` because the underlying fact differs even though the consumer's action does not.
11
+ */
12
+ export declare const MarketDetailPricingAsOfKind: {
13
+ readonly Quote: "quote";
14
+ readonly RecordRefresh: "record_refresh";
15
+ readonly RecordStatic: "record_static";
16
+ readonly Unknown: "unknown";
17
+ };
18
+ export type MarketDetailPricingAsOfKind = (typeof MarketDetailPricingAsOfKind)[keyof typeof MarketDetailPricingAsOfKind];
@@ -0,0 +1,18 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /**
3
+ * What `as_of` MEASURES on this provider, so one consumer code path can bound freshness tightly where the value is a quote time and refuse to pretend where it is not. Always present; `unknown` whenever `as_of` is null, never an empty string.
4
+ *
5
+ * `quote` — the stamp advances when the quote advances, so an age bound on it is meaningful. Hyperliquid (`l2Book` server time) and SX Bet's V2 best-odds path. How TIGHT that bound can be still depends on the venue: Hyperliquid's tracks wall clock to the second, while SX Bet's marks when the resting top-of-book order was posted and is legitimately tens of minutes old on a thin book. Size the threshold to the venue's liquidity; a blanket seconds-scale bound rejects most of SX Bet.
6
+ *
7
+ * `record_refresh` — the stamp advances on a periodic rewrite of the provider's record, independent of whether the quote moved. Bounds RECORD age (minutes), not quote age. Polymarket.
8
+ *
9
+ * `record_static` — the stamp does not advance while the market is actively quoted, so it bounds nothing at any threshold. Kalshi. Treat quote freshness as unknown here and do not gate on `as_of`; bound `observed_at` instead and take executable price from the venue's own book.
10
+ *
11
+ * `unknown` — `as_of` is null: the record carries no timestamp of any kind (Predict, AlphaArcade, SX Bet V3). Kept distinct from `record_static` because the underlying fact differs even though the consumer's action does not.
12
+ */
13
+ export const MarketDetailPricingAsOfKind = {
14
+ Quote: "quote",
15
+ RecordRefresh: "record_refresh",
16
+ RecordStatic: "record_static",
17
+ Unknown: "unknown",
18
+ };
@@ -1,6 +1,19 @@
1
- /** `live` — every outcome carries a price. `partial` — some but not all outcomes priced. `no_quotes` — the pricing fetch succeeded but the book is empty (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders). `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served. */
1
+ /**
2
+ * How completely — and how honestly — the pricing tier hydrated. It answers two questions in this precedence order: did every outcome get a price, and is any of those prices backed by a book you could actually cross.
3
+ *
4
+ * `live` — every outcome carries a price AND at least one outcome has a two-sided book the venue itself treats as quoted. **This is the only value that licenses reading `price` as a tradeable level.**
5
+ *
6
+ * `indicative` — every outcome carries a price, but no outcome has such a book behind it. The prices are marks, one side of a book with nothing facing it, or a two-sided book wider than the venue's own published spread threshold for that market. Concretely: an AlphaArcade market whose order book is empty, where the catalog midpoint is the only price left standing; a Predict market quoted 0.01 / 0.99, whose 0.5 midpoint is arithmetic rather than a market (Predict publishes a per-market `spreadThreshold` and this server honours it); a settled Polymarket market whose 1/0 `outcomePrices` are resolution marks; or a book with one resting order and nothing on the other side. `price` is still populated and still the venue's own number — treat it as roughly where the market is thought to be, never as a level you can trade or arbitrage against. **Filter or flag `indicative` before computing cross-venue edges**: an `indicative` 0.5 next to a `live` 0.735 elsewhere is not a 23¢ opportunity, it is one venue with no book.
7
+ *
8
+ * `partial` — some but not all outcomes priced. Incompleteness is reported ahead of quote quality because it is the louder warning, so a `partial` market says nothing about the book behind the prices it does carry.
9
+ *
10
+ * `no_quotes` — the pricing read succeeded and there is nothing at all: no book and no mark (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders; AlphaArcade markets that have never traded). An empty book truthfully read is still an observation, so `observed_at` is populated.
11
+ *
12
+ * `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served and `observed_at` is null.
13
+ */
2
14
  export declare const MarketDetailPricingAvailability: {
3
15
  readonly Live: "live";
16
+ readonly Indicative: "indicative";
4
17
  readonly Partial: "partial";
5
18
  readonly NoQuotes: "no_quotes";
6
19
  readonly Unavailable: "unavailable";
@@ -1,7 +1,20 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** `live` — every outcome carries a price. `partial` — some but not all outcomes priced. `no_quotes` — the pricing fetch succeeded but the book is empty (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders). `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served. */
2
+ /**
3
+ * How completely — and how honestly — the pricing tier hydrated. It answers two questions in this precedence order: did every outcome get a price, and is any of those prices backed by a book you could actually cross.
4
+ *
5
+ * `live` — every outcome carries a price AND at least one outcome has a two-sided book the venue itself treats as quoted. **This is the only value that licenses reading `price` as a tradeable level.**
6
+ *
7
+ * `indicative` — every outcome carries a price, but no outcome has such a book behind it. The prices are marks, one side of a book with nothing facing it, or a two-sided book wider than the venue's own published spread threshold for that market. Concretely: an AlphaArcade market whose order book is empty, where the catalog midpoint is the only price left standing; a Predict market quoted 0.01 / 0.99, whose 0.5 midpoint is arithmetic rather than a market (Predict publishes a per-market `spreadThreshold` and this server honours it); a settled Polymarket market whose 1/0 `outcomePrices` are resolution marks; or a book with one resting order and nothing on the other side. `price` is still populated and still the venue's own number — treat it as roughly where the market is thought to be, never as a level you can trade or arbitrage against. **Filter or flag `indicative` before computing cross-venue edges**: an `indicative` 0.5 next to a `live` 0.735 elsewhere is not a 23¢ opportunity, it is one venue with no book.
8
+ *
9
+ * `partial` — some but not all outcomes priced. Incompleteness is reported ahead of quote quality because it is the louder warning, so a `partial` market says nothing about the book behind the prices it does carry.
10
+ *
11
+ * `no_quotes` — the pricing read succeeded and there is nothing at all: no book and no mark (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders; AlphaArcade markets that have never traded). An empty book truthfully read is still an observation, so `observed_at` is populated.
12
+ *
13
+ * `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served and `observed_at` is null.
14
+ */
3
15
  export const MarketDetailPricingAvailability = {
4
16
  Live: "live",
17
+ Indicative: "indicative",
5
18
  Partial: "partial",
6
19
  NoQuotes: "no_quotes",
7
20
  Unavailable: "unavailable",
@@ -2,6 +2,8 @@ import type * as PredictorSDK from "../index.js";
2
2
  export interface MarketsListResponse {
3
3
  /** Array of markets for the current page. */
4
4
  data: PredictorSDK.UnifiedMarket[];
5
+ /** Freshness of the catalog snapshot this page was served from. Describes the DATA; `pagination` describes the page. */
6
+ snapshot: PredictorSDK.MarketsSnapshot;
5
7
  /** Pagination metadata for the current page. */
6
8
  pagination: PredictorSDK.PaginationBlock;
7
9
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Freshness of the immutable catalog snapshot a `GET /v1/markets` page was served from. This endpoint reads a stored snapshot rather than calling the venues, so the age of the rows is not the age of the request.
3
+ */
4
+ export interface MarketsSnapshot {
5
+ /**
6
+ * When PredictorSDK finished reading the OLDEST provider catalog contributing rows to this response — a conservative freshness floor for the whole page, in millisecond-precision ISO 8601.
7
+ *
8
+ * `observed_at` is a PredictorSDK read time, the same meaning it carries on `pricing.observed_at` and `trading_fees.observed_at`. The difference is WHICH read: those two stamp the upstream call this request made, while this one stamps the background ingestion crawl that built the snapshot, so it is normally minutes to hours old rather than milliseconds. It is not `as_of` because no venue published it.
9
+ *
10
+ * **It is a floor, not a single fact.** Providers are crawled on independent schedules, so the catalog is a merge of snapshots of different ages and one of them is the stalest. Narrow the response with `?provider=` to get that provider's own read time exactly — under a filter this field describes only the selected provider, the same way `pagination.total` does.
11
+ *
12
+ * Stable for an entire cursor traversal: a cursor stays bound to the snapshot that issued it, so every page of one traversal reports the identical value even while newer snapshots are published.
13
+ *
14
+ * `null` when the bound snapshot carries no read time. An unstamped provider makes the whole value null rather than being skipped, because reporting a newer floor than the data supports would let stale rows through a correct freshness bound.
15
+ */
16
+ observedAt: Date | null;
17
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -13,6 +13,6 @@ export interface PlatformMarket {
13
13
  tokenIds?: string[];
14
14
  /** Source market ID. Present for platforms other than Kalshi and Polymarket. */
15
15
  marketId?: string;
16
- /** Source outcome IDs. Present for platforms that use outcome IDs. */
16
+ /** Source outcome IDs for the market named by `market_id`, sorted and de-duplicated. These are the same values `GET /v1/markets/{market_id}` returns as `outcomes[].outcome_id`, so they join directly. SX Bet's are `outcomeOne`/`outcomeTwo` — market-scoped, because SX Bet publishes no per-outcome token; read them together with `market_id`. Present for platforms that use outcome IDs. */
17
17
  outcomeIds?: string[];
18
18
  }
@@ -1,6 +1,6 @@
1
1
  import type * as PredictorSDK from "../index.js";
2
2
  export interface UnifiedMarket {
3
- /** Composite market identifier in the format `{provider}:{provider_id}` (e.g. `kalshi:KXNBAGAME-26MAR06INDLAL-LAL`). */
3
+ /** Composite market identifier in the format `{provider}:{provider_id}` (e.g. `kalshi:AMAZONFTC-29DEC31`). */
4
4
  id: string;
5
5
  /** Prediction market provider. */
6
6
  provider: PredictorSDK.UnifiedMarketProvider;
@@ -1,3 +1,4 @@
1
+ export * from "./AmbiguousIdentifierError.js";
1
2
  export * from "./CanonicalSportsEvent.js";
2
3
  export * from "./CanonicalSportsOutcome.js";
3
4
  export * from "./CanonicalSportsParticipant.js";
@@ -18,6 +19,7 @@ export * from "./EventResponse.js";
18
19
  export * from "./EventResponsePlatform.js";
19
20
  export * from "./GetEventRequestPlatform.js";
20
21
  export * from "./GetMarketRequestPlatform.js";
22
+ export * from "./GetMarketsRequestProvider.js";
21
23
  export * from "./MarketCategory.js";
22
24
  export * from "./MarketDetailFeeLeg.js";
23
25
  export * from "./MarketDetailFeeLegModel.js";
@@ -25,6 +27,7 @@ export * from "./MarketDetailFeeRounding.js";
25
27
  export * from "./MarketDetailFeeRoundingDirection.js";
26
28
  export * from "./MarketDetailOutcome.js";
27
29
  export * from "./MarketDetailPricing.js";
30
+ export * from "./MarketDetailPricingAsOfKind.js";
28
31
  export * from "./MarketDetailPricingAvailability.js";
29
32
  export * from "./MarketDetailPricingScale.js";
30
33
  export * from "./MarketDetailPricingSource.js";
@@ -37,6 +40,7 @@ export * from "./MarketDetailTradingFeesAvailability.js";
37
40
  export * from "./MarketDetailTradingFeesChargeBasis.js";
38
41
  export * from "./MarketDetailTradingFeesSource.js";
39
42
  export * from "./MarketsListResponse.js";
43
+ export * from "./MarketsSnapshot.js";
40
44
  export * from "./PaginationBlock.js";
41
45
  export * from "./PaymentRequiredErrorAction.js";
42
46
  export * from "./PaymentRequiredErrorBody.js";
@@ -1,3 +1,4 @@
1
+ export * from "./AmbiguousIdentifierError.js";
1
2
  export * from "./CanonicalSportsEvent.js";
2
3
  export * from "./CanonicalSportsOutcome.js";
3
4
  export * from "./CanonicalSportsParticipant.js";
@@ -18,6 +19,7 @@ export * from "./EventResponse.js";
18
19
  export * from "./EventResponsePlatform.js";
19
20
  export * from "./GetEventRequestPlatform.js";
20
21
  export * from "./GetMarketRequestPlatform.js";
22
+ export * from "./GetMarketsRequestProvider.js";
21
23
  export * from "./MarketCategory.js";
22
24
  export * from "./MarketDetailFeeLeg.js";
23
25
  export * from "./MarketDetailFeeLegModel.js";
@@ -25,6 +27,7 @@ export * from "./MarketDetailFeeRounding.js";
25
27
  export * from "./MarketDetailFeeRoundingDirection.js";
26
28
  export * from "./MarketDetailOutcome.js";
27
29
  export * from "./MarketDetailPricing.js";
30
+ export * from "./MarketDetailPricingAsOfKind.js";
28
31
  export * from "./MarketDetailPricingAvailability.js";
29
32
  export * from "./MarketDetailPricingScale.js";
30
33
  export * from "./MarketDetailPricingSource.js";
@@ -37,6 +40,7 @@ export * from "./MarketDetailTradingFeesAvailability.js";
37
40
  export * from "./MarketDetailTradingFeesChargeBasis.js";
38
41
  export * from "./MarketDetailTradingFeesSource.js";
39
42
  export * from "./MarketsListResponse.js";
43
+ export * from "./MarketsSnapshot.js";
40
44
  export * from "./PaginationBlock.js";
41
45
  export * from "./PaymentRequiredErrorAction.js";
42
46
  export * from "./PaymentRequiredErrorBody.js";
@@ -0,0 +1,12 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const AmbiguousIdentifierError: core.serialization.ObjectSchema<serializers.AmbiguousIdentifierError.Raw, PredictorSDK.AmbiguousIdentifierError>;
5
+ export declare namespace AmbiguousIdentifierError {
6
+ interface Raw {
7
+ error: string;
8
+ message?: string | null;
9
+ candidates: string[];
10
+ status_code: number;
11
+ }
12
+ }
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const AmbiguousIdentifierError = core.serialization.object({
4
+ error: core.serialization.string(),
5
+ message: core.serialization.string().optional(),
6
+ candidates: core.serialization.list(core.serialization.string()),
7
+ statusCode: core.serialization.property("status_code", core.serialization.number()),
8
+ });
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const GetMarketsRequestProvider: core.serialization.Schema<serializers.GetMarketsRequestProvider.Raw, PredictorSDK.GetMarketsRequestProvider>;
5
+ export declare namespace GetMarketsRequestProvider {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet" | "hyperliquid" | "alpha-arcade";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const GetMarketsRequestProvider = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet", "hyperliquid", "alpha-arcade"]);
@@ -1,6 +1,7 @@
1
1
  import type * as PredictorSDK from "../../api/index.js";
2
2
  import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
+ import { MarketDetailPricingAsOfKind } from "./MarketDetailPricingAsOfKind.js";
4
5
  import { MarketDetailPricingAvailability } from "./MarketDetailPricingAvailability.js";
5
6
  import { MarketDetailPricingScale } from "./MarketDetailPricingScale.js";
6
7
  import { MarketDetailPricingSource } from "./MarketDetailPricingSource.js";
@@ -11,6 +12,8 @@ export declare namespace MarketDetailPricing {
11
12
  scale: MarketDetailPricingScale.Raw;
12
13
  source: MarketDetailPricingSource.Raw;
13
14
  as_of?: string | null;
15
+ as_of_kind: MarketDetailPricingAsOfKind.Raw;
16
+ observed_at?: string | null;
14
17
  neg_risk?: boolean | null;
15
18
  }
16
19
  }
@@ -1,5 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.js";
3
+ import { MarketDetailPricingAsOfKind } from "./MarketDetailPricingAsOfKind.js";
3
4
  import { MarketDetailPricingAvailability } from "./MarketDetailPricingAvailability.js";
4
5
  import { MarketDetailPricingScale } from "./MarketDetailPricingScale.js";
5
6
  import { MarketDetailPricingSource } from "./MarketDetailPricingSource.js";
@@ -8,5 +9,7 @@ export const MarketDetailPricing = core.serialization.object({
8
9
  scale: MarketDetailPricingScale,
9
10
  source: MarketDetailPricingSource,
10
11
  asOf: core.serialization.property("as_of", core.serialization.date().nullable()),
12
+ asOfKind: core.serialization.property("as_of_kind", MarketDetailPricingAsOfKind),
13
+ observedAt: core.serialization.property("observed_at", core.serialization.date().nullable()),
11
14
  negRisk: core.serialization.property("neg_risk", core.serialization.boolean().optional()),
12
15
  });
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const MarketDetailPricingAsOfKind: core.serialization.Schema<serializers.MarketDetailPricingAsOfKind.Raw, PredictorSDK.MarketDetailPricingAsOfKind>;
5
+ export declare namespace MarketDetailPricingAsOfKind {
6
+ type Raw = "quote" | "record_refresh" | "record_static" | "unknown";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const MarketDetailPricingAsOfKind = core.serialization.enum_(["quote", "record_refresh", "record_static", "unknown"]);
@@ -3,5 +3,5 @@ import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
4
  export declare const MarketDetailPricingAvailability: core.serialization.Schema<serializers.MarketDetailPricingAvailability.Raw, PredictorSDK.MarketDetailPricingAvailability>;
5
5
  export declare namespace MarketDetailPricingAvailability {
6
- type Raw = "live" | "partial" | "no_quotes" | "unavailable";
6
+ type Raw = "live" | "indicative" | "partial" | "no_quotes" | "unavailable";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.js";
3
- export const MarketDetailPricingAvailability = core.serialization.enum_(["live", "partial", "no_quotes", "unavailable"]);
3
+ export const MarketDetailPricingAvailability = core.serialization.enum_(["live", "indicative", "partial", "no_quotes", "unavailable"]);
@@ -1,12 +1,14 @@
1
1
  import type * as PredictorSDK from "../../api/index.js";
2
2
  import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
+ import { MarketsSnapshot } from "./MarketsSnapshot.js";
4
5
  import { PaginationBlock } from "./PaginationBlock.js";
5
6
  import { UnifiedMarket } from "./UnifiedMarket.js";
6
7
  export declare const MarketsListResponse: core.serialization.ObjectSchema<serializers.MarketsListResponse.Raw, PredictorSDK.MarketsListResponse>;
7
8
  export declare namespace MarketsListResponse {
8
9
  interface Raw {
9
10
  data: UnifiedMarket.Raw[];
11
+ snapshot: MarketsSnapshot.Raw;
10
12
  pagination: PaginationBlock.Raw;
11
13
  }
12
14
  }
@@ -1,8 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.js";
3
+ import { MarketsSnapshot } from "./MarketsSnapshot.js";
3
4
  import { PaginationBlock } from "./PaginationBlock.js";
4
5
  import { UnifiedMarket } from "./UnifiedMarket.js";
5
6
  export const MarketsListResponse = core.serialization.object({
6
7
  data: core.serialization.list(UnifiedMarket),
8
+ snapshot: MarketsSnapshot,
7
9
  pagination: PaginationBlock,
8
10
  });
@@ -0,0 +1,9 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const MarketsSnapshot: core.serialization.ObjectSchema<serializers.MarketsSnapshot.Raw, PredictorSDK.MarketsSnapshot>;
5
+ export declare namespace MarketsSnapshot {
6
+ interface Raw {
7
+ observed_at?: string | null;
8
+ }
9
+ }
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const MarketsSnapshot = core.serialization.object({
4
+ observedAt: core.serialization.property("observed_at", core.serialization.date().nullable()),
5
+ });
@@ -1,3 +1,4 @@
1
+ export * from "./AmbiguousIdentifierError.js";
1
2
  export * from "./CanonicalSportsEvent.js";
2
3
  export * from "./CanonicalSportsOutcome.js";
3
4
  export * from "./CanonicalSportsParticipant.js";
@@ -18,6 +19,7 @@ export * from "./EventResponse.js";
18
19
  export * from "./EventResponsePlatform.js";
19
20
  export * from "./GetEventRequestPlatform.js";
20
21
  export * from "./GetMarketRequestPlatform.js";
22
+ export * from "./GetMarketsRequestProvider.js";
21
23
  export * from "./MarketCategory.js";
22
24
  export * from "./MarketDetailFeeLeg.js";
23
25
  export * from "./MarketDetailFeeLegModel.js";
@@ -25,6 +27,7 @@ export * from "./MarketDetailFeeRounding.js";
25
27
  export * from "./MarketDetailFeeRoundingDirection.js";
26
28
  export * from "./MarketDetailOutcome.js";
27
29
  export * from "./MarketDetailPricing.js";
30
+ export * from "./MarketDetailPricingAsOfKind.js";
28
31
  export * from "./MarketDetailPricingAvailability.js";
29
32
  export * from "./MarketDetailPricingScale.js";
30
33
  export * from "./MarketDetailPricingSource.js";
@@ -37,6 +40,7 @@ export * from "./MarketDetailTradingFeesAvailability.js";
37
40
  export * from "./MarketDetailTradingFeesChargeBasis.js";
38
41
  export * from "./MarketDetailTradingFeesSource.js";
39
42
  export * from "./MarketsListResponse.js";
43
+ export * from "./MarketsSnapshot.js";
40
44
  export * from "./PaginationBlock.js";
41
45
  export * from "./PaymentRequiredErrorAction.js";
42
46
  export * from "./PaymentRequiredErrorBody.js";
@@ -1,3 +1,4 @@
1
+ export * from "./AmbiguousIdentifierError.js";
1
2
  export * from "./CanonicalSportsEvent.js";
2
3
  export * from "./CanonicalSportsOutcome.js";
3
4
  export * from "./CanonicalSportsParticipant.js";
@@ -18,6 +19,7 @@ export * from "./EventResponse.js";
18
19
  export * from "./EventResponsePlatform.js";
19
20
  export * from "./GetEventRequestPlatform.js";
20
21
  export * from "./GetMarketRequestPlatform.js";
22
+ export * from "./GetMarketsRequestProvider.js";
21
23
  export * from "./MarketCategory.js";
22
24
  export * from "./MarketDetailFeeLeg.js";
23
25
  export * from "./MarketDetailFeeLegModel.js";
@@ -25,6 +27,7 @@ export * from "./MarketDetailFeeRounding.js";
25
27
  export * from "./MarketDetailFeeRoundingDirection.js";
26
28
  export * from "./MarketDetailOutcome.js";
27
29
  export * from "./MarketDetailPricing.js";
30
+ export * from "./MarketDetailPricingAsOfKind.js";
28
31
  export * from "./MarketDetailPricingAvailability.js";
29
32
  export * from "./MarketDetailPricingScale.js";
30
33
  export * from "./MarketDetailPricingSource.js";
@@ -37,6 +40,7 @@ export * from "./MarketDetailTradingFeesAvailability.js";
37
40
  export * from "./MarketDetailTradingFeesChargeBasis.js";
38
41
  export * from "./MarketDetailTradingFeesSource.js";
39
42
  export * from "./MarketsListResponse.js";
43
+ export * from "./MarketsSnapshot.js";
40
44
  export * from "./PaginationBlock.js";
41
45
  export * from "./PaymentRequiredErrorAction.js";
42
46
  export * from "./PaymentRequiredErrorBody.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predictorsdk/client",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "The official TypeScript/JavaScript client for the PredictorSDK matching markets API",
5
5
  "license": "MIT",
6
6
  "keywords": [