@liberfi.io/react-predict 0.1.41 → 0.1.43

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.
@@ -678,6 +678,13 @@ type WsServerMessage = WsPongMessage | WsSubscribedMessage | WsErrorMessage | Ws
678
678
  interface TickSizeResponse {
679
679
  minimum_tick_size: number;
680
680
  }
681
+ /** Aggregate statistics for all open prediction events. */
682
+ interface EventStats {
683
+ total_events: number;
684
+ total_volume_24h: number;
685
+ avg_liquidity: number;
686
+ active_sources: number;
687
+ }
681
688
 
682
689
  /**
683
690
  * HTTP client for the prediction-server REST API.
@@ -716,6 +723,12 @@ declare class PredictClient {
716
723
  * @throws When the server responds with 404 or any other non-2xx status.
717
724
  */
718
725
  getEvent(slug: string, source?: ProviderSource): Promise<PredictEvent>;
726
+ /**
727
+ * Fetch aggregate statistics for all open events.
728
+ *
729
+ * Maps to `GET /api/v1/events/stats`.
730
+ */
731
+ getEventStats(): Promise<EventStats>;
719
732
  /**
720
733
  * Fetch events similar to the given slug.
721
734
  *
@@ -1410,4 +1423,4 @@ interface ClobOrderPayload {
1410
1423
  */
1411
1424
  declare function buildClobPayload(signedOrder: SignedOrder, owner: string): ClobOrderPayload;
1412
1425
 
1413
- export { type PredictTag as $, type WithdrawSubmitResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStatus as E, type WithdrawSubmitRequest as F, type WithdrawStatusResponse as G, type PolymarketDepositAddresses as H, type PolymarketWithdrawResponse as I, type PolymarketWithdrawRequest as J, type WsConnectionStatus as K, type ListEventsParams as L, type MatchesParams as M, type WsDataMessage as N, type Orderbook as O, PredictClient as P, type WsPriceEvent as Q, type WsOrderbookEvent as R, type SimilarEventsParams as S, type TickSizeResponse as T, type WsTradeEvent as U, type CreateOrderInput as V, type WithdrawBuildResponse as W, createPredictClient as X, createPredictWsClient as Y, type PredictWsClientConfig as Z, type ProviderMeta as _, PredictWsClient as a, NEG_RISK_CTF_EXCHANGE_ADDRESS as a$, type SettlementSource as a0, type MarketStatus as a1, type MarketResult as a2, type MarketOutcome as a3, type OrderbookLevel as a4, type TradeType as a5, type EventSummary as a6, type MarketSummary as a7, type PricePoint as a8, type PredictPosition as a9, type WsErrorMessage as aA, eventQueryKey as aB, fetchEvent as aC, resolveTagSlug as aD, resolveEventsParams as aE, infiniteEventsQueryKey as aF, fetchEventsPage as aG, type ResolveEventsParamsInput as aH, type TagSlugSelection as aI, marketQueryKey as aJ, fetchMarket as aK, matchesQueryKey as aL, matchQueryKey as aM, fetchMatchesPage as aN, matchMarketsQueryKey as aO, fetchMatchMarketsPage as aP, CLOB_AUTH_DOMAIN as aQ, CLOB_AUTH_TYPES as aR, buildClobAuthMessage as aS, hmacSha256Base64 as aT, buildPolymarketL2Headers as aU, derivePolymarketApiKey as aV, type HttpMethod as aW, type PolymarketL2HeadersInput as aX, type PolymarketL2Headers as aY, type BuildClobAuthMessageInput as aZ, CTF_EXCHANGE_ADDRESS as a_, type OrderStatus as aa, type OrderSide as ab, type DFlowOrderContext as ac, type PolymarketOrderType as ad, type DepositBuildRequest as ae, type DepositBuildResponse as af, type DepositSubmitRequest as ag, type DepositSubmitResponse as ah, type DepositStatusResponse as ai, type UnsignedTx as aj, type MatchStatus as ak, type MatchGroupEntry as al, type MatchGroupMarket as am, type MatchSortField as an, type MatchesStats as ao, type MatchConfidenceTier as ap, type MatchMarketFlat as aq, type WsChannel as ar, type WsChannelEvent as as, type WsClientMessage as at, type WsSubscribeMessage as au, type WsPingMessage as av, type WsServerMessage as aw, type WsPongMessage as ax, type WsSubscribedMessage as ay, type WsErrorCode as az, type PredictPage as b, USDC_ADDRESS as b0, POLYGON_CHAIN_ID as b1, buildCtfExchangeDomain as b2, CTF_ORDER_TYPES as b3, ORDER_TYPE as b4, SIDE as b5, buildOrderMessage as b6, buildSignedOrder as b7, buildClobPayload as b8, type ClobOrderPayload as b9, type BuildOrderMessageInput as ba, type OrderMessage as bb, type SignedOrder as bc, DEFAULT_PAGE_SIZE as bd, type PredictEvent as c, type ProviderSource as d, type EventSortField as e, type PredictMarket as f, type ListMarketTradesParams as g, type PredictTrade as h, type PriceHistoryRange as i, type PriceHistoryResponse as j, type ListCandlesticksParams as k, type PositionsResponse as l, type ListOrdersParams as m, type PredictOrder as n, type CancelOrderResult as o, type MatchGroupPage as p, type MatchGroup as q, type MatchMarketParams as r, type MatchMarketPage as s, type ListTradesParams as t, type DFlowQuoteResponse as u, type DFlowSubmitResponse as v, type DFlowSubmitRequest as w, type DFlowKYCStatus as x, type PolymarketSetupStatus as y, type WithdrawBuildRequest as z };
1426
+ export { type ProviderMeta as $, type WithdrawBuildRequest as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type WithdrawSubmitResponse as F, type WithdrawSubmitRequest as G, type WithdrawStatusResponse as H, type PolymarketDepositAddresses as I, type PolymarketWithdrawResponse as J, type PolymarketWithdrawRequest as K, type ListEventsParams as L, type MatchesParams as M, type WsConnectionStatus as N, type Orderbook as O, PredictClient as P, type WsDataMessage as Q, type WsPriceEvent as R, type SimilarEventsParams as S, type TickSizeResponse as T, type WsOrderbookEvent as U, type WsTradeEvent as V, type WithdrawBuildResponse as W, type CreateOrderInput as X, createPredictClient as Y, createPredictWsClient as Z, type PredictWsClientConfig as _, PredictWsClient as a, CTF_EXCHANGE_ADDRESS as a$, type PredictTag as a0, type SettlementSource as a1, type MarketStatus as a2, type MarketResult as a3, type MarketOutcome as a4, type OrderbookLevel as a5, type TradeType as a6, type EventSummary as a7, type MarketSummary as a8, type PricePoint as a9, type WsErrorCode as aA, type WsErrorMessage as aB, eventQueryKey as aC, fetchEvent as aD, resolveTagSlug as aE, resolveEventsParams as aF, infiniteEventsQueryKey as aG, fetchEventsPage as aH, type ResolveEventsParamsInput as aI, type TagSlugSelection as aJ, marketQueryKey as aK, fetchMarket as aL, matchesQueryKey as aM, matchQueryKey as aN, fetchMatchesPage as aO, matchMarketsQueryKey as aP, fetchMatchMarketsPage as aQ, CLOB_AUTH_DOMAIN as aR, CLOB_AUTH_TYPES as aS, buildClobAuthMessage as aT, hmacSha256Base64 as aU, buildPolymarketL2Headers as aV, derivePolymarketApiKey as aW, type HttpMethod as aX, type PolymarketL2HeadersInput as aY, type PolymarketL2Headers as aZ, type BuildClobAuthMessageInput as a_, type PredictPosition as aa, type OrderStatus as ab, type OrderSide as ac, type DFlowOrderContext as ad, type PolymarketOrderType as ae, type DepositBuildRequest as af, type DepositBuildResponse as ag, type DepositSubmitRequest as ah, type DepositSubmitResponse as ai, type DepositStatusResponse as aj, type UnsignedTx as ak, type MatchStatus as al, type MatchGroupEntry as am, type MatchGroupMarket as an, type MatchSortField as ao, type MatchesStats as ap, type MatchConfidenceTier as aq, type MatchMarketFlat as ar, type WsChannel as as, type WsChannelEvent as at, type WsClientMessage as au, type WsSubscribeMessage as av, type WsPingMessage as aw, type WsServerMessage as ax, type WsPongMessage as ay, type WsSubscribedMessage as az, type PredictPage as b, NEG_RISK_CTF_EXCHANGE_ADDRESS as b0, USDC_ADDRESS as b1, POLYGON_CHAIN_ID as b2, buildCtfExchangeDomain as b3, CTF_ORDER_TYPES as b4, ORDER_TYPE as b5, SIDE as b6, buildOrderMessage as b7, buildSignedOrder as b8, buildClobPayload as b9, type ClobOrderPayload as ba, type BuildOrderMessageInput as bb, type OrderMessage as bc, type SignedOrder as bd, DEFAULT_PAGE_SIZE as be, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type PositionsResponse as m, type ListOrdersParams as n, type PredictOrder as o, type CancelOrderResult as p, type MatchGroupPage as q, type MatchGroup as r, type MatchMarketParams as s, type MatchMarketPage as t, type ListTradesParams as u, type DFlowQuoteResponse as v, type DFlowSubmitResponse as w, type DFlowSubmitRequest as x, type DFlowKYCStatus as y, type PolymarketSetupStatus as z };
@@ -678,6 +678,13 @@ type WsServerMessage = WsPongMessage | WsSubscribedMessage | WsErrorMessage | Ws
678
678
  interface TickSizeResponse {
679
679
  minimum_tick_size: number;
680
680
  }
681
+ /** Aggregate statistics for all open prediction events. */
682
+ interface EventStats {
683
+ total_events: number;
684
+ total_volume_24h: number;
685
+ avg_liquidity: number;
686
+ active_sources: number;
687
+ }
681
688
 
682
689
  /**
683
690
  * HTTP client for the prediction-server REST API.
@@ -716,6 +723,12 @@ declare class PredictClient {
716
723
  * @throws When the server responds with 404 or any other non-2xx status.
717
724
  */
718
725
  getEvent(slug: string, source?: ProviderSource): Promise<PredictEvent>;
726
+ /**
727
+ * Fetch aggregate statistics for all open events.
728
+ *
729
+ * Maps to `GET /api/v1/events/stats`.
730
+ */
731
+ getEventStats(): Promise<EventStats>;
719
732
  /**
720
733
  * Fetch events similar to the given slug.
721
734
  *
@@ -1410,4 +1423,4 @@ interface ClobOrderPayload {
1410
1423
  */
1411
1424
  declare function buildClobPayload(signedOrder: SignedOrder, owner: string): ClobOrderPayload;
1412
1425
 
1413
- export { type PredictTag as $, type WithdrawSubmitResponse as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStatus as E, type WithdrawSubmitRequest as F, type WithdrawStatusResponse as G, type PolymarketDepositAddresses as H, type PolymarketWithdrawResponse as I, type PolymarketWithdrawRequest as J, type WsConnectionStatus as K, type ListEventsParams as L, type MatchesParams as M, type WsDataMessage as N, type Orderbook as O, PredictClient as P, type WsPriceEvent as Q, type WsOrderbookEvent as R, type SimilarEventsParams as S, type TickSizeResponse as T, type WsTradeEvent as U, type CreateOrderInput as V, type WithdrawBuildResponse as W, createPredictClient as X, createPredictWsClient as Y, type PredictWsClientConfig as Z, type ProviderMeta as _, PredictWsClient as a, NEG_RISK_CTF_EXCHANGE_ADDRESS as a$, type SettlementSource as a0, type MarketStatus as a1, type MarketResult as a2, type MarketOutcome as a3, type OrderbookLevel as a4, type TradeType as a5, type EventSummary as a6, type MarketSummary as a7, type PricePoint as a8, type PredictPosition as a9, type WsErrorMessage as aA, eventQueryKey as aB, fetchEvent as aC, resolveTagSlug as aD, resolveEventsParams as aE, infiniteEventsQueryKey as aF, fetchEventsPage as aG, type ResolveEventsParamsInput as aH, type TagSlugSelection as aI, marketQueryKey as aJ, fetchMarket as aK, matchesQueryKey as aL, matchQueryKey as aM, fetchMatchesPage as aN, matchMarketsQueryKey as aO, fetchMatchMarketsPage as aP, CLOB_AUTH_DOMAIN as aQ, CLOB_AUTH_TYPES as aR, buildClobAuthMessage as aS, hmacSha256Base64 as aT, buildPolymarketL2Headers as aU, derivePolymarketApiKey as aV, type HttpMethod as aW, type PolymarketL2HeadersInput as aX, type PolymarketL2Headers as aY, type BuildClobAuthMessageInput as aZ, CTF_EXCHANGE_ADDRESS as a_, type OrderStatus as aa, type OrderSide as ab, type DFlowOrderContext as ac, type PolymarketOrderType as ad, type DepositBuildRequest as ae, type DepositBuildResponse as af, type DepositSubmitRequest as ag, type DepositSubmitResponse as ah, type DepositStatusResponse as ai, type UnsignedTx as aj, type MatchStatus as ak, type MatchGroupEntry as al, type MatchGroupMarket as am, type MatchSortField as an, type MatchesStats as ao, type MatchConfidenceTier as ap, type MatchMarketFlat as aq, type WsChannel as ar, type WsChannelEvent as as, type WsClientMessage as at, type WsSubscribeMessage as au, type WsPingMessage as av, type WsServerMessage as aw, type WsPongMessage as ax, type WsSubscribedMessage as ay, type WsErrorCode as az, type PredictPage as b, USDC_ADDRESS as b0, POLYGON_CHAIN_ID as b1, buildCtfExchangeDomain as b2, CTF_ORDER_TYPES as b3, ORDER_TYPE as b4, SIDE as b5, buildOrderMessage as b6, buildSignedOrder as b7, buildClobPayload as b8, type ClobOrderPayload as b9, type BuildOrderMessageInput as ba, type OrderMessage as bb, type SignedOrder as bc, DEFAULT_PAGE_SIZE as bd, type PredictEvent as c, type ProviderSource as d, type EventSortField as e, type PredictMarket as f, type ListMarketTradesParams as g, type PredictTrade as h, type PriceHistoryRange as i, type PriceHistoryResponse as j, type ListCandlesticksParams as k, type PositionsResponse as l, type ListOrdersParams as m, type PredictOrder as n, type CancelOrderResult as o, type MatchGroupPage as p, type MatchGroup as q, type MatchMarketParams as r, type MatchMarketPage as s, type ListTradesParams as t, type DFlowQuoteResponse as u, type DFlowSubmitResponse as v, type DFlowSubmitRequest as w, type DFlowKYCStatus as x, type PolymarketSetupStatus as y, type WithdrawBuildRequest as z };
1426
+ export { type ProviderMeta as $, type WithdrawBuildRequest as A, type BalanceResponse as B, type Candlestick as C, type DFlowQuoteRequest as D, type EventStats as E, type WithdrawSubmitResponse as F, type WithdrawSubmitRequest as G, type WithdrawStatusResponse as H, type PolymarketDepositAddresses as I, type PolymarketWithdrawResponse as J, type PolymarketWithdrawRequest as K, type ListEventsParams as L, type MatchesParams as M, type WsConnectionStatus as N, type Orderbook as O, PredictClient as P, type WsDataMessage as Q, type WsPriceEvent as R, type SimilarEventsParams as S, type TickSizeResponse as T, type WsOrderbookEvent as U, type WsTradeEvent as V, type WithdrawBuildResponse as W, type CreateOrderInput as X, createPredictClient as Y, createPredictWsClient as Z, type PredictWsClientConfig as _, PredictWsClient as a, CTF_EXCHANGE_ADDRESS as a$, type PredictTag as a0, type SettlementSource as a1, type MarketStatus as a2, type MarketResult as a3, type MarketOutcome as a4, type OrderbookLevel as a5, type TradeType as a6, type EventSummary as a7, type MarketSummary as a8, type PricePoint as a9, type WsErrorCode as aA, type WsErrorMessage as aB, eventQueryKey as aC, fetchEvent as aD, resolveTagSlug as aE, resolveEventsParams as aF, infiniteEventsQueryKey as aG, fetchEventsPage as aH, type ResolveEventsParamsInput as aI, type TagSlugSelection as aJ, marketQueryKey as aK, fetchMarket as aL, matchesQueryKey as aM, matchQueryKey as aN, fetchMatchesPage as aO, matchMarketsQueryKey as aP, fetchMatchMarketsPage as aQ, CLOB_AUTH_DOMAIN as aR, CLOB_AUTH_TYPES as aS, buildClobAuthMessage as aT, hmacSha256Base64 as aU, buildPolymarketL2Headers as aV, derivePolymarketApiKey as aW, type HttpMethod as aX, type PolymarketL2HeadersInput as aY, type PolymarketL2Headers as aZ, type BuildClobAuthMessageInput as a_, type PredictPosition as aa, type OrderStatus as ab, type OrderSide as ac, type DFlowOrderContext as ad, type PolymarketOrderType as ae, type DepositBuildRequest as af, type DepositBuildResponse as ag, type DepositSubmitRequest as ah, type DepositSubmitResponse as ai, type DepositStatusResponse as aj, type UnsignedTx as ak, type MatchStatus as al, type MatchGroupEntry as am, type MatchGroupMarket as an, type MatchSortField as ao, type MatchesStats as ap, type MatchConfidenceTier as aq, type MatchMarketFlat as ar, type WsChannel as as, type WsChannelEvent as at, type WsClientMessage as au, type WsSubscribeMessage as av, type WsPingMessage as aw, type WsServerMessage as ax, type WsPongMessage as ay, type WsSubscribedMessage as az, type PredictPage as b, NEG_RISK_CTF_EXCHANGE_ADDRESS as b0, USDC_ADDRESS as b1, POLYGON_CHAIN_ID as b2, buildCtfExchangeDomain as b3, CTF_ORDER_TYPES as b4, ORDER_TYPE as b5, SIDE as b6, buildOrderMessage as b7, buildSignedOrder as b8, buildClobPayload as b9, type ClobOrderPayload as ba, type BuildOrderMessageInput as bb, type OrderMessage as bc, type SignedOrder as bd, DEFAULT_PAGE_SIZE as be, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type ListMarketTradesParams as h, type PredictTrade as i, type PriceHistoryRange as j, type PriceHistoryResponse as k, type ListCandlesticksParams as l, type PositionsResponse as m, type ListOrdersParams as n, type PredictOrder as o, type CancelOrderResult as p, type MatchGroupPage as q, type MatchGroup as r, type MatchMarketParams as s, type MatchMarketPage as t, type ListTradesParams as u, type DFlowQuoteResponse as v, type DFlowSubmitResponse as w, type DFlowSubmitRequest as x, type DFlowKYCStatus as y, type PolymarketSetupStatus as z };
package/dist/server.d.mts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, aZ as BuildClobAuthMessageInput, ba as BuildOrderMessageInput, aQ as CLOB_AUTH_DOMAIN, aR as CLOB_AUTH_TYPES, a_ as CTF_EXCHANGE_ADDRESS, b3 as CTF_ORDER_TYPES, o as CancelOrderResult, C as Candlestick, b9 as ClobOrderPayload, V as CreateOrderInput, bd as DEFAULT_PAGE_SIZE, ac as DFlowOrderContext, D as DFlowQuoteRequest, u as DFlowQuoteResponse, w as DFlowSubmitRequest, v as DFlowSubmitResponse, ae as DepositBuildRequest, af as DepositBuildResponse, ai as DepositStatusResponse, ag as DepositSubmitRequest, ah as DepositSubmitResponse, e as EventSortField, E as EventStatus, a6 as EventSummary, aW as HttpMethod, k as ListCandlesticksParams, L as ListEventsParams, g as ListMarketTradesParams, m as ListOrdersParams, t as ListTradesParams, a3 as MarketOutcome, a2 as MarketResult, a1 as MarketStatus, a7 as MarketSummary, ap as MatchConfidenceTier, q as MatchGroup, al as MatchGroupEntry, am as MatchGroupMarket, p as MatchGroupPage, aq as MatchMarketFlat, s as MatchMarketPage, r as MatchMarketParams, an as MatchSortField, ak as MatchStatus, M as MatchesParams, ao as MatchesStats, a$ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b4 as ORDER_TYPE, bb as OrderMessage, ab as OrderSide, aa as OrderStatus, O as Orderbook, a4 as OrderbookLevel, b1 as POLYGON_CHAIN_ID, aY as PolymarketL2Headers, aX as PolymarketL2HeadersInput, ad as PolymarketOrderType, l as PositionsResponse, P as PredictClient, c as PredictEvent, f as PredictMarket, n as PredictOrder, b as PredictPage, a9 as PredictPosition, $ as PredictTag, h as PredictTrade, a as PredictWsClient, Z as PredictWsClientConfig, i as PriceHistoryRange, j as PriceHistoryResponse, a8 as PricePoint, _ as ProviderMeta, d as ProviderSource, aH as ResolveEventsParamsInput, b5 as SIDE, a0 as SettlementSource, bc as SignedOrder, S as SimilarEventsParams, aI as TagSlugSelection, a5 as TradeType, b0 as USDC_ADDRESS, aj as UnsignedTx, ar as WsChannel, as as WsChannelEvent, at as WsClientMessage, K as WsConnectionStatus, N as WsDataMessage, az as WsErrorCode, aA as WsErrorMessage, R as WsOrderbookEvent, av as WsPingMessage, ax as WsPongMessage, Q as WsPriceEvent, aw as WsServerMessage, au as WsSubscribeMessage, ay as WsSubscribedMessage, U as WsTradeEvent, aS as buildClobAuthMessage, b8 as buildClobPayload, b2 as buildCtfExchangeDomain, b6 as buildOrderMessage, aU as buildPolymarketL2Headers, b7 as buildSignedOrder, X as createPredictClient, Y as createPredictWsClient, aV as derivePolymarketApiKey, aB as eventQueryKey, aC as fetchEvent, aG as fetchEventsPage, aK as fetchMarket, aP as fetchMatchMarketsPage, aN as fetchMatchesPage, aT as hmacSha256Base64, aF as infiniteEventsQueryKey, aJ as marketQueryKey, aO as matchMarketsQueryKey, aM as matchQueryKey, aL as matchesQueryKey, aE as resolveEventsParams, aD as resolveTagSlug } from './server-CYqs2N2z.mjs';
1
+ export { B as BalanceResponse, a_ as BuildClobAuthMessageInput, bb as BuildOrderMessageInput, aR as CLOB_AUTH_DOMAIN, aS as CLOB_AUTH_TYPES, a$ as CTF_EXCHANGE_ADDRESS, b4 as CTF_ORDER_TYPES, p as CancelOrderResult, C as Candlestick, ba as ClobOrderPayload, X as CreateOrderInput, be as DEFAULT_PAGE_SIZE, ad as DFlowOrderContext, D as DFlowQuoteRequest, v as DFlowQuoteResponse, x as DFlowSubmitRequest, w as DFlowSubmitResponse, af as DepositBuildRequest, ag as DepositBuildResponse, aj as DepositStatusResponse, ah as DepositSubmitRequest, ai as DepositSubmitResponse, f as EventSortField, e as EventStatus, a7 as EventSummary, aX as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, u as ListTradesParams, a4 as MarketOutcome, a3 as MarketResult, a2 as MarketStatus, a8 as MarketSummary, aq as MatchConfidenceTier, r as MatchGroup, am as MatchGroupEntry, an as MatchGroupMarket, q as MatchGroupPage, ar as MatchMarketFlat, t as MatchMarketPage, s as MatchMarketParams, ao as MatchSortField, al as MatchStatus, M as MatchesParams, ap as MatchesStats, b0 as NEG_RISK_CTF_EXCHANGE_ADDRESS, b5 as ORDER_TYPE, bc as OrderMessage, ac as OrderSide, ab as OrderStatus, O as Orderbook, a5 as OrderbookLevel, b2 as POLYGON_CHAIN_ID, aZ as PolymarketL2Headers, aY as PolymarketL2HeadersInput, ae as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, aa as PredictPosition, a0 as PredictTag, i as PredictTrade, a as PredictWsClient, _ as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, a9 as PricePoint, $ as ProviderMeta, d as ProviderSource, aI as ResolveEventsParamsInput, b6 as SIDE, a1 as SettlementSource, bd as SignedOrder, S as SimilarEventsParams, aJ as TagSlugSelection, a6 as TradeType, b1 as USDC_ADDRESS, ak as UnsignedTx, as as WsChannel, at as WsChannelEvent, au as WsClientMessage, N as WsConnectionStatus, Q as WsDataMessage, aA as WsErrorCode, aB as WsErrorMessage, U as WsOrderbookEvent, aw as WsPingMessage, ay as WsPongMessage, R as WsPriceEvent, ax as WsServerMessage, av as WsSubscribeMessage, az as WsSubscribedMessage, V as WsTradeEvent, aT as buildClobAuthMessage, b9 as buildClobPayload, b3 as buildCtfExchangeDomain, b7 as buildOrderMessage, aV as buildPolymarketL2Headers, b8 as buildSignedOrder, Y as createPredictClient, Z as createPredictWsClient, aW as derivePolymarketApiKey, aC as eventQueryKey, aD as fetchEvent, aH as fetchEventsPage, aL as fetchMarket, aQ as fetchMatchMarketsPage, aO as fetchMatchesPage, aU as hmacSha256Base64, aG as infiniteEventsQueryKey, aK as marketQueryKey, aP as matchMarketsQueryKey, aN as matchQueryKey, aM as matchesQueryKey, aF as resolveEventsParams, aE as resolveTagSlug } from './server-D-WAydlX.mjs';
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, aZ as BuildClobAuthMessageInput, ba as BuildOrderMessageInput, aQ as CLOB_AUTH_DOMAIN, aR as CLOB_AUTH_TYPES, a_ as CTF_EXCHANGE_ADDRESS, b3 as CTF_ORDER_TYPES, o as CancelOrderResult, C as Candlestick, b9 as ClobOrderPayload, V as CreateOrderInput, bd as DEFAULT_PAGE_SIZE, ac as DFlowOrderContext, D as DFlowQuoteRequest, u as DFlowQuoteResponse, w as DFlowSubmitRequest, v as DFlowSubmitResponse, ae as DepositBuildRequest, af as DepositBuildResponse, ai as DepositStatusResponse, ag as DepositSubmitRequest, ah as DepositSubmitResponse, e as EventSortField, E as EventStatus, a6 as EventSummary, aW as HttpMethod, k as ListCandlesticksParams, L as ListEventsParams, g as ListMarketTradesParams, m as ListOrdersParams, t as ListTradesParams, a3 as MarketOutcome, a2 as MarketResult, a1 as MarketStatus, a7 as MarketSummary, ap as MatchConfidenceTier, q as MatchGroup, al as MatchGroupEntry, am as MatchGroupMarket, p as MatchGroupPage, aq as MatchMarketFlat, s as MatchMarketPage, r as MatchMarketParams, an as MatchSortField, ak as MatchStatus, M as MatchesParams, ao as MatchesStats, a$ as NEG_RISK_CTF_EXCHANGE_ADDRESS, b4 as ORDER_TYPE, bb as OrderMessage, ab as OrderSide, aa as OrderStatus, O as Orderbook, a4 as OrderbookLevel, b1 as POLYGON_CHAIN_ID, aY as PolymarketL2Headers, aX as PolymarketL2HeadersInput, ad as PolymarketOrderType, l as PositionsResponse, P as PredictClient, c as PredictEvent, f as PredictMarket, n as PredictOrder, b as PredictPage, a9 as PredictPosition, $ as PredictTag, h as PredictTrade, a as PredictWsClient, Z as PredictWsClientConfig, i as PriceHistoryRange, j as PriceHistoryResponse, a8 as PricePoint, _ as ProviderMeta, d as ProviderSource, aH as ResolveEventsParamsInput, b5 as SIDE, a0 as SettlementSource, bc as SignedOrder, S as SimilarEventsParams, aI as TagSlugSelection, a5 as TradeType, b0 as USDC_ADDRESS, aj as UnsignedTx, ar as WsChannel, as as WsChannelEvent, at as WsClientMessage, K as WsConnectionStatus, N as WsDataMessage, az as WsErrorCode, aA as WsErrorMessage, R as WsOrderbookEvent, av as WsPingMessage, ax as WsPongMessage, Q as WsPriceEvent, aw as WsServerMessage, au as WsSubscribeMessage, ay as WsSubscribedMessage, U as WsTradeEvent, aS as buildClobAuthMessage, b8 as buildClobPayload, b2 as buildCtfExchangeDomain, b6 as buildOrderMessage, aU as buildPolymarketL2Headers, b7 as buildSignedOrder, X as createPredictClient, Y as createPredictWsClient, aV as derivePolymarketApiKey, aB as eventQueryKey, aC as fetchEvent, aG as fetchEventsPage, aK as fetchMarket, aP as fetchMatchMarketsPage, aN as fetchMatchesPage, aT as hmacSha256Base64, aF as infiniteEventsQueryKey, aJ as marketQueryKey, aO as matchMarketsQueryKey, aM as matchQueryKey, aL as matchesQueryKey, aE as resolveEventsParams, aD as resolveTagSlug } from './server-CYqs2N2z.js';
1
+ export { B as BalanceResponse, a_ as BuildClobAuthMessageInput, bb as BuildOrderMessageInput, aR as CLOB_AUTH_DOMAIN, aS as CLOB_AUTH_TYPES, a$ as CTF_EXCHANGE_ADDRESS, b4 as CTF_ORDER_TYPES, p as CancelOrderResult, C as Candlestick, ba as ClobOrderPayload, X as CreateOrderInput, be as DEFAULT_PAGE_SIZE, ad as DFlowOrderContext, D as DFlowQuoteRequest, v as DFlowQuoteResponse, x as DFlowSubmitRequest, w as DFlowSubmitResponse, af as DepositBuildRequest, ag as DepositBuildResponse, aj as DepositStatusResponse, ah as DepositSubmitRequest, ai as DepositSubmitResponse, f as EventSortField, e as EventStatus, a7 as EventSummary, aX as HttpMethod, l as ListCandlesticksParams, L as ListEventsParams, h as ListMarketTradesParams, n as ListOrdersParams, u as ListTradesParams, a4 as MarketOutcome, a3 as MarketResult, a2 as MarketStatus, a8 as MarketSummary, aq as MatchConfidenceTier, r as MatchGroup, am as MatchGroupEntry, an as MatchGroupMarket, q as MatchGroupPage, ar as MatchMarketFlat, t as MatchMarketPage, s as MatchMarketParams, ao as MatchSortField, al as MatchStatus, M as MatchesParams, ap as MatchesStats, b0 as NEG_RISK_CTF_EXCHANGE_ADDRESS, b5 as ORDER_TYPE, bc as OrderMessage, ac as OrderSide, ab as OrderStatus, O as Orderbook, a5 as OrderbookLevel, b2 as POLYGON_CHAIN_ID, aZ as PolymarketL2Headers, aY as PolymarketL2HeadersInput, ae as PolymarketOrderType, m as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, o as PredictOrder, b as PredictPage, aa as PredictPosition, a0 as PredictTag, i as PredictTrade, a as PredictWsClient, _ as PredictWsClientConfig, j as PriceHistoryRange, k as PriceHistoryResponse, a9 as PricePoint, $ as ProviderMeta, d as ProviderSource, aI as ResolveEventsParamsInput, b6 as SIDE, a1 as SettlementSource, bd as SignedOrder, S as SimilarEventsParams, aJ as TagSlugSelection, a6 as TradeType, b1 as USDC_ADDRESS, ak as UnsignedTx, as as WsChannel, at as WsChannelEvent, au as WsClientMessage, N as WsConnectionStatus, Q as WsDataMessage, aA as WsErrorCode, aB as WsErrorMessage, U as WsOrderbookEvent, aw as WsPingMessage, ay as WsPongMessage, R as WsPriceEvent, ax as WsServerMessage, av as WsSubscribeMessage, az as WsSubscribedMessage, V as WsTradeEvent, aT as buildClobAuthMessage, b9 as buildClobPayload, b3 as buildCtfExchangeDomain, b7 as buildOrderMessage, aV as buildPolymarketL2Headers, b8 as buildSignedOrder, Y as createPredictClient, Z as createPredictWsClient, aW as derivePolymarketApiKey, aC as eventQueryKey, aD as fetchEvent, aH as fetchEventsPage, aL as fetchMarket, aQ as fetchMatchMarketsPage, aO as fetchMatchesPage, aU as hmacSha256Base64, aG as infiniteEventsQueryKey, aK as marketQueryKey, aP as matchMarketsQueryKey, aN as matchQueryKey, aM as matchesQueryKey, aF as resolveEventsParams, aE as resolveTagSlug } from './server-D-WAydlX.js';
package/dist/server.js CHANGED
@@ -128,6 +128,15 @@ var PredictClient = class {
128
128
  const url = `${this.endpoint}/api/v1/events/${encodeURIComponent(slug)}${query}`;
129
129
  return await utils.httpGet(url);
130
130
  }
131
+ /**
132
+ * Fetch aggregate statistics for all open events.
133
+ *
134
+ * Maps to `GET /api/v1/events/stats`.
135
+ */
136
+ async getEventStats() {
137
+ const url = `${this.endpoint}/api/v1/events/stats`;
138
+ return await utils.httpGet(url);
139
+ }
131
140
  /**
132
141
  * Fetch events similar to the given slug.
133
142
  *