@liberfi.io/react-predict 0.3.46 → 0.3.47

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-BYvRRFCr.mjs';
2
- export { bv as BuildClobAuthMessageInput, bJ as BuildOrderMessageInput, bm as CLOB_AUTH_DOMAIN, bn as CLOB_AUTH_TYPES, bw as CTF_EXCHANGE_ADDRESS, bB as CTF_ORDER_TYPES, bI as ClobOrderPayload, az as DFlowOrderContext, aD as DepositBuildRequest, aE as DepositBuildResponse, aH as DepositStatusResponse, aF as DepositSubmitRequest, aG as DepositSubmitResponse, as as EventSummary, bs as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, at as MarketSummary, aS as MatchConfidenceTier, aO as MatchGroupEntry, aP as MatchGroupMarket, aU as MatchLeg, aV as MatchMarketFlat, aQ as MatchSortField, aN as MatchStatus, aR as MatchesStats, bx as NEG_RISK_CTF_EXCHANGE_ADDRESS, bC as ORDER_TYPE, bK as OrderMessage, ay as OrderSide, ax as OrderStatus, aq as OrderbookLevel, bz as POLYGON_CHAIN_ID, aJ as PolymarketBridgeToken, aC as PolymarketDepositWalletDeployRequest, bu as PolymarketL2Headers, bt as PolymarketL2HeadersInput, aA as PolymarketOrderType, b6 as PolymarketRedeemInput, b4 as PolymarketRedeemPrepareInput, b5 as PolymarketRedeemPrepareResponse, aK as PolymarketSupportedAssetsResponse, aL as PolymarketTypedData, aM as PolymarketTypedDataArg, aB as PolymarketWalletKind, au as PredictCommentProfile, aw as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, av as PricePoint, ak as ProviderMeta, bd as ResolveEventsParamsInput, bD as SIDE, am as SettlementSource, aT as SignalTag, bL as SignedOrder, be as TagSlugSelection, ar as TradeType, by as USDC_ADDRESS, aI as UnsignedTx, aW as WsChannel, aX as WsChannelEvent, aY as WsClientMessage, b2 as WsErrorCode, b3 as WsErrorMessage, a_ as WsPingMessage, b0 as WsPongMessage, a$ as WsServerMessage, aZ as WsSubscribeMessage, b1 as WsSubscribedMessage, bo as buildClobAuthMessage, bG as buildClobPayload, bA as buildCtfExchangeDomain, bE as buildOrderMessage, bq as buildPolymarketL2Headers, bF as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, br as derivePolymarketApiKey, b7 as eventQueryKey, b8 as fetchEvent, bc as fetchEventsPage, bg as fetchMarket, bl as fetchMatchMarketsPage, bj as fetchMatchesPage, bH as getPolymarketSharesPrecision, bp as hmacSha256Base64, bb as infiniteEventsQueryKey, bf as marketQueryKey, bk as matchMarketsQueryKey, bi as matchQueryKey, bh as matchesQueryKey, ba as resolveEventsParams, b9 as resolveTagSlug } from './server-BYvRRFCr.mjs';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-Byq4PK9C.mjs';
2
+ export { bz as BuildClobAuthMessageInput, bN as BuildOrderMessageInput, bq as CLOB_AUTH_DOMAIN, br as CLOB_AUTH_TYPES, bA as CTF_EXCHANGE_ADDRESS, bF as CTF_ORDER_TYPES, bM as ClobOrderPayload, aD as DFlowOrderContext, aH as DepositBuildRequest, aI as DepositBuildResponse, aL as DepositStatusResponse, aJ as DepositSubmitRequest, aK as DepositSubmitResponse, aw as EventSummary, bw as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, ax as MarketSummary, aW as MatchConfidenceTier, aS as MatchGroupEntry, aT as MatchGroupMarket, aY as MatchLeg, aZ as MatchMarketFlat, aU as MatchSortField, aR as MatchStatus, aV as MatchesStats, bB as NEG_RISK_CTF_EXCHANGE_ADDRESS, bG as ORDER_TYPE, bO as OrderMessage, aC as OrderSide, aB as OrderStatus, ar as OrderbookBatchItem, as as OrderbookBatchResult, aq as OrderbookLevel, at as OrderbooksBatchRequest, au as OrderbooksBatchResponse, bD as POLYGON_CHAIN_ID, aN as PolymarketBridgeToken, aG as PolymarketDepositWalletDeployRequest, by as PolymarketL2Headers, bx as PolymarketL2HeadersInput, aE as PolymarketOrderType, ba as PolymarketRedeemInput, b8 as PolymarketRedeemPrepareInput, b9 as PolymarketRedeemPrepareResponse, aO as PolymarketSupportedAssetsResponse, aP as PolymarketTypedData, aQ as PolymarketTypedDataArg, aF as PolymarketWalletKind, ay as PredictCommentProfile, aA as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, az as PricePoint, ak as ProviderMeta, bh as ResolveEventsParamsInput, bH as SIDE, am as SettlementSource, aX as SignalTag, bP as SignedOrder, bi as TagSlugSelection, av as TradeType, bC as USDC_ADDRESS, aM as UnsignedTx, a_ as WsChannel, a$ as WsChannelEvent, b0 as WsClientMessage, b6 as WsErrorCode, b7 as WsErrorMessage, b2 as WsPingMessage, b4 as WsPongMessage, b3 as WsServerMessage, b1 as WsSubscribeMessage, b5 as WsSubscribedMessage, bs as buildClobAuthMessage, bK as buildClobPayload, bE as buildCtfExchangeDomain, bI as buildOrderMessage, bu as buildPolymarketL2Headers, bJ as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, bv as derivePolymarketApiKey, bb as eventQueryKey, bc as fetchEvent, bg as fetchEventsPage, bk as fetchMarket, bp as fetchMatchMarketsPage, bn as fetchMatchesPage, bL as getPolymarketSharesPrecision, bt as hmacSha256Base64, bf as infiniteEventsQueryKey, bj as marketQueryKey, bo as matchMarketsQueryKey, bm as matchQueryKey, bl as matchesQueryKey, be as resolveEventsParams, bd as resolveTagSlug } from './server-Byq4PK9C.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren } from 'react';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-BYvRRFCr.js';
2
- export { bv as BuildClobAuthMessageInput, bJ as BuildOrderMessageInput, bm as CLOB_AUTH_DOMAIN, bn as CLOB_AUTH_TYPES, bw as CTF_EXCHANGE_ADDRESS, bB as CTF_ORDER_TYPES, bI as ClobOrderPayload, az as DFlowOrderContext, aD as DepositBuildRequest, aE as DepositBuildResponse, aH as DepositStatusResponse, aF as DepositSubmitRequest, aG as DepositSubmitResponse, as as EventSummary, bs as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, at as MarketSummary, aS as MatchConfidenceTier, aO as MatchGroupEntry, aP as MatchGroupMarket, aU as MatchLeg, aV as MatchMarketFlat, aQ as MatchSortField, aN as MatchStatus, aR as MatchesStats, bx as NEG_RISK_CTF_EXCHANGE_ADDRESS, bC as ORDER_TYPE, bK as OrderMessage, ay as OrderSide, ax as OrderStatus, aq as OrderbookLevel, bz as POLYGON_CHAIN_ID, aJ as PolymarketBridgeToken, aC as PolymarketDepositWalletDeployRequest, bu as PolymarketL2Headers, bt as PolymarketL2HeadersInput, aA as PolymarketOrderType, b6 as PolymarketRedeemInput, b4 as PolymarketRedeemPrepareInput, b5 as PolymarketRedeemPrepareResponse, aK as PolymarketSupportedAssetsResponse, aL as PolymarketTypedData, aM as PolymarketTypedDataArg, aB as PolymarketWalletKind, au as PredictCommentProfile, aw as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, av as PricePoint, ak as ProviderMeta, bd as ResolveEventsParamsInput, bD as SIDE, am as SettlementSource, aT as SignalTag, bL as SignedOrder, be as TagSlugSelection, ar as TradeType, by as USDC_ADDRESS, aI as UnsignedTx, aW as WsChannel, aX as WsChannelEvent, aY as WsClientMessage, b2 as WsErrorCode, b3 as WsErrorMessage, a_ as WsPingMessage, b0 as WsPongMessage, a$ as WsServerMessage, aZ as WsSubscribeMessage, b1 as WsSubscribedMessage, bo as buildClobAuthMessage, bG as buildClobPayload, bA as buildCtfExchangeDomain, bE as buildOrderMessage, bq as buildPolymarketL2Headers, bF as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, br as derivePolymarketApiKey, b7 as eventQueryKey, b8 as fetchEvent, bc as fetchEventsPage, bg as fetchMarket, bl as fetchMatchMarketsPage, bj as fetchMatchesPage, bH as getPolymarketSharesPrecision, bp as hmacSha256Base64, bb as infiniteEventsQueryKey, bf as marketQueryKey, bk as matchMarketsQueryKey, bi as matchQueryKey, bh as matchesQueryKey, ba as resolveEventsParams, b9 as resolveTagSlug } from './server-BYvRRFCr.js';
1
+ import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStats, e as EventStatus, f as EventSortField, S as SimilarEventsParams, g as PredictMarket, O as OrderbookOutcome, h as Orderbook, i as ListMarketTradesParams, j as PredictTrade, k as PriceHistoryRange, l as PriceHistoryResponse, m as ListCandlesticksParams, C as Candlestick, n as ListCommentsParams, o as PredictComment, p as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, q as ListOrdersParams, r as PredictOrder, s as ListOrdersMultiParams, t as PredictOrdersResponse, u as CancelOrderResult, M as MatchesParams, v as MatchGroupPage, w as MatchGroup, x as MatchMarketParams, y as MatchMarketPage, z as ListTradesParams, D as ListTradesMultiParams, F as DFlowQuoteRequest, G as DFlowQuoteResponse, H as DFlowSubmitResponse, I as DFlowSubmitRequest, J as DFlowKYCStatus, K as PolymarketSetupStatus, N as PolymarketDepositWalletDeployResponse, W as WithdrawBuildResponse, Q as WithdrawBuildRequest, R as WithdrawSubmitResponse, T as WithdrawSubmitRequest, U as WithdrawStatusResponse, V as PolymarketDepositAddresses, X as PolymarketSupportedAsset, Y as PolymarketWithdrawResponse, Z as PolymarketWithdrawRequest, _ as PolymarketWithdrawPrepareResponse, $ as PolymarketWithdrawPrepareRequest, a0 as PolymarketWithdrawQuoteResponse, a1 as PolymarketWithdrawQuoteRequest, a2 as PolymarketWithdrawRelayBuildResponse, a3 as PolymarketWithdrawRelayBuildRequest, a4 as PolymarketWithdrawRelaySubmitResponse, a5 as PolymarketWithdrawRelaySubmitRequest, a6 as PolymarketWithdrawBridgeStatusResponse, a7 as PolymarketRedeemResponse, a8 as TickSizeResponse, a9 as FeeRateResponse, aa as RebateConfig, ab as WsConnectionStatus, ac as WsDataMessage, ad as WsPriceEvent, ae as WsOrderbookEvent, af as WsTradeEvent, ag as CreateOrderInput } from './server-Byq4PK9C.js';
2
+ export { bz as BuildClobAuthMessageInput, bN as BuildOrderMessageInput, bq as CLOB_AUTH_DOMAIN, br as CLOB_AUTH_TYPES, bA as CTF_EXCHANGE_ADDRESS, bF as CTF_ORDER_TYPES, bM as ClobOrderPayload, aD as DFlowOrderContext, aH as DepositBuildRequest, aI as DepositBuildResponse, aL as DepositStatusResponse, aJ as DepositSubmitRequest, aK as DepositSubmitResponse, aw as EventSummary, bw as HttpMethod, ap as MarketOutcome, ao as MarketResult, an as MarketStatus, ax as MarketSummary, aW as MatchConfidenceTier, aS as MatchGroupEntry, aT as MatchGroupMarket, aY as MatchLeg, aZ as MatchMarketFlat, aU as MatchSortField, aR as MatchStatus, aV as MatchesStats, bB as NEG_RISK_CTF_EXCHANGE_ADDRESS, bG as ORDER_TYPE, bO as OrderMessage, aC as OrderSide, aB as OrderStatus, ar as OrderbookBatchItem, as as OrderbookBatchResult, aq as OrderbookLevel, at as OrderbooksBatchRequest, au as OrderbooksBatchResponse, bD as POLYGON_CHAIN_ID, aN as PolymarketBridgeToken, aG as PolymarketDepositWalletDeployRequest, by as PolymarketL2Headers, bx as PolymarketL2HeadersInput, aE as PolymarketOrderType, ba as PolymarketRedeemInput, b8 as PolymarketRedeemPrepareInput, b9 as PolymarketRedeemPrepareResponse, aO as PolymarketSupportedAssetsResponse, aP as PolymarketTypedData, aQ as PolymarketTypedDataArg, aF as PolymarketWalletKind, ay as PredictCommentProfile, aA as PredictPosition, al as PredictTag, aj as PredictWsClientConfig, az as PricePoint, ak as ProviderMeta, bh as ResolveEventsParamsInput, bH as SIDE, am as SettlementSource, aX as SignalTag, bP as SignedOrder, bi as TagSlugSelection, av as TradeType, bC as USDC_ADDRESS, aM as UnsignedTx, a_ as WsChannel, a$ as WsChannelEvent, b0 as WsClientMessage, b6 as WsErrorCode, b7 as WsErrorMessage, b2 as WsPingMessage, b4 as WsPongMessage, b3 as WsServerMessage, b1 as WsSubscribeMessage, b5 as WsSubscribedMessage, bs as buildClobAuthMessage, bK as buildClobPayload, bE as buildCtfExchangeDomain, bI as buildOrderMessage, bu as buildPolymarketL2Headers, bJ as buildSignedOrder, ah as createPredictClient, ai as createPredictWsClient, bv as derivePolymarketApiKey, bb as eventQueryKey, bc as fetchEvent, bg as fetchEventsPage, bk as fetchMarket, bp as fetchMatchMarketsPage, bn as fetchMatchesPage, bL as getPolymarketSharesPrecision, bt as hmacSha256Base64, bf as infiniteEventsQueryKey, bj as marketQueryKey, bo as matchMarketsQueryKey, bm as matchQueryKey, bl as matchesQueryKey, be as resolveEventsParams, bd as resolveTagSlug } from './server-Byq4PK9C.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren } from 'react';
package/dist/index.js CHANGED
@@ -115,6 +115,17 @@ var PredictClient = class {
115
115
  const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/orderbook${query}`;
116
116
  return await utils.httpGet(url);
117
117
  }
118
+ /**
119
+ * Maps to `POST /api/v1/markets/orderbooks`.
120
+ * Fetches order books for many markets in a single request (max 100 items).
121
+ * Results are returned in the same order as `items`; per-item failures are
122
+ * reported via `OrderbookBatchResult.error` and never fail the whole batch.
123
+ */
124
+ async getOrderbooks(items) {
125
+ const url = `${this.endpoint}/api/v1/markets/orderbooks`;
126
+ const res = await utils.httpPost(url, { items });
127
+ return res.results;
128
+ }
118
129
  /** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
119
130
  async listMarketTrades(slug, params) {
120
131
  const query = buildQuery(params);