@liberfi.io/react-predict 0.3.61 → 0.3.63

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.
@@ -576,6 +576,38 @@ interface PositionsResponse {
576
576
  wallets?: Record<string, string>;
577
577
  positions: PredictPosition[];
578
578
  }
579
+ /** Lightweight current-value summary for one provider wallet. */
580
+ interface PositionValue {
581
+ source: ProviderSource;
582
+ user: string;
583
+ /** Current position value in {@link currency}, returned as a decimal string. */
584
+ value: string;
585
+ currency: string;
586
+ }
587
+ /** Provider-specific failure returned by aggregate position value queries. */
588
+ interface PositionValueError {
589
+ source: ProviderSource;
590
+ user?: string;
591
+ code: string;
592
+ message: string;
593
+ }
594
+ /** Response from `GET /api/v1/positions/value`. */
595
+ interface PositionValueResponse {
596
+ /** Populated for single-source or legacy aggregate queries. */
597
+ user?: string;
598
+ /** Populated for multi-wallet queries (keys are external source names). */
599
+ wallets?: Record<string, string>;
600
+ /** Populated for single-source queries. */
601
+ source?: ProviderSource;
602
+ /** Aggregate current position value in {@link currency}. */
603
+ value: string;
604
+ currency: string;
605
+ /** Per-provider values for multi-wallet or aggregate queries. */
606
+ values?: PositionValue[];
607
+ /** True when at least one provider failed but others returned values. */
608
+ partial?: boolean;
609
+ errors?: PositionValueError[];
610
+ }
579
611
  /** Response from `GET /api/v1/balance`. */
580
612
  interface BalanceResponse {
581
613
  user: string;
@@ -887,6 +919,12 @@ interface DFlowSubmitResponse {
887
919
  }
888
920
  /** Order type for Polymarket CLOB. */
889
921
  type PolymarketOrderType = "GTC" | "FOK" | "GTD" | "FAK";
922
+ /**
923
+ * Known Polymarket minimum tick sizes. Must stay in sync with the
924
+ * `ROUNDING_CONFIG` of `@polymarket/clob-client-v2` — sports markets use the
925
+ * finer `0.005` / `0.0025` ticks introduced alongside CLOB V2.
926
+ */
927
+ type PolymarketTickSize = "0.1" | "0.01" | "0.005" | "0.0025" | "0.001" | "0.0001";
890
928
  /**
891
929
  * Input for creating a Polymarket order (limit or market).
892
930
  * @see https://docs.polymarket.com/trading/orders/create
@@ -911,7 +949,7 @@ interface CreateOrderInput {
911
949
  side: OrderSide;
912
950
  orderType?: PolymarketOrderType;
913
951
  /** Minimum tick size for this market (from Polymarket gamma API). */
914
- tickSize: "0.1" | "0.01" | "0.001" | "0.0001";
952
+ tickSize: PolymarketTickSize;
915
953
  /** Whether this is a neg-risk market (uses different exchange contract). */
916
954
  negRisk?: boolean;
917
955
  /** Expiration timestamp (Unix seconds). Required for GTD orders. */
@@ -1250,6 +1288,17 @@ declare class PredictClient {
1250
1288
  kalshi_user?: string;
1251
1289
  polymarket_user?: string;
1252
1290
  }, source?: ProviderSource): Promise<PositionsResponse>;
1291
+ /**
1292
+ * Maps to `GET /api/v1/positions/value`.
1293
+ *
1294
+ * Single-source: `getPositionValue("addr", "polymarket")`.
1295
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
1296
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
1297
+ */
1298
+ getPositionValue(userOrWallets: string | {
1299
+ kalshi_user?: string;
1300
+ polymarket_user?: string;
1301
+ }, source?: ProviderSource): Promise<PositionValueResponse>;
1253
1302
  /**
1254
1303
  * Get the number of shares available for selling, accounting for active orders.
1255
1304
  *
@@ -1921,6 +1970,19 @@ declare const SIDE: {
1921
1970
  readonly BUY: 0;
1922
1971
  readonly SELL: 1;
1923
1972
  };
1973
+ /**
1974
+ * Normalise a raw `minimum_tick_size` value (number or string, e.g. from the
1975
+ * `/tick-size` endpoint) to one of the tick sizes known to the CLOB clients'
1976
+ * rounding configs.
1977
+ *
1978
+ * The official `@polymarket/clob-client-v2` OrderBuilder indexes its
1979
+ * `ROUNDING_CONFIG` by the tick-size string without any fallback — an unknown
1980
+ * key crashes order building with "Cannot read properties of undefined
1981
+ * (reading 'price')". Funnelling every caller through this helper guarantees
1982
+ * we only ever hand the builder a supported tick size (unknown values fall
1983
+ * back to the CLOB-default "0.01").
1984
+ */
1985
+ declare function normalizePolymarketTickSize(raw: number | string | null | undefined): PolymarketTickSize;
1924
1986
  interface BuildOrderMessageInput extends CreateOrderInput {
1925
1987
  /** Signer / owner address. */
1926
1988
  signerAddress: string;
@@ -2041,4 +2103,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2041
2103
  */
2042
2104
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2043
2105
 
2044
- export { type PolymarketWithdrawPrepareRequest as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesMultiParams as D, type EventStats as E, type DFlowQuoteRequest as F, type DFlowQuoteResponse as G, type DFlowSubmitResponse as H, type DFlowSubmitRequest as I, type DFlowKYCStatus as J, type PolymarketSetupStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketDepositWalletDeployResponse as N, type OrderbookOutcome as O, PredictClient as P, type WithdrawBuildRequest as Q, type WithdrawSubmitResponse as R, type SimilarEventsParams as S, type WithdrawSubmitRequest as T, type WithdrawStatusResponse as U, type PolymarketDepositAddresses as V, type WithdrawBuildResponse as W, type PolymarketSupportedAsset as X, type PolymarketWithdrawResponse as Y, type PolymarketWithdrawRequest as Z, type PolymarketWithdrawPrepareResponse as _, PredictWsClient as a, type WsChannel as a$, type PolymarketWithdrawQuoteResponse as a0, type PolymarketWithdrawQuoteRequest as a1, type PolymarketWithdrawRelayBuildResponse as a2, type PolymarketWithdrawRelayBuildRequest as a3, type PolymarketWithdrawRelaySubmitResponse as a4, type PolymarketWithdrawRelaySubmitRequest as a5, type PolymarketWithdrawBridgeStatusResponse as a6, type PolymarketRedeemResponse as a7, type PolymarketTypedData as a8, type TickSizeResponse as a9, type PredictCommentProfile as aA, type PricePoint as aB, type PredictPosition as aC, type OrderStatus as aD, type OrderSide as aE, type DFlowOrderContext as aF, type PolymarketOrderType as aG, type PolymarketWalletKind as aH, type PolymarketDepositWalletDeployRequest as aI, type DepositBuildRequest as aJ, type DepositBuildResponse as aK, type DepositSubmitRequest as aL, type DepositSubmitResponse as aM, type DepositStatusResponse as aN, type UnsignedTx as aO, type PolymarketBridgeToken as aP, type PolymarketSupportedAssetsResponse as aQ, type PolymarketTypedDataArg as aR, type MatchStatus as aS, type MatchGroupEntry as aT, type MatchGroupMarket as aU, type MatchSortField as aV, type MatchesStats as aW, type MatchConfidenceTier as aX, type SignalTag as aY, type MatchLeg as aZ, type MatchMarketFlat as a_, type FeeRateResponse as aa, type RebateConfig as ab, type WsConnectionStatus as ac, type WsDataMessage as ad, type WsPriceEvent as ae, type WsOrderbookEvent as af, type WsTradeEvent as ag, type CreateOrderInput as ah, createPredictClient as ai, type PredictClientOptions as aj, createPredictWsClient as ak, type PredictWsClientConfig as al, type ProviderMeta as am, type PredictTag as an, type SettlementSource as ao, type MarketStatus as ap, type MarketResult as aq, type MarketOutcome as ar, type OrderbookLevel as as, type OrderbookBatchItem as at, type OrderbookBatchResult as au, type OrderbooksBatchRequest as av, type OrderbooksBatchResponse as aw, type TradeType as ax, type EventSummary as ay, type MarketSummary as az, type PredictPage as b, type WsChannelEvent as b0, type WsClientMessage as b1, type WsSubscribeMessage as b2, type WsPingMessage as b3, type WsServerMessage as b4, type WsPongMessage as b5, type WsSubscribedMessage as b6, type WsErrorCode as b7, type WsErrorMessage as b8, type PolymarketRedeemPrepareInput as b9, type BuildClobAuthMessageInput as bA, CTF_EXCHANGE_ADDRESS as bB, NEG_RISK_CTF_EXCHANGE_ADDRESS as bC, USDC_ADDRESS as bD, POLYGON_CHAIN_ID as bE, buildCtfExchangeDomain as bF, CTF_ORDER_TYPES as bG, ORDER_TYPE as bH, SIDE as bI, buildOrderMessage as bJ, buildSignedOrder as bK, buildClobPayload as bL, getPolymarketSharesPrecision as bM, type ClobOrderPayload as bN, type BuildOrderMessageInput as bO, type OrderMessage as bP, type SignedOrder as bQ, DEFAULT_PAGE_SIZE as bR, type PolymarketRedeemPrepareResponse as ba, type PolymarketRedeemInput as bb, eventQueryKey as bc, fetchEvent as bd, resolveTagSlug as be, resolveEventsParams as bf, infiniteEventsQueryKey as bg, fetchEventsPage as bh, type ResolveEventsParamsInput as bi, type TagSlugSelection as bj, marketQueryKey as bk, fetchMarket as bl, matchesQueryKey as bm, matchQueryKey as bn, fetchMatchesPage as bo, matchMarketsQueryKey as bp, fetchMatchMarketsPage as bq, CLOB_AUTH_DOMAIN as br, CLOB_AUTH_TYPES as bs, buildClobAuthMessage as bt, hmacSha256Base64 as bu, buildPolymarketL2Headers as bv, derivePolymarketApiKey as bw, type HttpMethod as bx, type PolymarketL2HeadersInput as by, type PolymarketL2Headers 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 ListOrdersParams as q, type PredictOrder as r, type ListOrdersMultiParams as s, type PredictOrdersResponse as t, type CancelOrderResult as u, type MatchGroupPage as v, type MatchGroup as w, type MatchMarketParams as x, type MatchMarketPage as y, type ListTradesParams as z };
2106
+ 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 };
@@ -576,6 +576,38 @@ interface PositionsResponse {
576
576
  wallets?: Record<string, string>;
577
577
  positions: PredictPosition[];
578
578
  }
579
+ /** Lightweight current-value summary for one provider wallet. */
580
+ interface PositionValue {
581
+ source: ProviderSource;
582
+ user: string;
583
+ /** Current position value in {@link currency}, returned as a decimal string. */
584
+ value: string;
585
+ currency: string;
586
+ }
587
+ /** Provider-specific failure returned by aggregate position value queries. */
588
+ interface PositionValueError {
589
+ source: ProviderSource;
590
+ user?: string;
591
+ code: string;
592
+ message: string;
593
+ }
594
+ /** Response from `GET /api/v1/positions/value`. */
595
+ interface PositionValueResponse {
596
+ /** Populated for single-source or legacy aggregate queries. */
597
+ user?: string;
598
+ /** Populated for multi-wallet queries (keys are external source names). */
599
+ wallets?: Record<string, string>;
600
+ /** Populated for single-source queries. */
601
+ source?: ProviderSource;
602
+ /** Aggregate current position value in {@link currency}. */
603
+ value: string;
604
+ currency: string;
605
+ /** Per-provider values for multi-wallet or aggregate queries. */
606
+ values?: PositionValue[];
607
+ /** True when at least one provider failed but others returned values. */
608
+ partial?: boolean;
609
+ errors?: PositionValueError[];
610
+ }
579
611
  /** Response from `GET /api/v1/balance`. */
580
612
  interface BalanceResponse {
581
613
  user: string;
@@ -887,6 +919,12 @@ interface DFlowSubmitResponse {
887
919
  }
888
920
  /** Order type for Polymarket CLOB. */
889
921
  type PolymarketOrderType = "GTC" | "FOK" | "GTD" | "FAK";
922
+ /**
923
+ * Known Polymarket minimum tick sizes. Must stay in sync with the
924
+ * `ROUNDING_CONFIG` of `@polymarket/clob-client-v2` — sports markets use the
925
+ * finer `0.005` / `0.0025` ticks introduced alongside CLOB V2.
926
+ */
927
+ type PolymarketTickSize = "0.1" | "0.01" | "0.005" | "0.0025" | "0.001" | "0.0001";
890
928
  /**
891
929
  * Input for creating a Polymarket order (limit or market).
892
930
  * @see https://docs.polymarket.com/trading/orders/create
@@ -911,7 +949,7 @@ interface CreateOrderInput {
911
949
  side: OrderSide;
912
950
  orderType?: PolymarketOrderType;
913
951
  /** Minimum tick size for this market (from Polymarket gamma API). */
914
- tickSize: "0.1" | "0.01" | "0.001" | "0.0001";
952
+ tickSize: PolymarketTickSize;
915
953
  /** Whether this is a neg-risk market (uses different exchange contract). */
916
954
  negRisk?: boolean;
917
955
  /** Expiration timestamp (Unix seconds). Required for GTD orders. */
@@ -1250,6 +1288,17 @@ declare class PredictClient {
1250
1288
  kalshi_user?: string;
1251
1289
  polymarket_user?: string;
1252
1290
  }, source?: ProviderSource): Promise<PositionsResponse>;
1291
+ /**
1292
+ * Maps to `GET /api/v1/positions/value`.
1293
+ *
1294
+ * Single-source: `getPositionValue("addr", "polymarket")`.
1295
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
1296
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
1297
+ */
1298
+ getPositionValue(userOrWallets: string | {
1299
+ kalshi_user?: string;
1300
+ polymarket_user?: string;
1301
+ }, source?: ProviderSource): Promise<PositionValueResponse>;
1253
1302
  /**
1254
1303
  * Get the number of shares available for selling, accounting for active orders.
1255
1304
  *
@@ -1921,6 +1970,19 @@ declare const SIDE: {
1921
1970
  readonly BUY: 0;
1922
1971
  readonly SELL: 1;
1923
1972
  };
1973
+ /**
1974
+ * Normalise a raw `minimum_tick_size` value (number or string, e.g. from the
1975
+ * `/tick-size` endpoint) to one of the tick sizes known to the CLOB clients'
1976
+ * rounding configs.
1977
+ *
1978
+ * The official `@polymarket/clob-client-v2` OrderBuilder indexes its
1979
+ * `ROUNDING_CONFIG` by the tick-size string without any fallback — an unknown
1980
+ * key crashes order building with "Cannot read properties of undefined
1981
+ * (reading 'price')". Funnelling every caller through this helper guarantees
1982
+ * we only ever hand the builder a supported tick size (unknown values fall
1983
+ * back to the CLOB-default "0.01").
1984
+ */
1985
+ declare function normalizePolymarketTickSize(raw: number | string | null | undefined): PolymarketTickSize;
1924
1986
  interface BuildOrderMessageInput extends CreateOrderInput {
1925
1987
  /** Signer / owner address. */
1926
1988
  signerAddress: string;
@@ -2041,4 +2103,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2041
2103
  */
2042
2104
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2043
2105
 
2044
- export { type PolymarketWithdrawPrepareRequest as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesMultiParams as D, type EventStats as E, type DFlowQuoteRequest as F, type DFlowQuoteResponse as G, type DFlowSubmitResponse as H, type DFlowSubmitRequest as I, type DFlowKYCStatus as J, type PolymarketSetupStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketDepositWalletDeployResponse as N, type OrderbookOutcome as O, PredictClient as P, type WithdrawBuildRequest as Q, type WithdrawSubmitResponse as R, type SimilarEventsParams as S, type WithdrawSubmitRequest as T, type WithdrawStatusResponse as U, type PolymarketDepositAddresses as V, type WithdrawBuildResponse as W, type PolymarketSupportedAsset as X, type PolymarketWithdrawResponse as Y, type PolymarketWithdrawRequest as Z, type PolymarketWithdrawPrepareResponse as _, PredictWsClient as a, type WsChannel as a$, type PolymarketWithdrawQuoteResponse as a0, type PolymarketWithdrawQuoteRequest as a1, type PolymarketWithdrawRelayBuildResponse as a2, type PolymarketWithdrawRelayBuildRequest as a3, type PolymarketWithdrawRelaySubmitResponse as a4, type PolymarketWithdrawRelaySubmitRequest as a5, type PolymarketWithdrawBridgeStatusResponse as a6, type PolymarketRedeemResponse as a7, type PolymarketTypedData as a8, type TickSizeResponse as a9, type PredictCommentProfile as aA, type PricePoint as aB, type PredictPosition as aC, type OrderStatus as aD, type OrderSide as aE, type DFlowOrderContext as aF, type PolymarketOrderType as aG, type PolymarketWalletKind as aH, type PolymarketDepositWalletDeployRequest as aI, type DepositBuildRequest as aJ, type DepositBuildResponse as aK, type DepositSubmitRequest as aL, type DepositSubmitResponse as aM, type DepositStatusResponse as aN, type UnsignedTx as aO, type PolymarketBridgeToken as aP, type PolymarketSupportedAssetsResponse as aQ, type PolymarketTypedDataArg as aR, type MatchStatus as aS, type MatchGroupEntry as aT, type MatchGroupMarket as aU, type MatchSortField as aV, type MatchesStats as aW, type MatchConfidenceTier as aX, type SignalTag as aY, type MatchLeg as aZ, type MatchMarketFlat as a_, type FeeRateResponse as aa, type RebateConfig as ab, type WsConnectionStatus as ac, type WsDataMessage as ad, type WsPriceEvent as ae, type WsOrderbookEvent as af, type WsTradeEvent as ag, type CreateOrderInput as ah, createPredictClient as ai, type PredictClientOptions as aj, createPredictWsClient as ak, type PredictWsClientConfig as al, type ProviderMeta as am, type PredictTag as an, type SettlementSource as ao, type MarketStatus as ap, type MarketResult as aq, type MarketOutcome as ar, type OrderbookLevel as as, type OrderbookBatchItem as at, type OrderbookBatchResult as au, type OrderbooksBatchRequest as av, type OrderbooksBatchResponse as aw, type TradeType as ax, type EventSummary as ay, type MarketSummary as az, type PredictPage as b, type WsChannelEvent as b0, type WsClientMessage as b1, type WsSubscribeMessage as b2, type WsPingMessage as b3, type WsServerMessage as b4, type WsPongMessage as b5, type WsSubscribedMessage as b6, type WsErrorCode as b7, type WsErrorMessage as b8, type PolymarketRedeemPrepareInput as b9, type BuildClobAuthMessageInput as bA, CTF_EXCHANGE_ADDRESS as bB, NEG_RISK_CTF_EXCHANGE_ADDRESS as bC, USDC_ADDRESS as bD, POLYGON_CHAIN_ID as bE, buildCtfExchangeDomain as bF, CTF_ORDER_TYPES as bG, ORDER_TYPE as bH, SIDE as bI, buildOrderMessage as bJ, buildSignedOrder as bK, buildClobPayload as bL, getPolymarketSharesPrecision as bM, type ClobOrderPayload as bN, type BuildOrderMessageInput as bO, type OrderMessage as bP, type SignedOrder as bQ, DEFAULT_PAGE_SIZE as bR, type PolymarketRedeemPrepareResponse as ba, type PolymarketRedeemInput as bb, eventQueryKey as bc, fetchEvent as bd, resolveTagSlug as be, resolveEventsParams as bf, infiniteEventsQueryKey as bg, fetchEventsPage as bh, type ResolveEventsParamsInput as bi, type TagSlugSelection as bj, marketQueryKey as bk, fetchMarket as bl, matchesQueryKey as bm, matchQueryKey as bn, fetchMatchesPage as bo, matchMarketsQueryKey as bp, fetchMatchMarketsPage as bq, CLOB_AUTH_DOMAIN as br, CLOB_AUTH_TYPES as bs, buildClobAuthMessage as bt, hmacSha256Base64 as bu, buildPolymarketL2Headers as bv, derivePolymarketApiKey as bw, type HttpMethod as bx, type PolymarketL2HeadersInput as by, type PolymarketL2Headers 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 ListOrdersParams as q, type PredictOrder as r, type ListOrdersMultiParams as s, type PredictOrdersResponse as t, type CancelOrderResult as u, type MatchGroupPage as v, type MatchGroup as w, type MatchMarketParams as x, type MatchMarketPage as y, type ListTradesParams as z };
2106
+ 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 };
package/dist/server.d.mts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, bA as BuildClobAuthMessageInput, bO as BuildOrderMessageInput, br as CLOB_AUTH_DOMAIN, bs as CLOB_AUTH_TYPES, bB as CTF_EXCHANGE_ADDRESS, bG as CTF_ORDER_TYPES, u as CancelOrderResult, C as Candlestick, bN as ClobOrderPayload, ah as CreateOrderInput, bR as DEFAULT_PAGE_SIZE, aF as DFlowOrderContext, F as DFlowQuoteRequest, G as DFlowQuoteResponse, I as DFlowSubmitRequest, H as DFlowSubmitResponse, aJ as DepositBuildRequest, aK as DepositBuildResponse, aN as DepositStatusResponse, aL as DepositSubmitRequest, aM as DepositSubmitResponse, f as EventSortField, e as EventStatus, ay as EventSummary, bx as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, q as ListOrdersParams, z as ListTradesParams, ar as MarketOutcome, aq as MarketResult, ap as MarketStatus, az as MarketSummary, aX as MatchConfidenceTier, w as MatchGroup, aT as MatchGroupEntry, aU as MatchGroupMarket, v as MatchGroupPage, aZ as MatchLeg, a_ as MatchMarketFlat, y as MatchMarketPage, x as MatchMarketParams, aV as MatchSortField, aS as MatchStatus, M as MatchesParams, aW as MatchesStats, bC as NEG_RISK_CTF_EXCHANGE_ADDRESS, bH as ORDER_TYPE, bP as OrderMessage, aE as OrderSide, aD as OrderStatus, h as Orderbook, as as OrderbookLevel, bE as POLYGON_CHAIN_ID, bz as PolymarketL2Headers, by as PolymarketL2HeadersInput, aG as PolymarketOrderType, p as PositionsResponse, P as PredictClient, aj as PredictClientOptions, c as PredictEvent, g as PredictMarket, r as PredictOrder, b as PredictPage, aC as PredictPosition, an as PredictTag, j as PredictTrade, a as PredictWsClient, al as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, aB as PricePoint, am as ProviderMeta, d as ProviderSource, bi as ResolveEventsParamsInput, bI as SIDE, ao as SettlementSource, aY as SignalTag, bQ as SignedOrder, S as SimilarEventsParams, bj as TagSlugSelection, ax as TradeType, bD as USDC_ADDRESS, aO as UnsignedTx, a$ as WsChannel, b0 as WsChannelEvent, b1 as WsClientMessage, ac as WsConnectionStatus, ad as WsDataMessage, b7 as WsErrorCode, b8 as WsErrorMessage, af as WsOrderbookEvent, b3 as WsPingMessage, b5 as WsPongMessage, ae as WsPriceEvent, b4 as WsServerMessage, b2 as WsSubscribeMessage, b6 as WsSubscribedMessage, ag as WsTradeEvent, bt as buildClobAuthMessage, bL as buildClobPayload, bF as buildCtfExchangeDomain, bJ as buildOrderMessage, bv as buildPolymarketL2Headers, bK as buildSignedOrder, ai as createPredictClient, ak as createPredictWsClient, bw as derivePolymarketApiKey, bc as eventQueryKey, bd as fetchEvent, bh as fetchEventsPage, bl as fetchMarket, bq as fetchMatchMarketsPage, bo as fetchMatchesPage, bu as hmacSha256Base64, bg as infiniteEventsQueryKey, bk as marketQueryKey, bp as matchMarketsQueryKey, bn as matchQueryKey, bm as matchesQueryKey, bf as resolveEventsParams, be as resolveTagSlug } from './server-h41hs9SR.mjs';
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-Dk8PqvnI.mjs';
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BalanceResponse, bA as BuildClobAuthMessageInput, bO as BuildOrderMessageInput, br as CLOB_AUTH_DOMAIN, bs as CLOB_AUTH_TYPES, bB as CTF_EXCHANGE_ADDRESS, bG as CTF_ORDER_TYPES, u as CancelOrderResult, C as Candlestick, bN as ClobOrderPayload, ah as CreateOrderInput, bR as DEFAULT_PAGE_SIZE, aF as DFlowOrderContext, F as DFlowQuoteRequest, G as DFlowQuoteResponse, I as DFlowSubmitRequest, H as DFlowSubmitResponse, aJ as DepositBuildRequest, aK as DepositBuildResponse, aN as DepositStatusResponse, aL as DepositSubmitRequest, aM as DepositSubmitResponse, f as EventSortField, e as EventStatus, ay as EventSummary, bx as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, q as ListOrdersParams, z as ListTradesParams, ar as MarketOutcome, aq as MarketResult, ap as MarketStatus, az as MarketSummary, aX as MatchConfidenceTier, w as MatchGroup, aT as MatchGroupEntry, aU as MatchGroupMarket, v as MatchGroupPage, aZ as MatchLeg, a_ as MatchMarketFlat, y as MatchMarketPage, x as MatchMarketParams, aV as MatchSortField, aS as MatchStatus, M as MatchesParams, aW as MatchesStats, bC as NEG_RISK_CTF_EXCHANGE_ADDRESS, bH as ORDER_TYPE, bP as OrderMessage, aE as OrderSide, aD as OrderStatus, h as Orderbook, as as OrderbookLevel, bE as POLYGON_CHAIN_ID, bz as PolymarketL2Headers, by as PolymarketL2HeadersInput, aG as PolymarketOrderType, p as PositionsResponse, P as PredictClient, aj as PredictClientOptions, c as PredictEvent, g as PredictMarket, r as PredictOrder, b as PredictPage, aC as PredictPosition, an as PredictTag, j as PredictTrade, a as PredictWsClient, al as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, aB as PricePoint, am as ProviderMeta, d as ProviderSource, bi as ResolveEventsParamsInput, bI as SIDE, ao as SettlementSource, aY as SignalTag, bQ as SignedOrder, S as SimilarEventsParams, bj as TagSlugSelection, ax as TradeType, bD as USDC_ADDRESS, aO as UnsignedTx, a$ as WsChannel, b0 as WsChannelEvent, b1 as WsClientMessage, ac as WsConnectionStatus, ad as WsDataMessage, b7 as WsErrorCode, b8 as WsErrorMessage, af as WsOrderbookEvent, b3 as WsPingMessage, b5 as WsPongMessage, ae as WsPriceEvent, b4 as WsServerMessage, b2 as WsSubscribeMessage, b6 as WsSubscribedMessage, ag as WsTradeEvent, bt as buildClobAuthMessage, bL as buildClobPayload, bF as buildCtfExchangeDomain, bJ as buildOrderMessage, bv as buildPolymarketL2Headers, bK as buildSignedOrder, ai as createPredictClient, ak as createPredictWsClient, bw as derivePolymarketApiKey, bc as eventQueryKey, bd as fetchEvent, bh as fetchEventsPage, bl as fetchMarket, bq as fetchMatchMarketsPage, bo as fetchMatchesPage, bu as hmacSha256Base64, bg as infiniteEventsQueryKey, bk as marketQueryKey, bp as matchMarketsQueryKey, bn as matchQueryKey, bm as matchesQueryKey, bf as resolveEventsParams, be as resolveTagSlug } from './server-h41hs9SR.js';
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-Dk8PqvnI.js';
package/dist/server.js CHANGED
@@ -255,6 +255,23 @@ var PredictClient = class {
255
255
  const url = `${this.endpoint}/api/v1/positions${query}`;
256
256
  return await utils.httpGet(url);
257
257
  }
258
+ /**
259
+ * Maps to `GET /api/v1/positions/value`.
260
+ *
261
+ * Single-source: `getPositionValue("addr", "polymarket")`.
262
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
263
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
264
+ */
265
+ async getPositionValue(userOrWallets, source) {
266
+ let query;
267
+ if (typeof userOrWallets === "string") {
268
+ query = buildQuery({ source, user: userOrWallets });
269
+ } else {
270
+ query = buildQuery(userOrWallets);
271
+ }
272
+ const url = `${this.endpoint}/api/v1/positions/value${query}`;
273
+ return await utils.httpGet(url);
274
+ }
258
275
  // -------------------------------------------------------------------------
259
276
  // Available shares (for sell flow)
260
277
  // -------------------------------------------------------------------------
@@ -1151,6 +1168,8 @@ var SIDE = { BUY: 0, SELL: 1 };
1151
1168
  var ROUNDING_CONFIG = {
1152
1169
  "0.1": { size: 2, price: 1, amount: 3 },
1153
1170
  "0.01": { size: 2, price: 2, amount: 4 },
1171
+ "0.005": { size: 2, price: 3, amount: 5 },
1172
+ "0.0025": { size: 2, price: 4, amount: 6 },
1154
1173
  "0.001": { size: 2, price: 3, amount: 5 },
1155
1174
  "0.0001": { size: 2, price: 4, amount: 6 }
1156
1175
  };