@liberfi.io/react-predict 0.1.42 → 0.1.44
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.
- package/dist/index.d.mts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{server-CYqs2N2z.d.mts → server-D-WAydlX.d.mts} +14 -1
- package/dist/{server-CYqs2N2z.d.ts → server-D-WAydlX.d.ts} +14 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +9 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +9 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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,
|
|
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,
|
|
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
|
*
|