@predictorsdk/client 0.2.0 → 0.3.0

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 (34) hide show
  1. package/dist/Client.d.ts +19 -1
  2. package/dist/Client.js +117 -2
  3. package/dist/api/client/requests/GetMarketsRequest.d.ts +10 -0
  4. package/dist/api/client/requests/GetMarketsRequest.js +2 -0
  5. package/dist/api/client/requests/GetSportsMatchingMarketsRequest.d.ts +10 -4
  6. package/dist/api/client/requests/index.d.ts +1 -0
  7. package/dist/api/errors/InternalServerError.d.ts +6 -0
  8. package/dist/api/errors/InternalServerError.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/MarketsListResponse.d.ts +7 -0
  12. package/dist/api/types/MarketsListResponse.js +2 -0
  13. package/dist/api/types/PaginationBlock.d.ts +10 -0
  14. package/dist/api/types/PaginationBlock.js +2 -0
  15. package/dist/api/types/SportsMatchingResponse.d.ts +2 -0
  16. package/dist/api/types/UnifiedMarket.d.ts +9 -0
  17. package/dist/api/types/UnifiedMarket.js +2 -0
  18. package/dist/api/types/UnifiedMarketProvider.d.ts +8 -0
  19. package/dist/api/types/UnifiedMarketProvider.js +8 -0
  20. package/dist/api/types/index.d.ts +4 -0
  21. package/dist/api/types/index.js +4 -0
  22. package/dist/serialization/types/MarketsListResponse.d.ts +12 -0
  23. package/dist/serialization/types/MarketsListResponse.js +8 -0
  24. package/dist/serialization/types/PaginationBlock.d.ts +12 -0
  25. package/dist/serialization/types/PaginationBlock.js +8 -0
  26. package/dist/serialization/types/SportsMatchingResponse.d.ts +2 -0
  27. package/dist/serialization/types/SportsMatchingResponse.js +2 -0
  28. package/dist/serialization/types/UnifiedMarket.d.ts +12 -0
  29. package/dist/serialization/types/UnifiedMarket.js +8 -0
  30. package/dist/serialization/types/UnifiedMarketProvider.d.ts +7 -0
  31. package/dist/serialization/types/UnifiedMarketProvider.js +3 -0
  32. package/dist/serialization/types/index.d.ts +4 -0
  33. package/dist/serialization/types/index.js +4 -0
  34. package/package.json +1 -1
package/dist/Client.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare class PredictorSDKClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<PredictorSDKClient.Options>;
12
12
  constructor(options: PredictorSDKClient.Options);
13
13
  /**
14
- * Find cross-platform market matches for sports events. Provide a Kalshi event ticker or Polymarket market slug to look up the equivalent market on other platforms. When called without parameters, returns all currently matched sports markets.
14
+ * Find cross-platform market matches for sports events. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a 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.
15
15
  *
16
16
  * @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
17
17
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -27,6 +27,24 @@ export declare class PredictorSDKClient {
27
27
  */
28
28
  getSportsMatchingMarkets(request?: PredictorSDK.GetSportsMatchingMarketsRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.SportsMatchingResponse>;
29
29
  private __getSportsMatchingMarkets;
30
+ /**
31
+ * Returns a paginated list of unified markets from all supported prediction market providers. Uses cursor-based pagination with default `limit=25`, max `100`.
32
+ *
33
+ * @param {PredictorSDK.GetMarketsRequest} request
34
+ * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link PredictorSDK.BadRequestError}
37
+ * @throws {@link PredictorSDK.UnauthorizedError}
38
+ * @throws {@link PredictorSDK.ForbiddenError}
39
+ * @throws {@link PredictorSDK.TooManyRequestsError}
40
+ * @throws {@link PredictorSDK.InternalServerError}
41
+ * @throws {@link PredictorSDK.ServiceUnavailableError}
42
+ *
43
+ * @example
44
+ * await client.getMarkets()
45
+ */
46
+ getMarkets(request?: PredictorSDK.GetMarketsRequest, requestOptions?: PredictorSDKClient.RequestOptions): core.HttpResponsePromise<PredictorSDK.MarketsListResponse>;
47
+ private __getMarkets;
30
48
  /**
31
49
  * Returns per-second price data for a Binance trading pair. When called without a time range, returns the latest price. With `start_time` and `end_time`, returns historical per-second prices in newest-first order. Supports cursor-based pagination for large result sets. Unknown or invalid symbols return `200` with `{"prices":[]}` and omit `total`.
32
50
  *
package/dist/Client.js CHANGED
@@ -13,7 +13,7 @@ export class PredictorSDKClient {
13
13
  this._options = normalizeClientOptionsWithAuth(options);
14
14
  }
15
15
  /**
16
- * Find cross-platform market matches for sports events. Provide a Kalshi event ticker or Polymarket market slug to look up the equivalent market on other platforms. When called without parameters, returns all currently matched sports markets.
16
+ * Find cross-platform market matches for sports events. When called without parameters, returns all currently matched sports markets with cursor-based pagination (default `limit=25`, max `100`). Provide a 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.
17
17
  *
18
18
  * @param {PredictorSDK.GetSportsMatchingMarketsRequest} request
19
19
  * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -31,8 +31,11 @@ export class PredictorSDKClient {
31
31
  return core.HttpResponsePromise.fromPromise(this.__getSportsMatchingMarkets(request, requestOptions));
32
32
  }
33
33
  async __getSportsMatchingMarkets(request = {}, requestOptions) {
34
- const { kalshiEventTicker, polymarketMarketSlug, predictMarketId, sxbetMarketId } = request;
34
+ const { limit, cursor, includeSettled, kalshiEventTicker, polymarketMarketSlug, predictMarketId, sxbetMarketId, } = request;
35
35
  const _queryParams = {
36
+ limit,
37
+ cursor,
38
+ include_settled: includeSettled,
36
39
  kalshi_event_ticker: kalshiEventTicker,
37
40
  polymarket_market_slug: polymarketMarketSlug,
38
41
  predict_market_id: predictMarketId,
@@ -117,6 +120,118 @@ export class PredictorSDKClient {
117
120
  }
118
121
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/matching-markets/sports");
119
122
  }
123
+ /**
124
+ * Returns a paginated list of unified markets from all supported prediction market providers. Uses cursor-based pagination with default `limit=25`, max `100`.
125
+ *
126
+ * @param {PredictorSDK.GetMarketsRequest} request
127
+ * @param {PredictorSDKClient.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @throws {@link PredictorSDK.BadRequestError}
130
+ * @throws {@link PredictorSDK.UnauthorizedError}
131
+ * @throws {@link PredictorSDK.ForbiddenError}
132
+ * @throws {@link PredictorSDK.TooManyRequestsError}
133
+ * @throws {@link PredictorSDK.InternalServerError}
134
+ * @throws {@link PredictorSDK.ServiceUnavailableError}
135
+ *
136
+ * @example
137
+ * await client.getMarkets()
138
+ */
139
+ getMarkets(request = {}, requestOptions) {
140
+ return core.HttpResponsePromise.fromPromise(this.__getMarkets(request, requestOptions));
141
+ }
142
+ async __getMarkets(request = {}, requestOptions) {
143
+ const { limit, cursor } = request;
144
+ const _queryParams = {
145
+ limit,
146
+ cursor,
147
+ };
148
+ const _authRequest = await this._options.authProvider.getAuthRequest();
149
+ const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
150
+ const _response = await core.fetcher({
151
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
152
+ (await core.Supplier.get(this._options.environment)) ??
153
+ environments.PredictorSDKEnvironment.Production, "v1/markets"),
154
+ method: "GET",
155
+ headers: _headers,
156
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
157
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
158
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
159
+ abortSignal: requestOptions?.abortSignal,
160
+ fetchFn: this._options?.fetch,
161
+ logging: this._options.logging,
162
+ });
163
+ if (_response.ok) {
164
+ return {
165
+ data: serializers.MarketsListResponse.parseOrThrow(_response.body, {
166
+ unrecognizedObjectKeys: "passthrough",
167
+ allowUnrecognizedUnionMembers: true,
168
+ allowUnrecognizedEnumValues: true,
169
+ skipValidation: true,
170
+ breadcrumbsPrefix: ["response"],
171
+ }),
172
+ rawResponse: _response.rawResponse,
173
+ };
174
+ }
175
+ if (_response.error.reason === "status-code") {
176
+ switch (_response.error.statusCode) {
177
+ case 400:
178
+ throw new PredictorSDK.BadRequestError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
179
+ unrecognizedObjectKeys: "passthrough",
180
+ allowUnrecognizedUnionMembers: true,
181
+ allowUnrecognizedEnumValues: true,
182
+ skipValidation: true,
183
+ breadcrumbsPrefix: ["response"],
184
+ }), _response.rawResponse);
185
+ case 401:
186
+ throw new PredictorSDK.UnauthorizedError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
187
+ unrecognizedObjectKeys: "passthrough",
188
+ allowUnrecognizedUnionMembers: true,
189
+ allowUnrecognizedEnumValues: true,
190
+ skipValidation: true,
191
+ breadcrumbsPrefix: ["response"],
192
+ }), _response.rawResponse);
193
+ case 403:
194
+ throw new PredictorSDK.ForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
195
+ unrecognizedObjectKeys: "passthrough",
196
+ allowUnrecognizedUnionMembers: true,
197
+ allowUnrecognizedEnumValues: true,
198
+ skipValidation: true,
199
+ breadcrumbsPrefix: ["response"],
200
+ }), _response.rawResponse);
201
+ case 429:
202
+ throw new PredictorSDK.TooManyRequestsError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
203
+ unrecognizedObjectKeys: "passthrough",
204
+ allowUnrecognizedUnionMembers: true,
205
+ allowUnrecognizedEnumValues: true,
206
+ skipValidation: true,
207
+ breadcrumbsPrefix: ["response"],
208
+ }), _response.rawResponse);
209
+ case 500:
210
+ throw new PredictorSDK.InternalServerError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
211
+ unrecognizedObjectKeys: "passthrough",
212
+ allowUnrecognizedUnionMembers: true,
213
+ allowUnrecognizedEnumValues: true,
214
+ skipValidation: true,
215
+ breadcrumbsPrefix: ["response"],
216
+ }), _response.rawResponse);
217
+ case 503:
218
+ throw new PredictorSDK.ServiceUnavailableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
219
+ unrecognizedObjectKeys: "passthrough",
220
+ allowUnrecognizedUnionMembers: true,
221
+ allowUnrecognizedEnumValues: true,
222
+ skipValidation: true,
223
+ breadcrumbsPrefix: ["response"],
224
+ }), _response.rawResponse);
225
+ default:
226
+ throw new errors.PredictorSDKError({
227
+ statusCode: _response.error.statusCode,
228
+ body: _response.error.body,
229
+ rawResponse: _response.rawResponse,
230
+ });
231
+ }
232
+ }
233
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/markets");
234
+ }
120
235
  /**
121
236
  * Returns per-second price data for a Binance trading pair. When called without a time range, returns the latest price. With `start_time` and `end_time`, returns historical per-second prices in newest-first order. Supports cursor-based pagination for large result sets. Unknown or invalid symbols return `200` with `{"prices":[]}` and omit `total`.
122
237
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface GetMarketsRequest {
6
+ /** Maximum number of markets to return per page. Range 1–100, default 25. */
7
+ limit?: number;
8
+ /** Opaque cursor from a previous response's `pagination.nextCursor` in the SDKs (raw JSON: `pagination.next_cursor`). */
9
+ cursor?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -3,12 +3,18 @@
3
3
  * {}
4
4
  */
5
5
  export interface GetSportsMatchingMarketsRequest {
6
- /** Kalshi event ticker(s) to find matching markets for (e.g. `KXNFLGAME-25AUG16ARIDEN`). Provide the parameter multiple times for multiple tickers. Only one filter type may be used per request. */
6
+ /** Maximum number of matched events to return per page. Range 1–100, default 25. Ignored when a platform-ID filter is supplied. */
7
+ limit?: number;
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
+ cursor?: string;
10
+ /** When `true`, include settled/archived events alongside currently live matches. Defaults to `false`. */
11
+ includeSettled?: boolean;
12
+ /** Kalshi event ticker(s) to find matching markets for (e.g. `KXNFLGAME-25AUG16ARIDEN`). Provide the parameter multiple times for multiple tickers. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
7
13
  kalshiEventTicker?: string | string[];
8
- /** 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. Only one filter type may be used per request. */
14
+ /** 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. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
9
15
  polymarketMarketSlug?: string | string[];
10
- /** Predict market ID(s) to find matching markets for (e.g. `110629`). Provide the parameter multiple times for multiple IDs. Only one filter type may be used per request. */
16
+ /** Predict market ID(s) to find matching markets for (e.g. `110629`). Provide the parameter multiple times for multiple IDs. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
11
17
  predictMarketId?: string | string[];
12
- /** SX Bet market ID(s) to find matching markets for (e.g. `0x4c000abdbf197ef32ecdf15561b1d636f1e5b02629f466678757fd83e2ec3599`). Provide the parameter multiple times for multiple IDs. Only one filter type may be used per request. */
18
+ /** SX Bet market ID(s) to find matching markets for (e.g. `0x4c000abdbf197ef32ecdf15561b1d636f1e5b02629f466678757fd83e2ec3599`). Provide the parameter multiple times for multiple IDs. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored. */
13
19
  sxbetMarketId?: string | string[];
14
20
  }
@@ -1,2 +1,3 @@
1
1
  export type { GetBinanceCryptoPricesRequest } from "./GetBinanceCryptoPricesRequest.js";
2
+ export type { GetMarketsRequest } from "./GetMarketsRequest.js";
2
3
  export type { GetSportsMatchingMarketsRequest } from "./GetSportsMatchingMarketsRequest.js";
@@ -0,0 +1,6 @@
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 InternalServerError extends errors.PredictorSDKError {
5
+ constructor(body: PredictorSDK.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -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 InternalServerError extends errors.PredictorSDKError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "InternalServerError",
7
+ statusCode: 500,
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 = this.constructor.name;
16
+ }
17
+ }
@@ -1,6 +1,7 @@
1
1
  export * from "./BadGatewayError.js";
2
2
  export * from "./BadRequestError.js";
3
3
  export * from "./ForbiddenError.js";
4
+ export * from "./InternalServerError.js";
4
5
  export * from "./ServiceUnavailableError.js";
5
6
  export * from "./TooManyRequestsError.js";
6
7
  export * from "./UnauthorizedError.js";
@@ -1,6 +1,7 @@
1
1
  export * from "./BadGatewayError.js";
2
2
  export * from "./BadRequestError.js";
3
3
  export * from "./ForbiddenError.js";
4
+ export * from "./InternalServerError.js";
4
5
  export * from "./ServiceUnavailableError.js";
5
6
  export * from "./TooManyRequestsError.js";
6
7
  export * from "./UnauthorizedError.js";
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../index.js";
2
+ export interface MarketsListResponse {
3
+ /** Array of markets for the current page. */
4
+ data: PredictorSDK.UnifiedMarket[];
5
+ /** Pagination metadata for the current page. */
6
+ pagination: PredictorSDK.PaginationBlock;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface PaginationBlock {
2
+ /** Number of items requested per page (echoes the `limit` query param). */
3
+ limit: number;
4
+ /** Total matching items across all pages. */
5
+ total: number;
6
+ /** Whether additional pages exist beyond this one. */
7
+ hasMore: boolean;
8
+ /** Opaque cursor for fetching the next page. Pass back via the `cursor` query parameter. Omitted when `has_more` is `false`. Clients must preserve the same filter set when re-using a cursor — mismatches return `400`. */
9
+ nextCursor?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,4 +2,6 @@ import type * as PredictorSDK from "../index.js";
2
2
  export interface SportsMatchingResponse {
3
3
  /** Key-value pairs where each key is the queried identifier (Kalshi event ticker, Polymarket slug, or canonical event ID when no filter is provided) and each value is an array of platform market objects. */
4
4
  markets: Record<string, PredictorSDK.PlatformMarket[]>;
5
+ /** Pagination metadata for the current page. Present in list mode (no platform-ID filter). Absent in lookup mode since the response is bounded by the filter. */
6
+ pagination?: PredictorSDK.PaginationBlock;
5
7
  }
@@ -0,0 +1,9 @@
1
+ import type * as PredictorSDK from "../index.js";
2
+ export interface UnifiedMarket {
3
+ /** Composite market identifier in the format `{provider}:{provider_id}` (e.g. `kalshi:KXNBAGAME-26MAR06INDLAL-LAL`). */
4
+ id: string;
5
+ /** Prediction market provider. */
6
+ provider: PredictorSDK.UnifiedMarketProvider;
7
+ /** Human-readable market title/question. */
8
+ title: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ /** Prediction market provider. */
2
+ export declare const UnifiedMarketProvider: {
3
+ readonly Kalshi: "kalshi";
4
+ readonly Polymarket: "polymarket";
5
+ readonly Predict: "predict";
6
+ readonly Sxbet: "sxbet";
7
+ };
8
+ export type UnifiedMarketProvider = (typeof UnifiedMarketProvider)[keyof typeof UnifiedMarketProvider];
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Prediction market provider. */
3
+ export const UnifiedMarketProvider = {
4
+ Kalshi: "kalshi",
5
+ Polymarket: "polymarket",
6
+ Predict: "predict",
7
+ Sxbet: "sxbet",
8
+ };
@@ -1,6 +1,10 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./MarketsListResponse.js";
5
+ export * from "./PaginationBlock.js";
4
6
  export * from "./PlatformMarket.js";
5
7
  export * from "./PlatformMarketPlatform.js";
6
8
  export * from "./SportsMatchingResponse.js";
9
+ export * from "./UnifiedMarket.js";
10
+ export * from "./UnifiedMarketProvider.js";
@@ -1,6 +1,10 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./MarketsListResponse.js";
5
+ export * from "./PaginationBlock.js";
4
6
  export * from "./PlatformMarket.js";
5
7
  export * from "./PlatformMarketPlatform.js";
6
8
  export * from "./SportsMatchingResponse.js";
9
+ export * from "./UnifiedMarket.js";
10
+ export * from "./UnifiedMarketProvider.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
+ import { PaginationBlock } from "./PaginationBlock.js";
5
+ import { UnifiedMarket } from "./UnifiedMarket.js";
6
+ export declare const MarketsListResponse: core.serialization.ObjectSchema<serializers.MarketsListResponse.Raw, PredictorSDK.MarketsListResponse>;
7
+ export declare namespace MarketsListResponse {
8
+ interface Raw {
9
+ data: UnifiedMarket.Raw[];
10
+ pagination: PaginationBlock.Raw;
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
+ import { PaginationBlock } from "./PaginationBlock.js";
4
+ import { UnifiedMarket } from "./UnifiedMarket.js";
5
+ export const MarketsListResponse = core.serialization.object({
6
+ data: core.serialization.list(UnifiedMarket),
7
+ pagination: PaginationBlock,
8
+ });
@@ -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 PaginationBlock: core.serialization.ObjectSchema<serializers.PaginationBlock.Raw, PredictorSDK.PaginationBlock>;
5
+ export declare namespace PaginationBlock {
6
+ interface Raw {
7
+ limit: number;
8
+ total: number;
9
+ has_more: boolean;
10
+ next_cursor?: string | null;
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 PaginationBlock = core.serialization.object({
4
+ limit: core.serialization.number(),
5
+ total: core.serialization.number(),
6
+ hasMore: core.serialization.property("has_more", core.serialization.boolean()),
7
+ nextCursor: core.serialization.property("next_cursor", core.serialization.string().optional()),
8
+ });
@@ -1,10 +1,12 @@
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 { PaginationBlock } from "./PaginationBlock.js";
4
5
  import { PlatformMarket } from "./PlatformMarket.js";
5
6
  export declare const SportsMatchingResponse: core.serialization.ObjectSchema<serializers.SportsMatchingResponse.Raw, PredictorSDK.SportsMatchingResponse>;
6
7
  export declare namespace SportsMatchingResponse {
7
8
  interface Raw {
8
9
  markets: Record<string, PlatformMarket.Raw[]>;
10
+ pagination?: PaginationBlock.Raw | null;
9
11
  }
10
12
  }
@@ -1,6 +1,8 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.js";
3
+ import { PaginationBlock } from "./PaginationBlock.js";
3
4
  import { PlatformMarket } from "./PlatformMarket.js";
4
5
  export const SportsMatchingResponse = core.serialization.object({
5
6
  markets: core.serialization.record(core.serialization.string(), core.serialization.list(PlatformMarket)),
7
+ pagination: PaginationBlock.optional(),
6
8
  });
@@ -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
+ import { UnifiedMarketProvider } from "./UnifiedMarketProvider.js";
5
+ export declare const UnifiedMarket: core.serialization.ObjectSchema<serializers.UnifiedMarket.Raw, PredictorSDK.UnifiedMarket>;
6
+ export declare namespace UnifiedMarket {
7
+ interface Raw {
8
+ id: string;
9
+ provider: UnifiedMarketProvider.Raw;
10
+ title: string;
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
+ import { UnifiedMarketProvider } from "./UnifiedMarketProvider.js";
4
+ export const UnifiedMarket = core.serialization.object({
5
+ id: core.serialization.string(),
6
+ provider: UnifiedMarketProvider,
7
+ title: core.serialization.string(),
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 UnifiedMarketProvider: core.serialization.Schema<serializers.UnifiedMarketProvider.Raw, PredictorSDK.UnifiedMarketProvider>;
5
+ export declare namespace UnifiedMarketProvider {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
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 UnifiedMarketProvider = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet"]);
@@ -1,6 +1,10 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./MarketsListResponse.js";
5
+ export * from "./PaginationBlock.js";
4
6
  export * from "./PlatformMarket.js";
5
7
  export * from "./PlatformMarketPlatform.js";
6
8
  export * from "./SportsMatchingResponse.js";
9
+ export * from "./UnifiedMarket.js";
10
+ export * from "./UnifiedMarketProvider.js";
@@ -1,6 +1,10 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./MarketsListResponse.js";
5
+ export * from "./PaginationBlock.js";
4
6
  export * from "./PlatformMarket.js";
5
7
  export * from "./PlatformMarketPlatform.js";
6
8
  export * from "./SportsMatchingResponse.js";
9
+ export * from "./UnifiedMarket.js";
10
+ export * from "./UnifiedMarketProvider.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predictorsdk/client",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The official TypeScript/JavaScript client for the PredictorSDK matching markets API",
5
5
  "license": "MIT",
6
6
  "keywords": [