CRISP partnersSDK methods

getPolymarketHomepage()

Load all curated homepage surfaces in one read.

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
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 { getPolymarketHomepage } from '@crisp-trade/partner-sdk/discovery';
const result = await getPolymarketHomepage();
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<PolymarketHomepage>>

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
getPolymarketHomepage(options?: DiscoveryRequest): Promise<DiscoveryResult<PolymarketHomepage>>
DiscoveryRequest
export interface DiscoveryRequest {
    signal?: AbortSignal;
}
DiscoveryResult
export interface DiscoveryResult<T> {
    data: T;
    source: string;
    fetchedAt: string;
    stale: boolean;
}
PolymarketHomepage
export interface PolymarketHomepage {
    /** null means unavailable/schema changed; [] means present and empty. */
    mainCats: PolymarketCategory[] | null;
    hotTopics: PolymarketHotTopic[] | null;
    trendingCarousels: PolymarketCarousel[] | null;
    pins: {
        featured: PolymarketEvent[] | null;
        sports: PolymarketEvent[] | null;
        btc5m: PolymarketEvent[] | null;
    };
}
PolymarketCategory
export interface PolymarketCategory {
    label: string;
    slug: string;
    path: string;
}
PolymarketHotTopic
export interface PolymarketHotTopic {
    title: string;
    volume: string | null;
    path: string;
}
PolymarketCarousel
export interface PolymarketCarousel {
    event: PolymarketEvent;
    type: string;
    shortName: string;
    /** Upstream display context, not a stable CRISP schema. Render as data, never HTML. */
    slot: Record<string, unknown>;
}
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