CRISP partnersSDK methods

getPolymarketEvents()

Read one active event feed page.

Public Polymarket read, without CRISP credentials. Returns data, source, fetchedAt and stale. Website curation is best effort; the discovery guide explains caching, missing sections and direct upstream sources. This helper does not authorize trading.

market-discovery workflow · All SDK methods

Import and runtime

@crisp-trade/partner-sdk/discovery — public Polymarket reads from your backend; no CRISP credentials or signing.

Client setup and shared behavior

Arguments

ArgumentPresenceReleased TypeScript type
queryOptional
PolymarketEventQuery
optionsOptional
DiscoveryRequest

Named types are expanded under “Exact released types” below. Parameters are in call order; optional does not imply nullable.

Example

Public display read. Replace example slugs or search text with your selected discovery inputs.

import { getPolymarketEvents } from '@crisp-trade/partner-sdk/discovery';
const result = await getPolymarketEvents({
  tagSlug: 'politics',
  limit: 20,
});
console.log(result.data, result.fetchedAt, result.stale);

Returns

The exact return type is shown below; this helper does not use the ordinary HTTP response wrapper.

Return type
Promise<DiscoveryResult<{
    items: PolymarketEvent[];
    nextCursor: string | null;
}>>

Errors and lifecycle

Discovery errors, cache and cancellation. Public reads use PolymarketDiscoveryError, not CrispApiError. No order is submitted.

Direct Polymarket sources. These reads are not CRISP HMAC operations.

Exact released types

Extracted from the shipped SDK 0.13.0, not separately maintained signatures.

Full signature
getPolymarketEvents(query?: PolymarketEventQuery, options?: DiscoveryRequest): Promise<DiscoveryResult<{
    items: PolymarketEvent[];
    nextCursor: string | null;
}>>
PolymarketEventQuery
export interface PolymarketEventQuery {
    limit?: number;
    cursor?: string;
    tagSlug?: string;
    includeChildren?: boolean;
    order?: "volume24hr" | "volume" | "startDate" | "endDate";
    ascending?: boolean;
}
DiscoveryRequest
export interface DiscoveryRequest {
    signal?: AbortSignal;
}
DiscoveryResult
export interface DiscoveryResult<T> {
    data: T;
    source: string;
    fetchedAt: string;
    stale: boolean;
}
PolymarketEvent
export interface PolymarketEvent {
    id: string;
    slug: string;
    title: string;
    imageUrl: string | null;
    endDate: string | null;
    active: boolean | null;
    closed: boolean | null;
    volume24hr: string | null;
    tags: Array<{
        id: string;
        slug: string;
        label: string;
    }>;
    markets: PolymarketMarket[];
}
PolymarketMarket
export interface PolymarketMarket {
    id: string;
    conditionId: string | null;
    question: string | null;
    slug: string | null;
    endDate: string | null;
    acceptingOrders: boolean | null;
    outcomes: Array<{
        label: string | null;
        tokenId: string | null;
        price: string | null;
    }>;
}
CRISP Partner Documentation