@liberfi.io/react-predict 0.1.63 → 0.1.64
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 +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{server-exUYV2o0.d.mts → server-BJChohWB.d.mts} +9 -1
- package/dist/{server-exUYV2o0.d.ts → server-BJChohWB.d.ts} +9 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +6 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +6 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
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 Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as TickSizeResponse, V as
|
|
2
|
-
export {
|
|
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 Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-BJChohWB.mjs';
|
|
2
|
+
export { b5 as BuildClobAuthMessageInput, bi as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, bh as ClobOrderPayload, ai as DFlowOrderContext, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, ac as EventSummary, b2 as HttpMethod, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, at as MatchGroupEntry, au as MatchGroupMarket, ay as MatchMarketFlat, av as MatchSortField, as as MatchStatus, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bj as OrderMessage, ah as OrderSide, ag as OrderStatus, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, aq as PolymarketWithdrawPrepareRequest, ar as PolymarketWithdrawPrepareResponse, af as PredictPosition, a5 as PredictTag, a3 as PredictWsClientConfig, ae as PricePoint, a4 as ProviderMeta, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bk as SignedOrder, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, aH as WsErrorCode, aI as WsErrorMessage, aD as WsPingMessage, aF as WsPongMessage, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-BJChohWB.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';
|
|
@@ -623,6 +623,15 @@ declare function tickSizeQueryKey(tokenId: string): unknown[];
|
|
|
623
623
|
*/
|
|
624
624
|
declare function useTickSize(tokenId?: string, queryOptions?: Omit<UseQueryOptions<TickSizeResponse, Error, TickSizeResponse, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<TickSizeResponse, Error>;
|
|
625
625
|
|
|
626
|
+
declare function feeRateQueryKey(tokenId: string): unknown[];
|
|
627
|
+
/**
|
|
628
|
+
* Query hook that fetches the base fee rate (bps) for a Polymarket token.
|
|
629
|
+
*
|
|
630
|
+
* @param tokenId - Polymarket CLOB token ID (asset ID).
|
|
631
|
+
* @param queryOptions - React Query options (pass `enabled` to control when the query runs).
|
|
632
|
+
*/
|
|
633
|
+
declare function useFeeRate(tokenId?: string, queryOptions?: Omit<UseQueryOptions<FeeRateResponse, Error, FeeRateResponse, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<FeeRateResponse, Error>;
|
|
634
|
+
|
|
626
635
|
interface UsePredictWsClientResult {
|
|
627
636
|
/** The WebSocket client instance, or `null` if not provided via `PredictProvider`. */
|
|
628
637
|
wsClient: PredictWsClient | null;
|
|
@@ -856,4 +865,4 @@ interface CreatePolymarketOrderVariables {
|
|
|
856
865
|
*/
|
|
857
866
|
declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
|
|
858
867
|
|
|
859
|
-
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
|
|
868
|
+
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
|
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 Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as TickSizeResponse, V as
|
|
2
|
-
export {
|
|
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 Orderbook, h as ListMarketTradesParams, i as PredictTrade, j as PriceHistoryRange, k as PriceHistoryResponse, l as ListCandlesticksParams, C as Candlestick, m as PositionsResponse, A as AvailableSharesResponse, B as BalanceResponse, n as ListOrdersParams, o as PredictOrder, p as ListOrdersMultiParams, q as PredictOrdersResponse, r as CancelOrderResult, M as MatchesParams, s as MatchGroupPage, t as MatchGroup, u as MatchMarketParams, v as MatchMarketPage, w as ListTradesParams, x as ListTradesMultiParams, D as DFlowQuoteRequest, y as DFlowQuoteResponse, z as DFlowSubmitResponse, F as DFlowSubmitRequest, G as DFlowKYCStatus, H as PolymarketSetupStatus, W as WithdrawBuildResponse, I as WithdrawBuildRequest, J as WithdrawSubmitResponse, K as WithdrawSubmitRequest, N as WithdrawStatusResponse, Q as PolymarketDepositAddresses, R as PolymarketWithdrawResponse, T as PolymarketWithdrawRequest, U as TickSizeResponse, V as FeeRateResponse, X as WsConnectionStatus, Y as WsDataMessage, Z as WsPriceEvent, _ as WsOrderbookEvent, $ as WsTradeEvent, a0 as CreateOrderInput } from './server-BJChohWB.js';
|
|
2
|
+
export { b5 as BuildClobAuthMessageInput, bi as BuildOrderMessageInput, aY as CLOB_AUTH_DOMAIN, aZ as CLOB_AUTH_TYPES, b6 as CTF_EXCHANGE_ADDRESS, bb as CTF_ORDER_TYPES, bh as ClobOrderPayload, ai as DFlowOrderContext, ak as DepositBuildRequest, al as DepositBuildResponse, ao as DepositStatusResponse, am as DepositSubmitRequest, an as DepositSubmitResponse, ac as EventSummary, b2 as HttpMethod, a9 as MarketOutcome, a8 as MarketResult, a7 as MarketStatus, ad as MarketSummary, ax as MatchConfidenceTier, at as MatchGroupEntry, au as MatchGroupMarket, ay as MatchMarketFlat, av as MatchSortField, as as MatchStatus, aw as MatchesStats, b7 as NEG_RISK_CTF_EXCHANGE_ADDRESS, bc as ORDER_TYPE, bj as OrderMessage, ah as OrderSide, ag as OrderStatus, aa as OrderbookLevel, b9 as POLYGON_CHAIN_ID, b4 as PolymarketL2Headers, b3 as PolymarketL2HeadersInput, aj as PolymarketOrderType, aq as PolymarketWithdrawPrepareRequest, ar as PolymarketWithdrawPrepareResponse, af as PredictPosition, a5 as PredictTag, a3 as PredictWsClientConfig, ae as PricePoint, a4 as ProviderMeta, aP as ResolveEventsParamsInput, bd as SIDE, a6 as SettlementSource, bk as SignedOrder, aQ as TagSlugSelection, ab as TradeType, b8 as USDC_ADDRESS, ap as UnsignedTx, az as WsChannel, aA as WsChannelEvent, aB as WsClientMessage, aH as WsErrorCode, aI as WsErrorMessage, aD as WsPingMessage, aF as WsPongMessage, aE as WsServerMessage, aC as WsSubscribeMessage, aG as WsSubscribedMessage, a_ as buildClobAuthMessage, bg as buildClobPayload, ba as buildCtfExchangeDomain, be as buildOrderMessage, b0 as buildPolymarketL2Headers, bf as buildSignedOrder, a1 as createPredictClient, a2 as createPredictWsClient, b1 as derivePolymarketApiKey, aJ as eventQueryKey, aK as fetchEvent, aO as fetchEventsPage, aS as fetchMarket, aX as fetchMatchMarketsPage, aV as fetchMatchesPage, a$ as hmacSha256Base64, aN as infiniteEventsQueryKey, aR as marketQueryKey, aW as matchMarketsQueryKey, aU as matchQueryKey, aT as matchesQueryKey, aM as resolveEventsParams, aL as resolveTagSlug } from './server-BJChohWB.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';
|
|
@@ -623,6 +623,15 @@ declare function tickSizeQueryKey(tokenId: string): unknown[];
|
|
|
623
623
|
*/
|
|
624
624
|
declare function useTickSize(tokenId?: string, queryOptions?: Omit<UseQueryOptions<TickSizeResponse, Error, TickSizeResponse, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<TickSizeResponse, Error>;
|
|
625
625
|
|
|
626
|
+
declare function feeRateQueryKey(tokenId: string): unknown[];
|
|
627
|
+
/**
|
|
628
|
+
* Query hook that fetches the base fee rate (bps) for a Polymarket token.
|
|
629
|
+
*
|
|
630
|
+
* @param tokenId - Polymarket CLOB token ID (asset ID).
|
|
631
|
+
* @param queryOptions - React Query options (pass `enabled` to control when the query runs).
|
|
632
|
+
*/
|
|
633
|
+
declare function useFeeRate(tokenId?: string, queryOptions?: Omit<UseQueryOptions<FeeRateResponse, Error, FeeRateResponse, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<FeeRateResponse, Error>;
|
|
634
|
+
|
|
626
635
|
interface UsePredictWsClientResult {
|
|
627
636
|
/** The WebSocket client instance, or `null` if not provided via `PredictProvider`. */
|
|
628
637
|
wsClient: PredictWsClient | null;
|
|
@@ -856,4 +865,4 @@ interface CreatePolymarketOrderVariables {
|
|
|
856
865
|
*/
|
|
857
866
|
declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
|
|
858
867
|
|
|
859
|
-
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
|
|
868
|
+
export { AvailableSharesResponse, BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, FeeRateResponse, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersMultiParams, ListOrdersParams, ListTradesMultiParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, MatchGroup, MatchGroupPage, MatchMarketPage, MatchMarketParams, MatchesParams, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketDepositAddresses, type PolymarketDepositResult, type PolymarketDepositVariables, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PolymarketWithdrawRequest, PolymarketWithdrawResponse, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictOrdersResponse, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, TickSizeResponse, type UseAvailableSharesOptions, type UseAvailableSharesParams, type UseBalanceParams, type UseCancelOrderOptions, type UseCandlesticksParams, type UseEventParams, type UseInfiniteMatchMarketsParams, type UseInfiniteMatchesParams, type UseInfiniteOrdersOptions, type UseInfiniteOrdersParams, type UseInfiniteTradesMultiParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UseOrdersMultiOptions, type UseOrdersOptions, type UsePositionsMultiParams, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, type UseWithdrawStatusQueryParams, WithdrawBuildRequest, WithdrawBuildResponse, WithdrawStatusResponse, WithdrawSubmitRequest, WithdrawSubmitResponse, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, availableSharesQueryKey, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventStatsQueryKey, eventsQueryKey, feeRateQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesMultiQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersMultiQueryKey, ordersQueryKey, polymarketDepositAddressesQueryKey, polymarketSetupQueryKey, positionsMultiQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tickSizeQueryKey, tradesQueryKey, useAvailableShares, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useFeeRate, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useInfiniteTradesMulti, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrderbookSubscription, useOrders, useOrdersMulti, usePolymarket, usePolymarketDeposit, usePolymarketDepositAddresses, usePolymarketSetup, usePolymarketWithdraw, usePositions, usePositionsMulti, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useRunPolymarketSetup, useSearchEvents, useSimilarEvents, useTickSize, useTrades, useTradesSubscription, useWithdrawBuildMutation, useWithdrawStatusQuery, useWithdrawSubmitMutation, withdrawStatusQueryKey };
|
package/dist/index.js
CHANGED
|
@@ -257,6 +257,11 @@ var PredictClient = class {
|
|
|
257
257
|
const url = `${this.endpoint}/api/v1/polymarket/tick-size?token_id=${encodeURIComponent(tokenId)}`;
|
|
258
258
|
return await utils.httpGet(url);
|
|
259
259
|
}
|
|
260
|
+
/** Maps to `GET /api/v1/polymarket/fee-rate?token_id=xxx`. */
|
|
261
|
+
async getPolymarketFeeRate(tokenId) {
|
|
262
|
+
const url = `${this.endpoint}/api/v1/polymarket/fee-rate?token_id=${encodeURIComponent(tokenId)}`;
|
|
263
|
+
return await utils.httpGet(url);
|
|
264
|
+
}
|
|
260
265
|
// -------------------------------------------------------------------------
|
|
261
266
|
// DFlow trading
|
|
262
267
|
// -------------------------------------------------------------------------
|
|
@@ -1722,6 +1727,19 @@ function useTickSize(tokenId, queryOptions = {}) {
|
|
|
1722
1727
|
...queryOptions
|
|
1723
1728
|
});
|
|
1724
1729
|
}
|
|
1730
|
+
function feeRateQueryKey(tokenId) {
|
|
1731
|
+
return ["predict", "polymarket", "fee-rate", tokenId];
|
|
1732
|
+
}
|
|
1733
|
+
function useFeeRate(tokenId, queryOptions = {}) {
|
|
1734
|
+
const client = usePredictClient();
|
|
1735
|
+
return reactQuery.useQuery({
|
|
1736
|
+
queryKey: feeRateQueryKey(tokenId ?? ""),
|
|
1737
|
+
queryFn: () => client.getPolymarketFeeRate(tokenId),
|
|
1738
|
+
enabled: !!tokenId,
|
|
1739
|
+
staleTime: 5 * 6e4,
|
|
1740
|
+
...queryOptions
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1725
1743
|
function usePredictWsClient() {
|
|
1726
1744
|
const context = react.useContext(PredictContext);
|
|
1727
1745
|
if (!context) {
|
|
@@ -2089,7 +2107,7 @@ function buildOrderMessage(input) {
|
|
|
2089
2107
|
takerAmount,
|
|
2090
2108
|
expiration: String(input.expiration ?? 0),
|
|
2091
2109
|
nonce: "0",
|
|
2092
|
-
feeRateBps: "0",
|
|
2110
|
+
feeRateBps: input.feeRateBps ?? "0",
|
|
2093
2111
|
side,
|
|
2094
2112
|
signatureType: input.signatureType
|
|
2095
2113
|
};
|
|
@@ -2244,6 +2262,7 @@ exports.dflowQuoteQueryKey = dflowQuoteQueryKey;
|
|
|
2244
2262
|
exports.eventQueryKey = eventQueryKey;
|
|
2245
2263
|
exports.eventStatsQueryKey = eventStatsQueryKey;
|
|
2246
2264
|
exports.eventsQueryKey = eventsQueryKey;
|
|
2265
|
+
exports.feeRateQueryKey = feeRateQueryKey;
|
|
2247
2266
|
exports.fetchEvent = fetchEvent;
|
|
2248
2267
|
exports.fetchEvents = fetchEvents;
|
|
2249
2268
|
exports.fetchEventsPage = fetchEventsPage;
|
|
@@ -2285,6 +2304,7 @@ exports.useDFlowSubmit = useDFlowSubmit;
|
|
|
2285
2304
|
exports.useEvent = useEvent;
|
|
2286
2305
|
exports.useEventStats = useEventStats;
|
|
2287
2306
|
exports.useEvents = useEvents;
|
|
2307
|
+
exports.useFeeRate = useFeeRate;
|
|
2288
2308
|
exports.useInfiniteEvents = useInfiniteEvents;
|
|
2289
2309
|
exports.useInfiniteMatchMarkets = useInfiniteMatchMarkets;
|
|
2290
2310
|
exports.useInfiniteMatches = useInfiniteMatches;
|