@liberfi.io/react-predict 0.3.66 → 0.3.67

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.
@@ -333,7 +333,18 @@ interface PriceHistoryResponse {
333
333
  points: PricePoint[];
334
334
  }
335
335
  /** Accepted values for the `range` query parameter. */
336
- type PriceHistoryRange = "1d" | "1w" | "1m" | "all";
336
+ type PriceHistoryRange = "1h" | "6h" | "1d" | "1w" | "1m" | "all";
337
+ /** Query parameters for `GET /api/v1/markets/{slug}/price-history`. */
338
+ interface PriceHistoryParams {
339
+ source: ProviderSource;
340
+ range?: PriceHistoryRange;
341
+ /** Unix seconds. Mirrors Polymarket `startTs`. */
342
+ startTs?: number;
343
+ /** Unix seconds. Mirrors Polymarket `endTs`. */
344
+ endTs?: number;
345
+ /** Data accuracy in minutes. Mirrors Polymarket `fidelity`. */
346
+ fidelity?: number;
347
+ }
337
348
  /** OHLCV candlestick data point. */
338
349
  interface Candlestick {
339
350
  timestamp: string;
@@ -1281,7 +1292,7 @@ declare class PredictClient {
1281
1292
  /** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
1282
1293
  listMarketTrades(slug: string, params: ListMarketTradesParams): Promise<PredictPage<PredictTrade>>;
1283
1294
  /** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
1284
- getPriceHistory(slug: string, source: ProviderSource, range?: PriceHistoryRange): Promise<PriceHistoryResponse>;
1295
+ getPriceHistory(slug: string, sourceOrParams: ProviderSource | PriceHistoryParams, range?: PriceHistoryRange): Promise<PriceHistoryResponse>;
1285
1296
  /** Maps to `GET /api/v1/markets/:slug/candlesticks?interval=...&limit=...`. */
1286
1297
  listCandlesticks(slug: string, params?: ListCandlesticksParams): Promise<Candlestick[]>;
1287
1298
  /**
@@ -2110,4 +2121,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2110
2121
  */
2111
2122
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2112
2123
 
2113
- export { type PolymarketWithdrawPrepareResponse as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesParams as D, type EventStats as E, type ListTradesMultiParams as F, type DFlowQuoteRequest as G, type DFlowQuoteResponse as H, type DFlowSubmitResponse as I, type DFlowSubmitRequest as J, type DFlowKYCStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketSetupStatus as N, type OrderbookOutcome as O, PredictClient as P, type PolymarketDepositWalletDeployResponse as Q, type WithdrawBuildRequest as R, type SimilarEventsParams as S, type WithdrawSubmitResponse as T, type WithdrawSubmitRequest as U, type WithdrawStatusResponse as V, type WithdrawBuildResponse as W, type PolymarketDepositAddresses as X, type PolymarketSupportedAsset as Y, type PolymarketWithdrawResponse as Z, type PolymarketWithdrawRequest as _, PredictWsClient as a, type MatchConfidenceTier as a$, type PolymarketWithdrawPrepareRequest as a0, type PolymarketWithdrawQuoteResponse as a1, type PolymarketWithdrawQuoteRequest as a2, type PolymarketWithdrawRelayBuildResponse as a3, type PolymarketWithdrawRelayBuildRequest as a4, type PolymarketWithdrawRelaySubmitResponse as a5, type PolymarketWithdrawRelaySubmitRequest as a6, type PolymarketWithdrawBridgeStatusResponse as a7, type PolymarketRedeemResponse as a8, type PolymarketTypedData as a9, type MarketSummary as aA, type PredictCommentProfile as aB, type PricePoint as aC, type PredictPosition as aD, type PositionValue as aE, type PositionValueError as aF, type OrderStatus as aG, type OrderSide as aH, type DFlowOrderContext as aI, type PolymarketOrderType as aJ, type PolymarketTickSize as aK, type PolymarketWalletKind as aL, type PolymarketDepositWalletDeployRequest as aM, type DepositBuildRequest as aN, type DepositBuildResponse as aO, type DepositSubmitRequest as aP, type DepositSubmitResponse as aQ, type DepositStatusResponse as aR, type UnsignedTx as aS, type PolymarketBridgeToken as aT, type PolymarketSupportedAssetsResponse as aU, type PolymarketTypedDataArg as aV, type MatchStatus as aW, type MatchGroupEntry as aX, type MatchGroupMarket as aY, type MatchSortField as aZ, type MatchesStats as a_, type TickSizeResponse as aa, type FeeRateResponse as ab, type RebateConfig as ac, type WsConnectionStatus as ad, type WsDataMessage as ae, type WsPriceEvent as af, type WsOrderbookEvent as ag, type WsTradeEvent as ah, type CreateOrderInput as ai, createPredictClient as aj, type PredictClientOptions as ak, createPredictWsClient as al, type PredictWsClientConfig as am, type ProviderMeta as an, type PredictTag as ao, type SettlementSource as ap, type MarketStatus as aq, type MarketResult as ar, type MarketOutcome as as, type OrderbookLevel as at, type OrderbookBatchItem as au, type OrderbookBatchResult as av, type OrderbooksBatchRequest as aw, type OrderbooksBatchResponse as ax, type TradeType as ay, type EventSummary as az, type PredictPage as b, type SignalTag as b0, type MatchLeg as b1, type MatchMarketFlat as b2, type WsChannel as b3, type WsChannelEvent as b4, type WsClientMessage as b5, type WsSubscribeMessage as b6, type WsPingMessage as b7, type WsServerMessage as b8, type WsPongMessage as b9, derivePolymarketApiKey as bA, type HttpMethod as bB, type PolymarketL2HeadersInput as bC, type PolymarketL2Headers as bD, type BuildClobAuthMessageInput as bE, CTF_EXCHANGE_ADDRESS as bF, NEG_RISK_CTF_EXCHANGE_ADDRESS as bG, USDC_ADDRESS as bH, POLYGON_CHAIN_ID as bI, buildCtfExchangeDomain as bJ, CTF_ORDER_TYPES as bK, ORDER_TYPE as bL, SIDE as bM, buildOrderMessage as bN, buildSignedOrder as bO, buildClobPayload as bP, getPolymarketSharesPrecision as bQ, normalizePolymarketTickSize as bR, type ClobOrderPayload as bS, type BuildOrderMessageInput as bT, type OrderMessage as bU, type SignedOrder as bV, DEFAULT_PAGE_SIZE as bW, type WsSubscribedMessage as ba, type WsErrorCode as bb, type WsErrorMessage as bc, type PolymarketRedeemPrepareInput as bd, type PolymarketRedeemPrepareResponse as be, type PolymarketRedeemInput as bf, eventQueryKey as bg, fetchEvent as bh, resolveTagSlug as bi, resolveEventsParams as bj, infiniteEventsQueryKey as bk, fetchEventsPage as bl, type ResolveEventsParamsInput as bm, type TagSlugSelection as bn, marketQueryKey as bo, fetchMarket as bp, matchesQueryKey as bq, matchQueryKey as br, fetchMatchesPage as bs, matchMarketsQueryKey as bt, fetchMatchMarketsPage as bu, CLOB_AUTH_DOMAIN as bv, CLOB_AUTH_TYPES as bw, buildClobAuthMessage as bx, hmacSha256Base64 as by, buildPolymarketL2Headers as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryResponse as l, type ListCandlesticksParams as m, type ListCommentsParams as n, type PredictComment as o, type PositionsResponse as p, type PositionValueResponse as q, type ListOrdersParams as r, type PredictOrder as s, type ListOrdersMultiParams as t, type PredictOrdersResponse as u, type CancelOrderResult as v, type MatchGroupPage as w, type MatchGroup as x, type MatchMarketParams as y, type MatchMarketPage as z };
2124
+ export { type PolymarketWithdrawRequest as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type MatchMarketPage as D, type EventStats as E, type ListTradesParams as F, type ListTradesMultiParams as G, type DFlowQuoteRequest as H, type DFlowQuoteResponse as I, type DFlowSubmitResponse as J, type DFlowSubmitRequest as K, type ListEventsParams as L, type MatchesParams as M, type DFlowKYCStatus as N, type OrderbookOutcome as O, PredictClient as P, type PolymarketSetupStatus as Q, type PolymarketDepositWalletDeployResponse as R, type SimilarEventsParams as S, type WithdrawBuildRequest as T, type WithdrawSubmitResponse as U, type WithdrawSubmitRequest as V, type WithdrawBuildResponse as W, type WithdrawStatusResponse as X, type PolymarketDepositAddresses as Y, type PolymarketSupportedAsset as Z, type PolymarketWithdrawResponse as _, PredictWsClient as a, type MatchesStats as a$, type PolymarketWithdrawPrepareResponse as a0, type PolymarketWithdrawPrepareRequest as a1, type PolymarketWithdrawQuoteResponse as a2, type PolymarketWithdrawQuoteRequest as a3, type PolymarketWithdrawRelayBuildResponse as a4, type PolymarketWithdrawRelayBuildRequest as a5, type PolymarketWithdrawRelaySubmitResponse as a6, type PolymarketWithdrawRelaySubmitRequest as a7, type PolymarketWithdrawBridgeStatusResponse as a8, type PolymarketRedeemResponse as a9, type EventSummary as aA, type MarketSummary as aB, type PredictCommentProfile as aC, type PricePoint as aD, type PredictPosition as aE, type PositionValue as aF, type PositionValueError as aG, type OrderStatus as aH, type OrderSide as aI, type DFlowOrderContext as aJ, type PolymarketOrderType as aK, type PolymarketTickSize as aL, type PolymarketWalletKind as aM, type PolymarketDepositWalletDeployRequest as aN, type DepositBuildRequest as aO, type DepositBuildResponse as aP, type DepositSubmitRequest as aQ, type DepositSubmitResponse as aR, type DepositStatusResponse as aS, type UnsignedTx as aT, type PolymarketBridgeToken as aU, type PolymarketSupportedAssetsResponse as aV, type PolymarketTypedDataArg as aW, type MatchStatus as aX, type MatchGroupEntry as aY, type MatchGroupMarket as aZ, type MatchSortField as a_, type PolymarketTypedData as aa, type TickSizeResponse as ab, type FeeRateResponse as ac, type RebateConfig as ad, type WsConnectionStatus as ae, type WsDataMessage as af, type WsPriceEvent as ag, type WsOrderbookEvent as ah, type WsTradeEvent as ai, type CreateOrderInput as aj, createPredictClient as ak, type PredictClientOptions as al, createPredictWsClient as am, type PredictWsClientConfig as an, type ProviderMeta as ao, type PredictTag as ap, type SettlementSource as aq, type MarketStatus as ar, type MarketResult as as, type MarketOutcome as at, type OrderbookLevel as au, type OrderbookBatchItem as av, type OrderbookBatchResult as aw, type OrderbooksBatchRequest as ax, type OrderbooksBatchResponse as ay, type TradeType as az, type PredictPage as b, type MatchConfidenceTier as b0, type SignalTag as b1, type MatchLeg as b2, type MatchMarketFlat as b3, type WsChannel as b4, type WsChannelEvent as b5, type WsClientMessage as b6, type WsSubscribeMessage as b7, type WsPingMessage as b8, type WsServerMessage as b9, buildPolymarketL2Headers as bA, derivePolymarketApiKey as bB, type HttpMethod as bC, type PolymarketL2HeadersInput as bD, type PolymarketL2Headers as bE, type BuildClobAuthMessageInput as bF, CTF_EXCHANGE_ADDRESS as bG, NEG_RISK_CTF_EXCHANGE_ADDRESS as bH, USDC_ADDRESS as bI, POLYGON_CHAIN_ID as bJ, buildCtfExchangeDomain as bK, CTF_ORDER_TYPES as bL, ORDER_TYPE as bM, SIDE as bN, buildOrderMessage as bO, buildSignedOrder as bP, buildClobPayload as bQ, getPolymarketSharesPrecision as bR, normalizePolymarketTickSize as bS, type ClobOrderPayload as bT, type BuildOrderMessageInput as bU, type OrderMessage as bV, type SignedOrder as bW, DEFAULT_PAGE_SIZE as bX, type WsPongMessage as ba, type WsSubscribedMessage as bb, type WsErrorCode as bc, type WsErrorMessage as bd, type PolymarketRedeemPrepareInput as be, type PolymarketRedeemPrepareResponse as bf, type PolymarketRedeemInput as bg, eventQueryKey as bh, fetchEvent as bi, resolveTagSlug as bj, resolveEventsParams as bk, infiniteEventsQueryKey as bl, fetchEventsPage as bm, type ResolveEventsParamsInput as bn, type TagSlugSelection as bo, marketQueryKey as bp, fetchMarket as bq, matchesQueryKey as br, matchQueryKey as bs, fetchMatchesPage as bt, matchMarketsQueryKey as bu, fetchMatchMarketsPage as bv, CLOB_AUTH_DOMAIN as bw, CLOB_AUTH_TYPES as bx, buildClobAuthMessage as by, hmacSha256Base64 as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryParams as l, type PriceHistoryResponse as m, type ListCandlesticksParams as n, type ListCommentsParams as o, type PredictComment as p, type PositionsResponse as q, type PositionValueResponse as r, type ListOrdersParams as s, type PredictOrder as t, type ListOrdersMultiParams as u, type PredictOrdersResponse as v, type CancelOrderResult as w, type MatchGroupPage as x, type MatchGroup as y, type MatchMarketParams as z };
@@ -333,7 +333,18 @@ interface PriceHistoryResponse {
333
333
  points: PricePoint[];
334
334
  }
335
335
  /** Accepted values for the `range` query parameter. */
336
- type PriceHistoryRange = "1d" | "1w" | "1m" | "all";
336
+ type PriceHistoryRange = "1h" | "6h" | "1d" | "1w" | "1m" | "all";
337
+ /** Query parameters for `GET /api/v1/markets/{slug}/price-history`. */
338
+ interface PriceHistoryParams {
339
+ source: ProviderSource;
340
+ range?: PriceHistoryRange;
341
+ /** Unix seconds. Mirrors Polymarket `startTs`. */
342
+ startTs?: number;
343
+ /** Unix seconds. Mirrors Polymarket `endTs`. */
344
+ endTs?: number;
345
+ /** Data accuracy in minutes. Mirrors Polymarket `fidelity`. */
346
+ fidelity?: number;
347
+ }
337
348
  /** OHLCV candlestick data point. */
338
349
  interface Candlestick {
339
350
  timestamp: string;
@@ -1281,7 +1292,7 @@ declare class PredictClient {
1281
1292
  /** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
1282
1293
  listMarketTrades(slug: string, params: ListMarketTradesParams): Promise<PredictPage<PredictTrade>>;
1283
1294
  /** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
1284
- getPriceHistory(slug: string, source: ProviderSource, range?: PriceHistoryRange): Promise<PriceHistoryResponse>;
1295
+ getPriceHistory(slug: string, sourceOrParams: ProviderSource | PriceHistoryParams, range?: PriceHistoryRange): Promise<PriceHistoryResponse>;
1285
1296
  /** Maps to `GET /api/v1/markets/:slug/candlesticks?interval=...&limit=...`. */
1286
1297
  listCandlesticks(slug: string, params?: ListCandlesticksParams): Promise<Candlestick[]>;
1287
1298
  /**
@@ -2110,4 +2121,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2110
2121
  */
2111
2122
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2112
2123
 
2113
- export { type PolymarketWithdrawPrepareResponse as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesParams as D, type EventStats as E, type ListTradesMultiParams as F, type DFlowQuoteRequest as G, type DFlowQuoteResponse as H, type DFlowSubmitResponse as I, type DFlowSubmitRequest as J, type DFlowKYCStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketSetupStatus as N, type OrderbookOutcome as O, PredictClient as P, type PolymarketDepositWalletDeployResponse as Q, type WithdrawBuildRequest as R, type SimilarEventsParams as S, type WithdrawSubmitResponse as T, type WithdrawSubmitRequest as U, type WithdrawStatusResponse as V, type WithdrawBuildResponse as W, type PolymarketDepositAddresses as X, type PolymarketSupportedAsset as Y, type PolymarketWithdrawResponse as Z, type PolymarketWithdrawRequest as _, PredictWsClient as a, type MatchConfidenceTier as a$, type PolymarketWithdrawPrepareRequest as a0, type PolymarketWithdrawQuoteResponse as a1, type PolymarketWithdrawQuoteRequest as a2, type PolymarketWithdrawRelayBuildResponse as a3, type PolymarketWithdrawRelayBuildRequest as a4, type PolymarketWithdrawRelaySubmitResponse as a5, type PolymarketWithdrawRelaySubmitRequest as a6, type PolymarketWithdrawBridgeStatusResponse as a7, type PolymarketRedeemResponse as a8, type PolymarketTypedData as a9, type MarketSummary as aA, type PredictCommentProfile as aB, type PricePoint as aC, type PredictPosition as aD, type PositionValue as aE, type PositionValueError as aF, type OrderStatus as aG, type OrderSide as aH, type DFlowOrderContext as aI, type PolymarketOrderType as aJ, type PolymarketTickSize as aK, type PolymarketWalletKind as aL, type PolymarketDepositWalletDeployRequest as aM, type DepositBuildRequest as aN, type DepositBuildResponse as aO, type DepositSubmitRequest as aP, type DepositSubmitResponse as aQ, type DepositStatusResponse as aR, type UnsignedTx as aS, type PolymarketBridgeToken as aT, type PolymarketSupportedAssetsResponse as aU, type PolymarketTypedDataArg as aV, type MatchStatus as aW, type MatchGroupEntry as aX, type MatchGroupMarket as aY, type MatchSortField as aZ, type MatchesStats as a_, type TickSizeResponse as aa, type FeeRateResponse as ab, type RebateConfig as ac, type WsConnectionStatus as ad, type WsDataMessage as ae, type WsPriceEvent as af, type WsOrderbookEvent as ag, type WsTradeEvent as ah, type CreateOrderInput as ai, createPredictClient as aj, type PredictClientOptions as ak, createPredictWsClient as al, type PredictWsClientConfig as am, type ProviderMeta as an, type PredictTag as ao, type SettlementSource as ap, type MarketStatus as aq, type MarketResult as ar, type MarketOutcome as as, type OrderbookLevel as at, type OrderbookBatchItem as au, type OrderbookBatchResult as av, type OrderbooksBatchRequest as aw, type OrderbooksBatchResponse as ax, type TradeType as ay, type EventSummary as az, type PredictPage as b, type SignalTag as b0, type MatchLeg as b1, type MatchMarketFlat as b2, type WsChannel as b3, type WsChannelEvent as b4, type WsClientMessage as b5, type WsSubscribeMessage as b6, type WsPingMessage as b7, type WsServerMessage as b8, type WsPongMessage as b9, derivePolymarketApiKey as bA, type HttpMethod as bB, type PolymarketL2HeadersInput as bC, type PolymarketL2Headers as bD, type BuildClobAuthMessageInput as bE, CTF_EXCHANGE_ADDRESS as bF, NEG_RISK_CTF_EXCHANGE_ADDRESS as bG, USDC_ADDRESS as bH, POLYGON_CHAIN_ID as bI, buildCtfExchangeDomain as bJ, CTF_ORDER_TYPES as bK, ORDER_TYPE as bL, SIDE as bM, buildOrderMessage as bN, buildSignedOrder as bO, buildClobPayload as bP, getPolymarketSharesPrecision as bQ, normalizePolymarketTickSize as bR, type ClobOrderPayload as bS, type BuildOrderMessageInput as bT, type OrderMessage as bU, type SignedOrder as bV, DEFAULT_PAGE_SIZE as bW, type WsSubscribedMessage as ba, type WsErrorCode as bb, type WsErrorMessage as bc, type PolymarketRedeemPrepareInput as bd, type PolymarketRedeemPrepareResponse as be, type PolymarketRedeemInput as bf, eventQueryKey as bg, fetchEvent as bh, resolveTagSlug as bi, resolveEventsParams as bj, infiniteEventsQueryKey as bk, fetchEventsPage as bl, type ResolveEventsParamsInput as bm, type TagSlugSelection as bn, marketQueryKey as bo, fetchMarket as bp, matchesQueryKey as bq, matchQueryKey as br, fetchMatchesPage as bs, matchMarketsQueryKey as bt, fetchMatchMarketsPage as bu, CLOB_AUTH_DOMAIN as bv, CLOB_AUTH_TYPES as bw, buildClobAuthMessage as bx, hmacSha256Base64 as by, buildPolymarketL2Headers as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryResponse as l, type ListCandlesticksParams as m, type ListCommentsParams as n, type PredictComment as o, type PositionsResponse as p, type PositionValueResponse as q, type ListOrdersParams as r, type PredictOrder as s, type ListOrdersMultiParams as t, type PredictOrdersResponse as u, type CancelOrderResult as v, type MatchGroupPage as w, type MatchGroup as x, type MatchMarketParams as y, type MatchMarketPage as z };
2124
+ export { type PolymarketWithdrawRequest as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type MatchMarketPage as D, type EventStats as E, type ListTradesParams as F, type ListTradesMultiParams as G, type DFlowQuoteRequest as H, type DFlowQuoteResponse as I, type DFlowSubmitResponse as J, type DFlowSubmitRequest as K, type ListEventsParams as L, type MatchesParams as M, type DFlowKYCStatus as N, type OrderbookOutcome as O, PredictClient as P, type PolymarketSetupStatus as Q, type PolymarketDepositWalletDeployResponse as R, type SimilarEventsParams as S, type WithdrawBuildRequest as T, type WithdrawSubmitResponse as U, type WithdrawSubmitRequest as V, type WithdrawBuildResponse as W, type WithdrawStatusResponse as X, type PolymarketDepositAddresses as Y, type PolymarketSupportedAsset as Z, type PolymarketWithdrawResponse as _, PredictWsClient as a, type MatchesStats as a$, type PolymarketWithdrawPrepareResponse as a0, type PolymarketWithdrawPrepareRequest as a1, type PolymarketWithdrawQuoteResponse as a2, type PolymarketWithdrawQuoteRequest as a3, type PolymarketWithdrawRelayBuildResponse as a4, type PolymarketWithdrawRelayBuildRequest as a5, type PolymarketWithdrawRelaySubmitResponse as a6, type PolymarketWithdrawRelaySubmitRequest as a7, type PolymarketWithdrawBridgeStatusResponse as a8, type PolymarketRedeemResponse as a9, type EventSummary as aA, type MarketSummary as aB, type PredictCommentProfile as aC, type PricePoint as aD, type PredictPosition as aE, type PositionValue as aF, type PositionValueError as aG, type OrderStatus as aH, type OrderSide as aI, type DFlowOrderContext as aJ, type PolymarketOrderType as aK, type PolymarketTickSize as aL, type PolymarketWalletKind as aM, type PolymarketDepositWalletDeployRequest as aN, type DepositBuildRequest as aO, type DepositBuildResponse as aP, type DepositSubmitRequest as aQ, type DepositSubmitResponse as aR, type DepositStatusResponse as aS, type UnsignedTx as aT, type PolymarketBridgeToken as aU, type PolymarketSupportedAssetsResponse as aV, type PolymarketTypedDataArg as aW, type MatchStatus as aX, type MatchGroupEntry as aY, type MatchGroupMarket as aZ, type MatchSortField as a_, type PolymarketTypedData as aa, type TickSizeResponse as ab, type FeeRateResponse as ac, type RebateConfig as ad, type WsConnectionStatus as ae, type WsDataMessage as af, type WsPriceEvent as ag, type WsOrderbookEvent as ah, type WsTradeEvent as ai, type CreateOrderInput as aj, createPredictClient as ak, type PredictClientOptions as al, createPredictWsClient as am, type PredictWsClientConfig as an, type ProviderMeta as ao, type PredictTag as ap, type SettlementSource as aq, type MarketStatus as ar, type MarketResult as as, type MarketOutcome as at, type OrderbookLevel as au, type OrderbookBatchItem as av, type OrderbookBatchResult as aw, type OrderbooksBatchRequest as ax, type OrderbooksBatchResponse as ay, type TradeType as az, type PredictPage as b, type MatchConfidenceTier as b0, type SignalTag as b1, type MatchLeg as b2, type MatchMarketFlat as b3, type WsChannel as b4, type WsChannelEvent as b5, type WsClientMessage as b6, type WsSubscribeMessage as b7, type WsPingMessage as b8, type WsServerMessage as b9, buildPolymarketL2Headers as bA, derivePolymarketApiKey as bB, type HttpMethod as bC, type PolymarketL2HeadersInput as bD, type PolymarketL2Headers as bE, type BuildClobAuthMessageInput as bF, CTF_EXCHANGE_ADDRESS as bG, NEG_RISK_CTF_EXCHANGE_ADDRESS as bH, USDC_ADDRESS as bI, POLYGON_CHAIN_ID as bJ, buildCtfExchangeDomain as bK, CTF_ORDER_TYPES as bL, ORDER_TYPE as bM, SIDE as bN, buildOrderMessage as bO, buildSignedOrder as bP, buildClobPayload as bQ, getPolymarketSharesPrecision as bR, normalizePolymarketTickSize as bS, type ClobOrderPayload as bT, type BuildOrderMessageInput as bU, type OrderMessage as bV, type SignedOrder as bW, DEFAULT_PAGE_SIZE as bX, type WsPongMessage as ba, type WsSubscribedMessage as bb, type WsErrorCode as bc, type WsErrorMessage as bd, type PolymarketRedeemPrepareInput as be, type PolymarketRedeemPrepareResponse as bf, type PolymarketRedeemInput as bg, eventQueryKey as bh, fetchEvent as bi, resolveTagSlug as bj, resolveEventsParams as bk, infiniteEventsQueryKey as bl, fetchEventsPage as bm, type ResolveEventsParamsInput as bn, type TagSlugSelection as bo, marketQueryKey as bp, fetchMarket as bq, matchesQueryKey as br, matchQueryKey as bs, fetchMatchesPage as bt, matchMarketsQueryKey as bu, fetchMatchMarketsPage as bv, CLOB_AUTH_DOMAIN as bw, CLOB_AUTH_TYPES as bx, buildClobAuthMessage as by, hmacSha256Base64 as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryParams as l, type PriceHistoryResponse as m, type ListCandlesticksParams as n, type ListCommentsParams as o, type PredictComment as p, type PositionsResponse as q, type PositionValueResponse as r, type ListOrdersParams as s, type PredictOrder as t, type ListOrdersMultiParams as u, type PredictOrdersResponse as v, type CancelOrderResult as w, type MatchGroupPage as x, type MatchGroup as y, type MatchMarketParams as z };
package/dist/server.d.mts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, bE as BuildClobAuthMessageInput, bT as BuildOrderMessageInput, bv as CLOB_AUTH_DOMAIN, bw as CLOB_AUTH_TYPES, bF as CTF_EXCHANGE_ADDRESS, bK as CTF_ORDER_TYPES, v as CancelOrderResult, C as Candlestick, bS as ClobOrderPayload, ai as CreateOrderInput, bW as DEFAULT_PAGE_SIZE, aI as DFlowOrderContext, G as DFlowQuoteRequest, H as DFlowQuoteResponse, J as DFlowSubmitRequest, I as DFlowSubmitResponse, aN as DepositBuildRequest, aO as DepositBuildResponse, aR as DepositStatusResponse, aP as DepositSubmitRequest, aQ as DepositSubmitResponse, f as EventSortField, e as EventStatus, az as EventSummary, bB as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, r as ListOrdersParams, D as ListTradesParams, as as MarketOutcome, ar as MarketResult, aq as MarketStatus, aA as MarketSummary, a$ as MatchConfidenceTier, x as MatchGroup, aX as MatchGroupEntry, aY as MatchGroupMarket, w as MatchGroupPage, b1 as MatchLeg, b2 as MatchMarketFlat, z as MatchMarketPage, y as MatchMarketParams, aZ as MatchSortField, aW as MatchStatus, M as MatchesParams, a_ as MatchesStats, bG as NEG_RISK_CTF_EXCHANGE_ADDRESS, bL as ORDER_TYPE, bU as OrderMessage, aH as OrderSide, aG as OrderStatus, h as Orderbook, at as OrderbookLevel, bI as POLYGON_CHAIN_ID, bD as PolymarketL2Headers, bC as PolymarketL2HeadersInput, aJ as PolymarketOrderType, aE as PositionValue, aF as PositionValueError, q as PositionValueResponse, p as PositionsResponse, P as PredictClient, ak as PredictClientOptions, c as PredictEvent, g as PredictMarket, s as PredictOrder, b as PredictPage, aD as PredictPosition, ao as PredictTag, j as PredictTrade, a as PredictWsClient, am as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, aC as PricePoint, an as ProviderMeta, d as ProviderSource, bm as ResolveEventsParamsInput, bM as SIDE, ap as SettlementSource, b0 as SignalTag, bV as SignedOrder, S as SimilarEventsParams, bn as TagSlugSelection, ay as TradeType, bH as USDC_ADDRESS, aS as UnsignedTx, b3 as WsChannel, b4 as WsChannelEvent, b5 as WsClientMessage, ad as WsConnectionStatus, ae as WsDataMessage, bb as WsErrorCode, bc as WsErrorMessage, ag as WsOrderbookEvent, b7 as WsPingMessage, b9 as WsPongMessage, af as WsPriceEvent, b8 as WsServerMessage, b6 as WsSubscribeMessage, ba as WsSubscribedMessage, ah as WsTradeEvent, bx as buildClobAuthMessage, bP as buildClobPayload, bJ as buildCtfExchangeDomain, bN as buildOrderMessage, bz as buildPolymarketL2Headers, bO as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bA as derivePolymarketApiKey, bg as eventQueryKey, bh as fetchEvent, bl as fetchEventsPage, bp as fetchMarket, bu as fetchMatchMarketsPage, bs as fetchMatchesPage, by as hmacSha256Base64, bk as infiniteEventsQueryKey, bo as marketQueryKey, bt as matchMarketsQueryKey, br as matchQueryKey, bq as matchesQueryKey, bj as resolveEventsParams, bi as resolveTagSlug } from './server-pS5Vlydo.mjs';
1
+ export { B as BalanceResponse, bF as BuildClobAuthMessageInput, bU as BuildOrderMessageInput, bw as CLOB_AUTH_DOMAIN, bx as CLOB_AUTH_TYPES, bG as CTF_EXCHANGE_ADDRESS, bL as CTF_ORDER_TYPES, w as CancelOrderResult, C as Candlestick, bT as ClobOrderPayload, aj as CreateOrderInput, bX as DEFAULT_PAGE_SIZE, aJ as DFlowOrderContext, H as DFlowQuoteRequest, I as DFlowQuoteResponse, K as DFlowSubmitRequest, J as DFlowSubmitResponse, aO as DepositBuildRequest, aP as DepositBuildResponse, aS as DepositStatusResponse, aQ as DepositSubmitRequest, aR as DepositSubmitResponse, f as EventSortField, e as EventStatus, aA as EventSummary, bC as HttpMethod, n as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, s as ListOrdersParams, F as ListTradesParams, at as MarketOutcome, as as MarketResult, ar as MarketStatus, aB as MarketSummary, b0 as MatchConfidenceTier, y as MatchGroup, aY as MatchGroupEntry, aZ as MatchGroupMarket, x as MatchGroupPage, b2 as MatchLeg, b3 as MatchMarketFlat, D as MatchMarketPage, z as MatchMarketParams, a_ as MatchSortField, aX as MatchStatus, M as MatchesParams, a$ as MatchesStats, bH as NEG_RISK_CTF_EXCHANGE_ADDRESS, bM as ORDER_TYPE, bV as OrderMessage, aI as OrderSide, aH as OrderStatus, h as Orderbook, au as OrderbookLevel, bJ as POLYGON_CHAIN_ID, bE as PolymarketL2Headers, bD as PolymarketL2HeadersInput, aK as PolymarketOrderType, aF as PositionValue, aG as PositionValueError, r as PositionValueResponse, q as PositionsResponse, P as PredictClient, al as PredictClientOptions, c as PredictEvent, g as PredictMarket, t as PredictOrder, b as PredictPage, aE as PredictPosition, ap as PredictTag, j as PredictTrade, a as PredictWsClient, an as PredictWsClientConfig, l as PriceHistoryParams, k as PriceHistoryRange, m as PriceHistoryResponse, aD as PricePoint, ao as ProviderMeta, d as ProviderSource, bn as ResolveEventsParamsInput, bN as SIDE, aq as SettlementSource, b1 as SignalTag, bW as SignedOrder, S as SimilarEventsParams, bo as TagSlugSelection, az as TradeType, bI as USDC_ADDRESS, aT as UnsignedTx, b4 as WsChannel, b5 as WsChannelEvent, b6 as WsClientMessage, ae as WsConnectionStatus, af as WsDataMessage, bc as WsErrorCode, bd as WsErrorMessage, ah as WsOrderbookEvent, b8 as WsPingMessage, ba as WsPongMessage, ag as WsPriceEvent, b9 as WsServerMessage, b7 as WsSubscribeMessage, bb as WsSubscribedMessage, ai as WsTradeEvent, by as buildClobAuthMessage, bQ as buildClobPayload, bK as buildCtfExchangeDomain, bO as buildOrderMessage, bA as buildPolymarketL2Headers, bP as buildSignedOrder, ak as createPredictClient, am as createPredictWsClient, bB as derivePolymarketApiKey, bh as eventQueryKey, bi as fetchEvent, bm as fetchEventsPage, bq as fetchMarket, bv as fetchMatchMarketsPage, bt as fetchMatchesPage, bz as hmacSha256Base64, bl as infiniteEventsQueryKey, bp as marketQueryKey, bu as matchMarketsQueryKey, bs as matchQueryKey, br as matchesQueryKey, bk as resolveEventsParams, bj as resolveTagSlug } from './server-B6SSpkMN.mjs';
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, bE as BuildClobAuthMessageInput, bT as BuildOrderMessageInput, bv as CLOB_AUTH_DOMAIN, bw as CLOB_AUTH_TYPES, bF as CTF_EXCHANGE_ADDRESS, bK as CTF_ORDER_TYPES, v as CancelOrderResult, C as Candlestick, bS as ClobOrderPayload, ai as CreateOrderInput, bW as DEFAULT_PAGE_SIZE, aI as DFlowOrderContext, G as DFlowQuoteRequest, H as DFlowQuoteResponse, J as DFlowSubmitRequest, I as DFlowSubmitResponse, aN as DepositBuildRequest, aO as DepositBuildResponse, aR as DepositStatusResponse, aP as DepositSubmitRequest, aQ as DepositSubmitResponse, f as EventSortField, e as EventStatus, az as EventSummary, bB as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, r as ListOrdersParams, D as ListTradesParams, as as MarketOutcome, ar as MarketResult, aq as MarketStatus, aA as MarketSummary, a$ as MatchConfidenceTier, x as MatchGroup, aX as MatchGroupEntry, aY as MatchGroupMarket, w as MatchGroupPage, b1 as MatchLeg, b2 as MatchMarketFlat, z as MatchMarketPage, y as MatchMarketParams, aZ as MatchSortField, aW as MatchStatus, M as MatchesParams, a_ as MatchesStats, bG as NEG_RISK_CTF_EXCHANGE_ADDRESS, bL as ORDER_TYPE, bU as OrderMessage, aH as OrderSide, aG as OrderStatus, h as Orderbook, at as OrderbookLevel, bI as POLYGON_CHAIN_ID, bD as PolymarketL2Headers, bC as PolymarketL2HeadersInput, aJ as PolymarketOrderType, aE as PositionValue, aF as PositionValueError, q as PositionValueResponse, p as PositionsResponse, P as PredictClient, ak as PredictClientOptions, c as PredictEvent, g as PredictMarket, s as PredictOrder, b as PredictPage, aD as PredictPosition, ao as PredictTag, j as PredictTrade, a as PredictWsClient, am as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, aC as PricePoint, an as ProviderMeta, d as ProviderSource, bm as ResolveEventsParamsInput, bM as SIDE, ap as SettlementSource, b0 as SignalTag, bV as SignedOrder, S as SimilarEventsParams, bn as TagSlugSelection, ay as TradeType, bH as USDC_ADDRESS, aS as UnsignedTx, b3 as WsChannel, b4 as WsChannelEvent, b5 as WsClientMessage, ad as WsConnectionStatus, ae as WsDataMessage, bb as WsErrorCode, bc as WsErrorMessage, ag as WsOrderbookEvent, b7 as WsPingMessage, b9 as WsPongMessage, af as WsPriceEvent, b8 as WsServerMessage, b6 as WsSubscribeMessage, ba as WsSubscribedMessage, ah as WsTradeEvent, bx as buildClobAuthMessage, bP as buildClobPayload, bJ as buildCtfExchangeDomain, bN as buildOrderMessage, bz as buildPolymarketL2Headers, bO as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bA as derivePolymarketApiKey, bg as eventQueryKey, bh as fetchEvent, bl as fetchEventsPage, bp as fetchMarket, bu as fetchMatchMarketsPage, bs as fetchMatchesPage, by as hmacSha256Base64, bk as infiniteEventsQueryKey, bo as marketQueryKey, bt as matchMarketsQueryKey, br as matchQueryKey, bq as matchesQueryKey, bj as resolveEventsParams, bi as resolveTagSlug } from './server-pS5Vlydo.js';
1
+ export { B as BalanceResponse, bF as BuildClobAuthMessageInput, bU as BuildOrderMessageInput, bw as CLOB_AUTH_DOMAIN, bx as CLOB_AUTH_TYPES, bG as CTF_EXCHANGE_ADDRESS, bL as CTF_ORDER_TYPES, w as CancelOrderResult, C as Candlestick, bT as ClobOrderPayload, aj as CreateOrderInput, bX as DEFAULT_PAGE_SIZE, aJ as DFlowOrderContext, H as DFlowQuoteRequest, I as DFlowQuoteResponse, K as DFlowSubmitRequest, J as DFlowSubmitResponse, aO as DepositBuildRequest, aP as DepositBuildResponse, aS as DepositStatusResponse, aQ as DepositSubmitRequest, aR as DepositSubmitResponse, f as EventSortField, e as EventStatus, aA as EventSummary, bC as HttpMethod, n as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, s as ListOrdersParams, F as ListTradesParams, at as MarketOutcome, as as MarketResult, ar as MarketStatus, aB as MarketSummary, b0 as MatchConfidenceTier, y as MatchGroup, aY as MatchGroupEntry, aZ as MatchGroupMarket, x as MatchGroupPage, b2 as MatchLeg, b3 as MatchMarketFlat, D as MatchMarketPage, z as MatchMarketParams, a_ as MatchSortField, aX as MatchStatus, M as MatchesParams, a$ as MatchesStats, bH as NEG_RISK_CTF_EXCHANGE_ADDRESS, bM as ORDER_TYPE, bV as OrderMessage, aI as OrderSide, aH as OrderStatus, h as Orderbook, au as OrderbookLevel, bJ as POLYGON_CHAIN_ID, bE as PolymarketL2Headers, bD as PolymarketL2HeadersInput, aK as PolymarketOrderType, aF as PositionValue, aG as PositionValueError, r as PositionValueResponse, q as PositionsResponse, P as PredictClient, al as PredictClientOptions, c as PredictEvent, g as PredictMarket, t as PredictOrder, b as PredictPage, aE as PredictPosition, ap as PredictTag, j as PredictTrade, a as PredictWsClient, an as PredictWsClientConfig, l as PriceHistoryParams, k as PriceHistoryRange, m as PriceHistoryResponse, aD as PricePoint, ao as ProviderMeta, d as ProviderSource, bn as ResolveEventsParamsInput, bN as SIDE, aq as SettlementSource, b1 as SignalTag, bW as SignedOrder, S as SimilarEventsParams, bo as TagSlugSelection, az as TradeType, bI as USDC_ADDRESS, aT as UnsignedTx, b4 as WsChannel, b5 as WsChannelEvent, b6 as WsClientMessage, ae as WsConnectionStatus, af as WsDataMessage, bc as WsErrorCode, bd as WsErrorMessage, ah as WsOrderbookEvent, b8 as WsPingMessage, ba as WsPongMessage, ag as WsPriceEvent, b9 as WsServerMessage, b7 as WsSubscribeMessage, bb as WsSubscribedMessage, ai as WsTradeEvent, by as buildClobAuthMessage, bQ as buildClobPayload, bK as buildCtfExchangeDomain, bO as buildOrderMessage, bA as buildPolymarketL2Headers, bP as buildSignedOrder, ak as createPredictClient, am as createPredictWsClient, bB as derivePolymarketApiKey, bh as eventQueryKey, bi as fetchEvent, bm as fetchEventsPage, bq as fetchMarket, bv as fetchMatchMarketsPage, bt as fetchMatchesPage, bz as hmacSha256Base64, bl as infiniteEventsQueryKey, bp as marketQueryKey, bu as matchMarketsQueryKey, bs as matchQueryKey, br as matchesQueryKey, bk as resolveEventsParams, bj as resolveTagSlug } from './server-B6SSpkMN.js';
package/dist/server.js CHANGED
@@ -224,8 +224,9 @@ var PredictClient = class {
224
224
  return await utils.httpGet(url);
225
225
  }
226
226
  /** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
227
- async getPriceHistory(slug, source, range) {
228
- const query = buildQuery({ source, range });
227
+ async getPriceHistory(slug, sourceOrParams, range) {
228
+ const params = typeof sourceOrParams === "string" ? { source: sourceOrParams, range } : sourceOrParams;
229
+ const query = buildQuery(params);
229
230
  const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/price-history${query}`;
230
231
  return await utils.httpGet(url);
231
232
  }