@liberfi.io/react-predict 0.3.65 → 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.
- package/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +120 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +120 -31
- package/dist/index.mjs.map +1 -1
- package/dist/{server-pS5Vlydo.d.mts → server-B6SSpkMN.d.mts} +14 -3
- package/dist/{server-pS5Vlydo.d.ts → server-B6SSpkMN.d.ts} +14 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +3 -2
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
228
|
-
const
|
|
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
|
}
|