@liberfi.io/react-predict 0.3.60 → 0.3.62

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;
@@ -1250,6 +1282,17 @@ declare class PredictClient {
1250
1282
  kalshi_user?: string;
1251
1283
  polymarket_user?: string;
1252
1284
  }, source?: ProviderSource): Promise<PositionsResponse>;
1285
+ /**
1286
+ * Maps to `GET /api/v1/positions/value`.
1287
+ *
1288
+ * Single-source: `getPositionValue("addr", "polymarket")`.
1289
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
1290
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
1291
+ */
1292
+ getPositionValue(userOrWallets: string | {
1293
+ kalshi_user?: string;
1294
+ polymarket_user?: string;
1295
+ }, source?: ProviderSource): Promise<PositionValueResponse>;
1253
1296
  /**
1254
1297
  * Get the number of shares available for selling, accounting for active orders.
1255
1298
  *
@@ -2041,4 +2084,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2041
2084
  */
2042
2085
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2043
2086
 
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 };
2087
+ 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 SignalTag 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 PolymarketWalletKind as aK, type PolymarketDepositWalletDeployRequest as aL, type DepositBuildRequest as aM, type DepositBuildResponse as aN, type DepositSubmitRequest as aO, type DepositSubmitResponse as aP, type DepositStatusResponse as aQ, type UnsignedTx as aR, type PolymarketBridgeToken as aS, type PolymarketSupportedAssetsResponse as aT, type PolymarketTypedDataArg as aU, type MatchStatus as aV, type MatchGroupEntry as aW, type MatchGroupMarket as aX, type MatchSortField as aY, type MatchesStats as aZ, type MatchConfidenceTier 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 MatchLeg as b0, type MatchMarketFlat as b1, type WsChannel as b2, type WsChannelEvent as b3, type WsClientMessage as b4, type WsSubscribeMessage as b5, type WsPingMessage as b6, type WsServerMessage as b7, type WsPongMessage as b8, type WsSubscribedMessage as b9, type HttpMethod as bA, type PolymarketL2HeadersInput as bB, type PolymarketL2Headers as bC, type BuildClobAuthMessageInput as bD, CTF_EXCHANGE_ADDRESS as bE, NEG_RISK_CTF_EXCHANGE_ADDRESS as bF, USDC_ADDRESS as bG, POLYGON_CHAIN_ID as bH, buildCtfExchangeDomain as bI, CTF_ORDER_TYPES as bJ, ORDER_TYPE as bK, SIDE as bL, buildOrderMessage as bM, buildSignedOrder as bN, buildClobPayload as bO, getPolymarketSharesPrecision as bP, type ClobOrderPayload as bQ, type BuildOrderMessageInput as bR, type OrderMessage as bS, type SignedOrder as bT, DEFAULT_PAGE_SIZE as bU, type WsErrorCode as ba, type WsErrorMessage as bb, type PolymarketRedeemPrepareInput as bc, type PolymarketRedeemPrepareResponse as bd, type PolymarketRedeemInput as be, eventQueryKey as bf, fetchEvent as bg, resolveTagSlug as bh, resolveEventsParams as bi, infiniteEventsQueryKey as bj, fetchEventsPage as bk, type ResolveEventsParamsInput as bl, type TagSlugSelection as bm, marketQueryKey as bn, fetchMarket as bo, matchesQueryKey as bp, matchQueryKey as bq, fetchMatchesPage as br, matchMarketsQueryKey as bs, fetchMatchMarketsPage as bt, CLOB_AUTH_DOMAIN as bu, CLOB_AUTH_TYPES as bv, buildClobAuthMessage as bw, hmacSha256Base64 as bx, buildPolymarketL2Headers as by, derivePolymarketApiKey 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;
@@ -1250,6 +1282,17 @@ declare class PredictClient {
1250
1282
  kalshi_user?: string;
1251
1283
  polymarket_user?: string;
1252
1284
  }, source?: ProviderSource): Promise<PositionsResponse>;
1285
+ /**
1286
+ * Maps to `GET /api/v1/positions/value`.
1287
+ *
1288
+ * Single-source: `getPositionValue("addr", "polymarket")`.
1289
+ * Multi-wallet: `getPositionValue({ kalshi_user: "SOLaddr", polymarket_user: "EVMaddr" })`.
1290
+ * Legacy agg: `getPositionValue("addr")` (same address for all providers).
1291
+ */
1292
+ getPositionValue(userOrWallets: string | {
1293
+ kalshi_user?: string;
1294
+ polymarket_user?: string;
1295
+ }, source?: ProviderSource): Promise<PositionValueResponse>;
1253
1296
  /**
1254
1297
  * Get the number of shares available for selling, accounting for active orders.
1255
1298
  *
@@ -2041,4 +2084,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
2041
2084
  */
2042
2085
  declare function getPolymarketSharesPrecision(tickSize: string): number;
2043
2086
 
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 };
2087
+ 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 SignalTag 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 PolymarketWalletKind as aK, type PolymarketDepositWalletDeployRequest as aL, type DepositBuildRequest as aM, type DepositBuildResponse as aN, type DepositSubmitRequest as aO, type DepositSubmitResponse as aP, type DepositStatusResponse as aQ, type UnsignedTx as aR, type PolymarketBridgeToken as aS, type PolymarketSupportedAssetsResponse as aT, type PolymarketTypedDataArg as aU, type MatchStatus as aV, type MatchGroupEntry as aW, type MatchGroupMarket as aX, type MatchSortField as aY, type MatchesStats as aZ, type MatchConfidenceTier 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 MatchLeg as b0, type MatchMarketFlat as b1, type WsChannel as b2, type WsChannelEvent as b3, type WsClientMessage as b4, type WsSubscribeMessage as b5, type WsPingMessage as b6, type WsServerMessage as b7, type WsPongMessage as b8, type WsSubscribedMessage as b9, type HttpMethod as bA, type PolymarketL2HeadersInput as bB, type PolymarketL2Headers as bC, type BuildClobAuthMessageInput as bD, CTF_EXCHANGE_ADDRESS as bE, NEG_RISK_CTF_EXCHANGE_ADDRESS as bF, USDC_ADDRESS as bG, POLYGON_CHAIN_ID as bH, buildCtfExchangeDomain as bI, CTF_ORDER_TYPES as bJ, ORDER_TYPE as bK, SIDE as bL, buildOrderMessage as bM, buildSignedOrder as bN, buildClobPayload as bO, getPolymarketSharesPrecision as bP, type ClobOrderPayload as bQ, type BuildOrderMessageInput as bR, type OrderMessage as bS, type SignedOrder as bT, DEFAULT_PAGE_SIZE as bU, type WsErrorCode as ba, type WsErrorMessage as bb, type PolymarketRedeemPrepareInput as bc, type PolymarketRedeemPrepareResponse as bd, type PolymarketRedeemInput as be, eventQueryKey as bf, fetchEvent as bg, resolveTagSlug as bh, resolveEventsParams as bi, infiniteEventsQueryKey as bj, fetchEventsPage as bk, type ResolveEventsParamsInput as bl, type TagSlugSelection as bm, marketQueryKey as bn, fetchMarket as bo, matchesQueryKey as bp, matchQueryKey as bq, fetchMatchesPage as br, matchMarketsQueryKey as bs, fetchMatchMarketsPage as bt, CLOB_AUTH_DOMAIN as bu, CLOB_AUTH_TYPES as bv, buildClobAuthMessage as bw, hmacSha256Base64 as bx, buildPolymarketL2Headers as by, derivePolymarketApiKey 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, bD as BuildClobAuthMessageInput, bR as BuildOrderMessageInput, bu as CLOB_AUTH_DOMAIN, bv as CLOB_AUTH_TYPES, bE as CTF_EXCHANGE_ADDRESS, bJ as CTF_ORDER_TYPES, v as CancelOrderResult, C as Candlestick, bQ as ClobOrderPayload, ai as CreateOrderInput, bU as DEFAULT_PAGE_SIZE, aI as DFlowOrderContext, G as DFlowQuoteRequest, H as DFlowQuoteResponse, J as DFlowSubmitRequest, I as DFlowSubmitResponse, aM as DepositBuildRequest, aN as DepositBuildResponse, aQ as DepositStatusResponse, aO as DepositSubmitRequest, aP as DepositSubmitResponse, f as EventSortField, e as EventStatus, az as EventSummary, bA 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, aW as MatchGroupEntry, aX as MatchGroupMarket, w as MatchGroupPage, b0 as MatchLeg, b1 as MatchMarketFlat, z as MatchMarketPage, y as MatchMarketParams, aY as MatchSortField, aV as MatchStatus, M as MatchesParams, aZ as MatchesStats, bF as NEG_RISK_CTF_EXCHANGE_ADDRESS, bK as ORDER_TYPE, bS as OrderMessage, aH as OrderSide, aG as OrderStatus, h as Orderbook, at as OrderbookLevel, bH as POLYGON_CHAIN_ID, bC as PolymarketL2Headers, bB 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, bl as ResolveEventsParamsInput, bL as SIDE, ap as SettlementSource, a$ as SignalTag, bT as SignedOrder, S as SimilarEventsParams, bm as TagSlugSelection, ay as TradeType, bG as USDC_ADDRESS, aR as UnsignedTx, b2 as WsChannel, b3 as WsChannelEvent, b4 as WsClientMessage, ad as WsConnectionStatus, ae as WsDataMessage, ba as WsErrorCode, bb as WsErrorMessage, ag as WsOrderbookEvent, b6 as WsPingMessage, b8 as WsPongMessage, af as WsPriceEvent, b7 as WsServerMessage, b5 as WsSubscribeMessage, b9 as WsSubscribedMessage, ah as WsTradeEvent, bw as buildClobAuthMessage, bO as buildClobPayload, bI as buildCtfExchangeDomain, bM as buildOrderMessage, by as buildPolymarketL2Headers, bN as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bz as derivePolymarketApiKey, bf as eventQueryKey, bg as fetchEvent, bk as fetchEventsPage, bo as fetchMarket, bt as fetchMatchMarketsPage, br as fetchMatchesPage, bx as hmacSha256Base64, bj as infiniteEventsQueryKey, bn as marketQueryKey, bs as matchMarketsQueryKey, bq as matchQueryKey, bp as matchesQueryKey, bi as resolveEventsParams, bh as resolveTagSlug } from './server-BW_QhQos.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, bD as BuildClobAuthMessageInput, bR as BuildOrderMessageInput, bu as CLOB_AUTH_DOMAIN, bv as CLOB_AUTH_TYPES, bE as CTF_EXCHANGE_ADDRESS, bJ as CTF_ORDER_TYPES, v as CancelOrderResult, C as Candlestick, bQ as ClobOrderPayload, ai as CreateOrderInput, bU as DEFAULT_PAGE_SIZE, aI as DFlowOrderContext, G as DFlowQuoteRequest, H as DFlowQuoteResponse, J as DFlowSubmitRequest, I as DFlowSubmitResponse, aM as DepositBuildRequest, aN as DepositBuildResponse, aQ as DepositStatusResponse, aO as DepositSubmitRequest, aP as DepositSubmitResponse, f as EventSortField, e as EventStatus, az as EventSummary, bA 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, aW as MatchGroupEntry, aX as MatchGroupMarket, w as MatchGroupPage, b0 as MatchLeg, b1 as MatchMarketFlat, z as MatchMarketPage, y as MatchMarketParams, aY as MatchSortField, aV as MatchStatus, M as MatchesParams, aZ as MatchesStats, bF as NEG_RISK_CTF_EXCHANGE_ADDRESS, bK as ORDER_TYPE, bS as OrderMessage, aH as OrderSide, aG as OrderStatus, h as Orderbook, at as OrderbookLevel, bH as POLYGON_CHAIN_ID, bC as PolymarketL2Headers, bB 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, bl as ResolveEventsParamsInput, bL as SIDE, ap as SettlementSource, a$ as SignalTag, bT as SignedOrder, S as SimilarEventsParams, bm as TagSlugSelection, ay as TradeType, bG as USDC_ADDRESS, aR as UnsignedTx, b2 as WsChannel, b3 as WsChannelEvent, b4 as WsClientMessage, ad as WsConnectionStatus, ae as WsDataMessage, ba as WsErrorCode, bb as WsErrorMessage, ag as WsOrderbookEvent, b6 as WsPingMessage, b8 as WsPongMessage, af as WsPriceEvent, b7 as WsServerMessage, b5 as WsSubscribeMessage, b9 as WsSubscribedMessage, ah as WsTradeEvent, bw as buildClobAuthMessage, bO as buildClobPayload, bI as buildCtfExchangeDomain, bM as buildOrderMessage, by as buildPolymarketL2Headers, bN as buildSignedOrder, aj as createPredictClient, al as createPredictWsClient, bz as derivePolymarketApiKey, bf as eventQueryKey, bg as fetchEvent, bk as fetchEventsPage, bo as fetchMarket, bt as fetchMatchMarketsPage, br as fetchMatchesPage, bx as hmacSha256Base64, bj as infiniteEventsQueryKey, bn as marketQueryKey, bs as matchMarketsQueryKey, bq as matchQueryKey, bp as matchesQueryKey, bi as resolveEventsParams, bh as resolveTagSlug } from './server-BW_QhQos.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
  // -------------------------------------------------------------------------