@agg-build/sdk 2.1.0 → 2.1.3

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/README.md CHANGED
@@ -255,6 +255,8 @@ Call `client.destroy()` when you no longer need the client to release internal r
255
255
  | `quoteManaged(params)` | Request a 2-min TTL quote with execution steps |
256
256
  | `executeManaged(params)` | Execute a previously quoted trade |
257
257
  | `withdrawManaged(params)` | Withdraw from managed wallets to an external address |
258
+ | `withdrawPreview(params)` | Preview withdrawal receive amount and route fees |
259
+ | `getWithdrawalQuote(params)` | Quote the maximum deliverable withdrawal amount |
258
260
  | `syncManagedBalances()` | Trigger on-chain balance sync |
259
261
  | `cancelManagedOrder(orderId)` | Cancel a pending managed execution order |
260
262
  | `getVenueBalances(venues)` | Get balances across venues |
package/dist/index.d.mts CHANGED
@@ -408,6 +408,7 @@ type WalletTokenBalance = {
408
408
  chains: {
409
409
  chainId: number;
410
410
  tokenAddress: string;
411
+ tokenSymbol?: string | undefined;
411
412
  balanceRaw: string;
412
413
  heldRaw?: string | undefined;
413
414
  availableRaw?: string | undefined;
@@ -434,6 +435,7 @@ type UnifiedBalanceResponse = {
434
435
  chains: {
435
436
  chainId: number;
436
437
  tokenAddress: string;
438
+ tokenSymbol?: string | undefined;
437
439
  balanceRaw: string;
438
440
  heldRaw?: string | undefined;
439
441
  availableRaw?: string | undefined;
@@ -619,6 +621,16 @@ type VenueMarket = {
619
621
  sportsMarketType?: string | null | undefined;
620
622
  /** Sort rank within a sports section (0=moneyline, 1=spread, 2=total, 3+=other). */
621
623
  sectionRank?: number | null | undefined;
624
+ /** Period identifier for sports markets (e.g., "1H", "2H", "Q1", etc.). */
625
+ period?: string | null | undefined;
626
+ /** Normalized subject category for prop-tab grouping (e.g., game_lines, exact_score, etc.). */
627
+ marketCategory?: string | null | undefined;
628
+ /** Section/tab grouping key for sports markets (e.g. "player_props", "totals"). */
629
+ marketGroup?: string | null | undefined;
630
+ /** Fine-grained sub-classification within a marketGroup (e.g. "moneyline", "rushing_yards"). */
631
+ marketSubtype?: string | null | undefined;
632
+ /** Line value for spread/total markets (e.g., 2.5 for totals, 3 for spreads). */
633
+ lineValue?: number | null | undefined;
622
634
  matchedVenueMarkets?: {
623
635
  id: string;
624
636
  venue: Venue;
@@ -672,10 +684,18 @@ type VenueEvent = {
672
684
  startDate?: string | null | undefined;
673
685
  endDate?: string | null | undefined;
674
686
  creationDate?: string | null | undefined;
687
+ /**
688
+ * Scheduled kickoff/start of the underlying game (sports events only).
689
+ * Distinct from `endDate` (market close/expiration), which can sit well
690
+ * after the game. The FE prefers this over `endDate` for the game-date
691
+ * title suffix. Null for non-sports events.
692
+ */
693
+ gameStartTime?: string | null | undefined;
675
694
  slug?: string | null | undefined;
676
695
  subtitle?: string | null | undefined;
677
696
  venues?: Venue[];
678
697
  venueCount?: number | undefined;
698
+ groupMarketCount?: number | undefined;
679
699
  marketCount?: number | undefined;
680
700
  /**
681
701
  * ISO-8601 duration denormalized from Series.recurrence. `null` means
@@ -684,8 +704,12 @@ type VenueEvent = {
684
704
  * enum values.
685
705
  */
686
706
  recurrence?: string | null | undefined;
707
+ /** Deterministic game-level canonical key for cross-venue sports detail loading. */
708
+ aggKey?: string | null | undefined;
687
709
  /** Type-aware structure classification used to sort markets under this event. */
688
710
  structureType?: "candidate" | "sport" | "axis" | "dates" | null | undefined;
711
+ /** Canonical sport slug for sports events (e.g. "basketball", "soccer"); null for non-sports. */
712
+ sport?: string | null | undefined;
689
713
  };
690
714
  type Orderbook = {
691
715
  bids: {
@@ -1463,12 +1487,16 @@ interface WsArbMarketUpdate {
1463
1487
  venueEventId: string | null;
1464
1488
  arbReturn: number;
1465
1489
  ts: number;
1490
+ liquidityUsd?: number;
1491
+ liquidityTier?: "deep" | "shallow";
1466
1492
  }
1467
1493
  interface WsArbFeedEntry {
1468
1494
  marketId: string;
1469
1495
  venueEventId: string | null;
1470
1496
  arbReturn: number;
1471
1497
  ts: number;
1498
+ liquidityUsd?: number;
1499
+ liquidityTier?: "deep" | "shallow";
1472
1500
  }
1473
1501
  interface WsArbFeedBatch {
1474
1502
  type: "arb_feed_batch";
@@ -1751,6 +1779,10 @@ interface AppClientConfigResponse {
1751
1779
  earlyAccessEnabled: boolean;
1752
1780
  authOptions: AppClientAuthOption[];
1753
1781
  }
1782
+ interface RpcTokenResponse {
1783
+ token: string;
1784
+ expiresAt: number;
1785
+ }
1754
1786
  type AggAuthProviderType = "siwe" | "siws" | "google" | "twitter" | "apple" | "email";
1755
1787
  interface AppClientAuthOption {
1756
1788
  provider: AggAuthProviderType;
@@ -2011,6 +2043,36 @@ interface ListRecurringCryptoMarketsOptions {
2011
2043
  includeOrderbookPrices?: boolean;
2012
2044
  includeReferencePrices?: boolean;
2013
2045
  includeDirectVenueMarkets?: boolean;
2046
+ includeOrderbookDepth?: boolean;
2047
+ orderbookDepth?: number;
2048
+ orderbookDepthAmountUsd?: number;
2049
+ }
2050
+ interface RecurringCryptoOrderbookDepthLevel {
2051
+ price: number;
2052
+ size: number;
2053
+ notionalUsd: number;
2054
+ cumulativeSize: number;
2055
+ cumulativeNotionalUsd: number;
2056
+ fillSize: number | null;
2057
+ fillNotionalUsd: number | null;
2058
+ }
2059
+ interface RecurringCryptoOrderbookDepthSide {
2060
+ levels: RecurringCryptoOrderbookDepthLevel[];
2061
+ totalSize: number;
2062
+ totalNotionalUsd: number;
2063
+ requestedNotionalUsd: number | null;
2064
+ filledSize: number | null;
2065
+ filledNotionalUsd: number | null;
2066
+ unfilledNotionalUsd: number | null;
2067
+ avgPrice: number | null;
2068
+ worstPrice: number | null;
2069
+ fillsComplete: boolean | null;
2070
+ }
2071
+ interface RecurringCryptoOutcomeOrderbookDepth {
2072
+ currency: "USD";
2073
+ amountUsd: number | null;
2074
+ buy: RecurringCryptoOrderbookDepthSide;
2075
+ sell: RecurringCryptoOrderbookDepthSide;
2014
2076
  }
2015
2077
  interface RecurringCryptoOutcome {
2016
2078
  /**
@@ -2031,6 +2093,7 @@ interface RecurringCryptoOutcome {
2031
2093
  bestAsk: number | null;
2032
2094
  markSource: MarkSource | string | null;
2033
2095
  lastKnownPrice: number | null;
2096
+ orderbookDepth: RecurringCryptoOutcomeOrderbookDepth | null;
2034
2097
  }
2035
2098
  interface RecurringCryptoMarketMetrics {
2036
2099
  volume: number | null;
@@ -2427,9 +2490,9 @@ interface WithdrawManagedParams {
2427
2490
  /** Positive integer string in the token's native decimals (e.g. "100000" = 0.1 USDC). */
2428
2491
  amountRaw: string;
2429
2492
  tokenSymbol: WithdrawTokenSymbol;
2430
- /** EVM 0x-prefixed 20-byte recipient address. */
2493
+ /** Recipient address. EVM destinations use 0x-prefixed 20-byte hex; Solana uses base58. */
2431
2494
  destinationAddress: string;
2432
- /** EVM chain ID where the recipient should receive funds. Required as of v2026.04. */
2495
+ /** Chain ID where the recipient should receive funds. Required as of v2026.04. */
2433
2496
  destinationChainId: number;
2434
2497
  /**
2435
2498
  * When `true`, the server caps the withdrawal to the maximum deliverable amount
@@ -2481,6 +2544,17 @@ interface WithdrawalExpected {
2481
2544
  }
2482
2545
  /** Body for POST /execution/withdraw/preview — identical to a withdraw request. */
2483
2546
  type WithdrawPreviewParams = WithdrawManagedParams;
2547
+ interface WithdrawalQuoteParams {
2548
+ tokenSymbol: WithdrawTokenSymbol;
2549
+ destinationChainId: number;
2550
+ }
2551
+ interface WithdrawalQuoteResponse {
2552
+ tokenSymbol: WithdrawTokenSymbol;
2553
+ destinationChainId: number;
2554
+ maxDeliverableRaw: string;
2555
+ rawBalanceRaw: string;
2556
+ decimals: number;
2557
+ }
2484
2558
  /** Response from POST /execution/withdraw/preview. All amounts are raw strings in destination-token native decimals. */
2485
2559
  interface WithdrawPreviewResponse {
2486
2560
  receiveAmountRaw: string | null;
@@ -2577,6 +2651,60 @@ type ExecutionOrdersQuery = GetOrdersQuery & {
2577
2651
  mode?: ExecutionMode;
2578
2652
  };
2579
2653
  type ExecutionOrderItem = OrderListItem;
2654
+ type ExecutionStatusQuery = {
2655
+ quoteId: string;
2656
+ mode?: ExecutionMode;
2657
+ };
2658
+ type ExecutionOverallState = "created" | "routing" | "quoting" | "placing" | "confirming" | "filled" | "partially_filled" | "failed" | "cancelled" | "expired";
2659
+ interface ExecutionDagProgress {
2660
+ dagRunId: string;
2661
+ totalSteps: number;
2662
+ currentSequence: number;
2663
+ currentStepType: string | null;
2664
+ completedSequences: number[];
2665
+ stepTypes: Record<number, string>;
2666
+ status: "running" | "completed" | "failed";
2667
+ errorReason: string | null;
2668
+ }
2669
+ interface ExecutionStatusStep {
2670
+ sequence: number;
2671
+ stepType: string;
2672
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
2673
+ attempt: number;
2674
+ startedAt: string | null;
2675
+ completedAt: string | null;
2676
+ errorReason: string | null;
2677
+ }
2678
+ interface ExecutionStatusOrder {
2679
+ orderId: string;
2680
+ venue: string;
2681
+ status: string;
2682
+ event: "filled" | "partial_fill" | "failed" | null;
2683
+ filledAmountRaw?: string;
2684
+ remainingAmountRaw?: string;
2685
+ quotedSharesRaw?: string;
2686
+ actualSharesRaw?: string;
2687
+ quotedToWinRaw?: string;
2688
+ actualToWinRaw?: string;
2689
+ quotedPriceRaw?: string;
2690
+ executionPriceRaw?: string;
2691
+ partialFillReason?: string;
2692
+ errorReason?: string;
2693
+ txHash?: string;
2694
+ updatedAt: string;
2695
+ }
2696
+ interface ExecutionStatusResponse {
2697
+ executionId: string | null;
2698
+ quoteId: string;
2699
+ orderIds: string[];
2700
+ overallState: ExecutionOverallState;
2701
+ terminal: boolean;
2702
+ errorReason: string | null;
2703
+ pollAfterMs: number | null;
2704
+ dagProgress: ExecutionDagProgress | null;
2705
+ steps: ExecutionStatusStep[];
2706
+ orders: ExecutionStatusOrder[];
2707
+ }
2580
2708
  type ExecutionPositionsQuery = GetPositionsQuery & {
2581
2709
  mode?: ExecutionMode;
2582
2710
  };
@@ -2592,6 +2720,9 @@ interface PaperTradingListParams {
2592
2720
  limit?: number;
2593
2721
  cursor?: string;
2594
2722
  }
2723
+ interface PaperTradingAccountListParams extends PaperTradingListParams {
2724
+ externalId?: string;
2725
+ }
2595
2726
  interface CreatePaperTradingAccountParams {
2596
2727
  name?: string;
2597
2728
  externalId?: string;
@@ -2790,6 +2921,8 @@ interface UserActivityWithdrawal extends UserActivityBase {
2790
2921
  destinationAddress: string;
2791
2922
  destinationChainId: string;
2792
2923
  completedAmountRaw: string | null;
2924
+ chainId?: string | null;
2925
+ txHash?: string | null;
2793
2926
  errorMessage: string | null;
2794
2927
  }
2795
2928
  interface UserActivityBridge extends UserActivityBase {
@@ -3318,14 +3451,24 @@ interface CorrelatedMarketsStatus {
3318
3451
  interface CorrelatedMarketQueryResult {
3319
3452
  venueMarketId: string;
3320
3453
  marketQuestion: string;
3454
+ marketStatus: MarketStatus;
3455
+ marketStartDate: string;
3456
+ marketEndDate: string | null;
3321
3457
  eventTitle: string;
3458
+ eventStatus: MarketStatus;
3459
+ eventStartDate: string;
3460
+ eventEndDate: string | null;
3322
3461
  score: number;
3323
3462
  matchedSignal: CorrelatedMarketSignal;
3463
+ matchSource: "signal" | "title_fallback";
3324
3464
  venue: string;
3325
3465
  }
3326
3466
  interface CorrelatedMarketCascadeItem {
3327
3467
  venueEventId: string;
3328
3468
  eventTitle: string;
3469
+ eventStatus: MarketStatus;
3470
+ eventStartDate: string;
3471
+ eventEndDate: string | null;
3329
3472
  score: number;
3330
3473
  action: string;
3331
3474
  reason: string;
@@ -3397,6 +3540,7 @@ declare class AggClient {
3397
3540
  private paperTradingAccountsPath;
3398
3541
  private paperTradingAccountPath;
3399
3542
  private paperTradingListQuery;
3543
+ private paperTradingAccountListQuery;
3400
3544
  private withAuthPayload;
3401
3545
  private restoreSession;
3402
3546
  private persistSession;
@@ -3516,6 +3660,8 @@ declare class AggClient {
3516
3660
  * rollup (total cost, share-weighted avg price, to-win).
3517
3661
  */
3518
3662
  getExecutionOrders(params?: ExecutionOrdersQuery): Promise<PaginatedResponse<ExecutionOrderItem>>;
3663
+ /** Get quote-scoped execution progress, DAG step state, and order leg terminal status. */
3664
+ getExecutionStatus(params: ExecutionStatusQuery): Promise<ExecutionStatusResponse>;
3519
3665
  /** Unified user activity feed (trades, deposits, withdrawals, bridges, wallet ops). */
3520
3666
  getUserActivity(params?: UserActivityQuery): Promise<PaginatedResponse<UserActivityItem>>;
3521
3667
  /** List execution positions for the authenticated user (cursor pagination). */
@@ -3525,7 +3671,7 @@ declare class AggClient {
3525
3671
  /** Create a server-managed paper trading account for an app. Requires adminKey or apiKey. */
3526
3672
  createPaperTradingAccount(params: CreatePaperTradingAccountParams, options?: PaperTradingAppOptions): Promise<PaperTradingAccount>;
3527
3673
  /** List server-managed paper trading accounts for an app. Requires adminKey or apiKey. */
3528
- listPaperTradingAccounts(params?: PaperTradingListParams & PaperTradingAppOptions): Promise<PaperTradingAccountsPage>;
3674
+ listPaperTradingAccounts(params?: PaperTradingAccountListParams & PaperTradingAppOptions): Promise<PaperTradingAccountsPage>;
3529
3675
  /** Fetch a server-managed paper trading account. Requires adminKey or apiKey. */
3530
3676
  getPaperTradingAccount(accountId: string, options?: PaperTradingAppOptions): Promise<PaperTradingAccount>;
3531
3677
  /** Set a paper trading account cash balance. Requires adminKey or apiKey. */
@@ -3560,6 +3706,13 @@ declare class AggClient {
3560
3706
  maxYesPrice?: number;
3561
3707
  /** ISO-8601 timestamp. Hides events with endDate <= this value. NULL-endDate events are kept. */
3562
3708
  endDateFrom?: string;
3709
+ /**
3710
+ * When true, fold same-venue companion events into one tile per game
3711
+ * (`groupParentId IS NULL`). Sent as `grouped=true`; omitted when false/absent
3712
+ * (default = ungrouped). Consumers showing one tile per game need a detail
3713
+ * view that loads the folded companions via aggKey.
3714
+ */
3715
+ grouped?: boolean;
3563
3716
  }): Promise<PaginatedResponse<VenueEvent>>;
3564
3717
  /** Get a single venue event by ID. Requires appId or admin auth. */
3565
3718
  getVenueEventById(id: string, options?: {
@@ -3579,10 +3732,16 @@ declare class AggClient {
3579
3732
  matchStatus?: MatchStatus;
3580
3733
  status?: MarketStatus;
3581
3734
  categoryIds?: string[];
3735
+ aggKey?: string[];
3736
+ sportsMarketType?: string[];
3737
+ period?: string[];
3738
+ marketCategory?: string[];
3739
+ marketGroup?: string[];
3582
3740
  limit?: number;
3583
3741
  cursor?: string;
3584
3742
  sortBy?: "volume" | "volume24hr" | "createdAt" | "yesPrice" | "updatedAt";
3585
3743
  sortDir?: "asc" | "desc";
3744
+ context?: "list" | "detail";
3586
3745
  }): Promise<PaginatedResponse<VenueMarket>>;
3587
3746
  /** Get categories with cursor-based pagination. Requires appId. */
3588
3747
  getCategories(options?: {
@@ -3592,6 +3751,8 @@ declare class AggClient {
3592
3751
  }): Promise<PaginatedResponse<Category>>;
3593
3752
  /** Get per-app UI config (disabled venues + category presets). Requires appId. */
3594
3753
  getAppConfig(init?: RequestInit): Promise<AppClientConfigResponse>;
3754
+ /** Get a temporary Alchemy JWT token for RPC connections. */
3755
+ getRpcToken(init?: RequestInit): Promise<RpcTokenResponse>;
3595
3756
  private buildNewsFeedQuery;
3596
3757
  /** List available market news feeds and item counts. */
3597
3758
  getNewsFeeds(options?: {
@@ -3636,6 +3797,8 @@ declare class AggClient {
3636
3797
  text: string;
3637
3798
  limit?: number;
3638
3799
  includeResolved?: boolean;
3800
+ direction?: "more_likely" | "less_likely";
3801
+ balanced?: boolean;
3639
3802
  }, options?: {
3640
3803
  signal?: AbortSignal;
3641
3804
  }): Promise<{
@@ -3722,6 +3885,8 @@ declare class AggClient {
3722
3885
  * integrating against the SDK can ignore this entirely.
3723
3886
  */
3724
3887
  withdrawPreview(params: WithdrawPreviewParams): Promise<WithdrawPreviewResponse>;
3888
+ /** Quote maximum deliverable withdrawal amount for a token and destination chain. */
3889
+ getWithdrawalQuote(params: WithdrawalQuoteParams): Promise<WithdrawalQuoteResponse>;
3725
3890
  /**
3726
3891
  * Read the current persisted state of a withdrawal. Used as a backfill for
3727
3892
  * the WS lifecycle channel: the client polls this on hook mount and on WS
@@ -3834,4 +3999,4 @@ declare function aggregateMidpoint(midpoints: (number | null | undefined)[]): nu
3834
3999
 
3835
4000
  declare function createAggClient(options: AggClientOptions): AggClient;
3836
4001
 
3837
- export { type Account, AccountProvider, AccountType, type AggAuthDeliveryMode, type AggAuthProviderType, type AggAuthStartBody, type AggAuthStartResult, type AggAuthVerifyBody, AggClient, type AggClientAuthOptions, type AggClientSessionInput, type AggLinkAccountBody, type AggLinkAccountConfirmResult, type AggLinkAccountResult, type AggSessionUser, AggWebSocket, type AggWebSocketCallbacks, type AggWebSocketOptions, type AggregatedOrderbookLevel, type AggregatedOrderbookResponse, type App, type AppClientConfigResponse, type AttributedOrderbook, type AttributedOrderbookLevel, type AuthCodeResponse, type AuthStatus, type AuthTokenResponse, type AuthUser, type BatchMidpointsResponse, type BatchOrderbooksResponse, type BuildVenueUrlOpts, CONFIRMED_MATCH_STATUSES, type CancelManagedExecutionResponse, type Candle, CandleBuilder, type CandleInterval, type Category, Chain, type ChartBarsResponse, type ChartCandle, type ChartResolution, type ChartVenueCandles, type ComputeSplitsRequest, type ComputeSplitsResponse, type ComputeSplitsSelection, type CorrelatedMarketCascadeItem, type CorrelatedMarketCascadeResponse, type CorrelatedMarketQueryResult, type CorrelatedMarketSide, type CorrelatedMarketSignal, type CorrelatedMarketSignalBatch, type CorrelatedMarketSignalDirection, type CorrelatedMarketsStatus, type CreateApp, type CreatePaperTradingAccountParams, type CryptoReferencePriceError, type CryptoReferencePriceExternalMarketInput, type CryptoReferencePriceMarketInput, type CryptoReferencePriceResult, type CryptoReferencePriceSource, type CryptoReferencePriceTarget, type CryptoReferencePricesResponse, type DepositAddressesPendingResponse, type DepositAddressesReadyResponse, type DepositAddressesResponse, type DepositAddressesSupportedChain, type DepositAddressesToken, type DepositStep, type DiagnosticCallback, type DiagnosticEvent, type ExecuteManagedParams, type ExecuteManagedRequest, type ExecuteManagedResponse, type ExecuteTradeRequest, type ExecuteTradeResponse, type ExecutionMode, type ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionPositionGroup, type ExecutionPositionsQuery, type GetBalanceQuery, type GetBalanceResponse, type GetCryptoReferencePricesOptions, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type ListRecurringCryptoMarketsOptions, type ManagedBalancesParams, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedMidpointOutcome, type MatchedOrderbookMarket, type MatchedVenueMarketOutcomeRef, type MatchingReport, type MidpointItem, type MidpointRow, type NewsFeedArticleFeedItem, type NewsFeedArticleFeedResponse, type NewsFeedArticleWithSummary, type NewsFeedLinkedMarket, type NewsFeedListResponse, type NewsFeedMarketFeedArticle, type NewsFeedMarketFeedItem, type NewsFeedMarketFeedResponse, type NewsFeedMarketNewsParams, type NewsFeedMarketNewsResponse, type NewsFeedMarketNewsResult, type NewsFeedPageOptions, type NewsFeedStatusResponse, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, OrderType, type Orderbook, type OrderbookBatchItemError, type OrderbookBatchItemErrorCode, type OrderbookBatchItemStatus, type OrderbookHistoryPoint, type OrderbookHistoryResponse, type OrderbookLevel, type OrderbookQuoteFill, type OrderbookQuoteParams, type OrderbookQuoteResponse, type OrderbookServiceUnavailableError, type OrderbookState, type OrderbooksOnlyError, type OutcomeMidpoint, type OutcomeMidpointRow, type OutcomeOrderbookResponse, type PaginatedResponse, type PaperTradingAccount, type PaperTradingAccountsPage, type PaperTradingAppOptions, type PaperTradingBalanceAdjustment, type PaperTradingBalanceResponse, type PaperTradingLiquidityStatus, type PaperTradingListParams, type PaperTradingMarkSource, type PaperTradingOrder, type PaperTradingOrdersPage, type PaperTradingPortfolio, type PaperTradingPosition, type PaperTradingPositionsPage, type PersistedAuthSnapshot, type PlacePaperTradingOrderParams, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, RECURRENCE_CADENCES, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RecurrenceCadence, type RecurrenceFilter, type RecurringCryptoComparisonPoint, type RecurringCryptoComparisonPriceSource, type RecurringCryptoDuration, type RecurringCryptoDurationInput, type RecurringCryptoMarketMetrics, type RecurringCryptoMarketsResponse, type RecurringCryptoOutcome, type RecurringCryptoPriceComparison, type RecurringCryptoReferencePrice, type RecurringCryptoResolution, type RecurringCryptoSourceConfidence, type RecurringCryptoVenueMarket, type RecurringCryptoWindowComparisons, type RecurringCryptoWindowMarket, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type ResetPaperTradingAccountParams, type ResolveCorrelatedMarketsParams, type ResolveCorrelatedMarketsResponse, type ResolvedCorrelatedMarketsResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, type SetPaperTradingBalanceParams, type SettlementSource, type SetupDepositAddressStep, type SetupVenueKeyStep, type SimpleOrderbookLevel, type SmartRouteAllocation, type SmartRouteBridgeStep, type SmartRouteFeeBreakdown, type SmartRouteFill, type SmartRouteParams, type SmartRouteResponse, type SmartRouteSetupCostLine, type SmartRouteSide, type SmartRouteStatus, type SmartRouteVenueFill, type SplitsByAmountResult, type SyncBalancesResponse, TimeInForce, type TradeExecutorOrder, type TradeExecutorOrderListResponse, TradeSide$1 as TradeSide, type TradeSplit, type TradeStep, TurnstileChallengeError, type UnifiedBalanceResponse, type UpdateUserBody, type UpsertVenueKey, type UserActivityBridge, type UserActivityDeposit, type UserActivityItem, type UserActivityQuery, type UserActivityRedeem, type UserActivityRedeemLeg, type UserActivityTrade, type UserActivityType, type UserActivityUserOp, type UserActivityWithdrawal, type UserHolding, type UserProfile, VENUES, type ValidateBalanceOnClientStep, type ValidateManagedParams, type ValidateManagedRequest, type ValidateManagedResponse, type ValidateTradeRequest, type ValidateTradeResponse, Venue, type VenueEvent, type VenueEventListItem, type VenueEventWithMarkets, type VenueKeySummary, type VenueMarket, type VenueMarketClusterNode, type VenueMarketListItem, type VenueMarketOutcome, type VenueMarketRef, type VenueOrderbookEntry, type VenueOrderbookLevel, type VenuePositionBalance, type VenuePriceInfo, type VenueSoloQuote, type VerifyBody, type VerifyResponse, type WalletChainBalance, type WalletTokenBalance, type WithdrawManagedParams, type WithdrawManagedRequest, type WithdrawManagedResponse, type WithdrawManagedSourceItem, type WithdrawPreviewParams, type WithdrawPreviewResponse, type WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, type WithdrawalSourceTokenSymbol, type WsArbFeedBatch, type WsArbFeedEntry, type WsArbMarketUpdate, type WsAttributedLevel, type WsAuthenticated, type WsBalanceUpdate, type WsCandleInterval, type WsClientMessage, type WsConnected, type WsError, type WsHeartbeat, type WsMarkSource, type WsMarketResolved, type WsOrderEvent, type WsOrderEventType, type WsOrderSubmitted, type WsOrderbookDelta, type WsOrderbookSnapshot, type WsRedeemEvent, type WsServerMessage, type WsSubscribed, type WsTrade, type WsUnsubscribed, type WsVenueBook, type WsVenueInfo, type WsVenueLevel, type WsWithdrawalLegStatus, type WsWithdrawalLifecycleEvent, type WsWithdrawalLifecycleLeg, type WsWithdrawalLifecycleStatus, aggregateMidpoint, applyOrderbookDelta, buildVenueUrl, computeBestSplitsByAmount, computeChecksum, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getWalletAddressFromUserProfile, hasShape, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, parse, parseEmail, parseEmailStrict, safeParse, snapshotToOrderbook, sortVenues };
4002
+ export { type Account, AccountProvider, AccountType, type AggAuthDeliveryMode, type AggAuthProviderType, type AggAuthStartBody, type AggAuthStartResult, type AggAuthVerifyBody, AggClient, type AggClientAuthOptions, type AggClientSessionInput, type AggLinkAccountBody, type AggLinkAccountConfirmResult, type AggLinkAccountResult, type AggSessionUser, AggWebSocket, type AggWebSocketCallbacks, type AggWebSocketOptions, type AggregatedOrderbookLevel, type AggregatedOrderbookResponse, type App, type AppClientConfigResponse, type AttributedOrderbook, type AttributedOrderbookLevel, type AuthCodeResponse, type AuthStatus, type AuthTokenResponse, type AuthUser, type BatchMidpointsResponse, type BatchOrderbooksResponse, type BuildVenueUrlOpts, CONFIRMED_MATCH_STATUSES, type CancelManagedExecutionResponse, type Candle, CandleBuilder, type CandleInterval, type Category, Chain, type ChartBarsResponse, type ChartCandle, type ChartResolution, type ChartVenueCandles, type ComputeSplitsRequest, type ComputeSplitsResponse, type ComputeSplitsSelection, type CorrelatedMarketCascadeItem, type CorrelatedMarketCascadeResponse, type CorrelatedMarketQueryResult, type CorrelatedMarketSide, type CorrelatedMarketSignal, type CorrelatedMarketSignalBatch, type CorrelatedMarketSignalDirection, type CorrelatedMarketsStatus, type CreateApp, type CreatePaperTradingAccountParams, type CryptoReferencePriceError, type CryptoReferencePriceExternalMarketInput, type CryptoReferencePriceMarketInput, type CryptoReferencePriceResult, type CryptoReferencePriceSource, type CryptoReferencePriceTarget, type CryptoReferencePricesResponse, type DepositAddressesPendingResponse, type DepositAddressesReadyResponse, type DepositAddressesResponse, type DepositAddressesSupportedChain, type DepositAddressesToken, type DepositStep, type DiagnosticCallback, type DiagnosticEvent, type ExecuteManagedParams, type ExecuteManagedRequest, type ExecuteManagedResponse, type ExecuteTradeRequest, type ExecuteTradeResponse, type ExecutionDagProgress, type ExecutionMode, type ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionOverallState, type ExecutionPositionGroup, type ExecutionPositionsQuery, type ExecutionStatusOrder, type ExecutionStatusQuery, type ExecutionStatusResponse, type ExecutionStatusStep, type GetBalanceQuery, type GetBalanceResponse, type GetCryptoReferencePricesOptions, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type ListRecurringCryptoMarketsOptions, type ManagedBalancesParams, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedMidpointOutcome, type MatchedOrderbookMarket, type MatchedVenueMarketOutcomeRef, type MatchingReport, type MidpointItem, type MidpointRow, type NewsFeedArticleFeedItem, type NewsFeedArticleFeedResponse, type NewsFeedArticleWithSummary, type NewsFeedLinkedMarket, type NewsFeedListResponse, type NewsFeedMarketFeedArticle, type NewsFeedMarketFeedItem, type NewsFeedMarketFeedResponse, type NewsFeedMarketNewsParams, type NewsFeedMarketNewsResponse, type NewsFeedMarketNewsResult, type NewsFeedPageOptions, type NewsFeedStatusResponse, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, OrderType, type Orderbook, type OrderbookBatchItemError, type OrderbookBatchItemErrorCode, type OrderbookBatchItemStatus, type OrderbookHistoryPoint, type OrderbookHistoryResponse, type OrderbookLevel, type OrderbookQuoteFill, type OrderbookQuoteParams, type OrderbookQuoteResponse, type OrderbookServiceUnavailableError, type OrderbookState, type OrderbooksOnlyError, type OutcomeMidpoint, type OutcomeMidpointRow, type OutcomeOrderbookResponse, type PaginatedResponse, type PaperTradingAccount, type PaperTradingAccountsPage, type PaperTradingAppOptions, type PaperTradingBalanceAdjustment, type PaperTradingBalanceResponse, type PaperTradingLiquidityStatus, type PaperTradingListParams, type PaperTradingMarkSource, type PaperTradingOrder, type PaperTradingOrdersPage, type PaperTradingPortfolio, type PaperTradingPosition, type PaperTradingPositionsPage, type PersistedAuthSnapshot, type PlacePaperTradingOrderParams, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, RECURRENCE_CADENCES, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RecurrenceCadence, type RecurrenceFilter, type RecurringCryptoComparisonPoint, type RecurringCryptoComparisonPriceSource, type RecurringCryptoDuration, type RecurringCryptoDurationInput, type RecurringCryptoMarketMetrics, type RecurringCryptoMarketsResponse, type RecurringCryptoOrderbookDepthLevel, type RecurringCryptoOrderbookDepthSide, type RecurringCryptoOutcome, type RecurringCryptoOutcomeOrderbookDepth, type RecurringCryptoPriceComparison, type RecurringCryptoReferencePrice, type RecurringCryptoResolution, type RecurringCryptoSourceConfidence, type RecurringCryptoVenueMarket, type RecurringCryptoWindowComparisons, type RecurringCryptoWindowMarket, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type ResetPaperTradingAccountParams, type ResolveCorrelatedMarketsParams, type ResolveCorrelatedMarketsResponse, type ResolvedCorrelatedMarketsResponse, type RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, type SetPaperTradingBalanceParams, type SettlementSource, type SetupDepositAddressStep, type SetupVenueKeyStep, type SimpleOrderbookLevel, type SmartRouteAllocation, type SmartRouteBridgeStep, type SmartRouteFeeBreakdown, type SmartRouteFill, type SmartRouteParams, type SmartRouteResponse, type SmartRouteSetupCostLine, type SmartRouteSide, type SmartRouteStatus, type SmartRouteVenueFill, type SplitsByAmountResult, type SyncBalancesResponse, TimeInForce, type TradeExecutorOrder, type TradeExecutorOrderListResponse, TradeSide$1 as TradeSide, type TradeSplit, type TradeStep, TurnstileChallengeError, type UnifiedBalanceResponse, type UpdateUserBody, type UpsertVenueKey, type UserActivityBridge, type UserActivityDeposit, type UserActivityItem, type UserActivityQuery, type UserActivityRedeem, type UserActivityRedeemLeg, type UserActivityTrade, type UserActivityType, type UserActivityUserOp, type UserActivityWithdrawal, type UserHolding, type UserProfile, VENUES, type ValidateBalanceOnClientStep, type ValidateManagedParams, type ValidateManagedRequest, type ValidateManagedResponse, type ValidateTradeRequest, type ValidateTradeResponse, Venue, type VenueEvent, type VenueEventListItem, type VenueEventWithMarkets, type VenueKeySummary, type VenueMarket, type VenueMarketClusterNode, type VenueMarketListItem, type VenueMarketOutcome, type VenueMarketRef, type VenueOrderbookEntry, type VenueOrderbookLevel, type VenuePositionBalance, type VenuePriceInfo, type VenueSoloQuote, type VerifyBody, type VerifyResponse, type WalletChainBalance, type WalletTokenBalance, type WithdrawManagedParams, type WithdrawManagedRequest, type WithdrawManagedResponse, type WithdrawManagedSourceItem, type WithdrawPreviewParams, type WithdrawPreviewResponse, type WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalQuoteParams, type WithdrawalQuoteResponse, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, type WithdrawalSourceTokenSymbol, type WsArbFeedBatch, type WsArbFeedEntry, type WsArbMarketUpdate, type WsAttributedLevel, type WsAuthenticated, type WsBalanceUpdate, type WsCandleInterval, type WsClientMessage, type WsConnected, type WsError, type WsHeartbeat, type WsMarkSource, type WsMarketResolved, type WsOrderEvent, type WsOrderEventType, type WsOrderSubmitted, type WsOrderbookDelta, type WsOrderbookSnapshot, type WsRedeemEvent, type WsServerMessage, type WsSubscribed, type WsTrade, type WsUnsubscribed, type WsVenueBook, type WsVenueInfo, type WsVenueLevel, type WsWithdrawalLegStatus, type WsWithdrawalLifecycleEvent, type WsWithdrawalLifecycleLeg, type WsWithdrawalLifecycleStatus, aggregateMidpoint, applyOrderbookDelta, buildVenueUrl, computeBestSplitsByAmount, computeChecksum, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getWalletAddressFromUserProfile, hasShape, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, parse, parseEmail, parseEmailStrict, safeParse, snapshotToOrderbook, sortVenues };
package/dist/index.d.ts CHANGED
@@ -408,6 +408,7 @@ type WalletTokenBalance = {
408
408
  chains: {
409
409
  chainId: number;
410
410
  tokenAddress: string;
411
+ tokenSymbol?: string | undefined;
411
412
  balanceRaw: string;
412
413
  heldRaw?: string | undefined;
413
414
  availableRaw?: string | undefined;
@@ -434,6 +435,7 @@ type UnifiedBalanceResponse = {
434
435
  chains: {
435
436
  chainId: number;
436
437
  tokenAddress: string;
438
+ tokenSymbol?: string | undefined;
437
439
  balanceRaw: string;
438
440
  heldRaw?: string | undefined;
439
441
  availableRaw?: string | undefined;
@@ -619,6 +621,16 @@ type VenueMarket = {
619
621
  sportsMarketType?: string | null | undefined;
620
622
  /** Sort rank within a sports section (0=moneyline, 1=spread, 2=total, 3+=other). */
621
623
  sectionRank?: number | null | undefined;
624
+ /** Period identifier for sports markets (e.g., "1H", "2H", "Q1", etc.). */
625
+ period?: string | null | undefined;
626
+ /** Normalized subject category for prop-tab grouping (e.g., game_lines, exact_score, etc.). */
627
+ marketCategory?: string | null | undefined;
628
+ /** Section/tab grouping key for sports markets (e.g. "player_props", "totals"). */
629
+ marketGroup?: string | null | undefined;
630
+ /** Fine-grained sub-classification within a marketGroup (e.g. "moneyline", "rushing_yards"). */
631
+ marketSubtype?: string | null | undefined;
632
+ /** Line value for spread/total markets (e.g., 2.5 for totals, 3 for spreads). */
633
+ lineValue?: number | null | undefined;
622
634
  matchedVenueMarkets?: {
623
635
  id: string;
624
636
  venue: Venue;
@@ -672,10 +684,18 @@ type VenueEvent = {
672
684
  startDate?: string | null | undefined;
673
685
  endDate?: string | null | undefined;
674
686
  creationDate?: string | null | undefined;
687
+ /**
688
+ * Scheduled kickoff/start of the underlying game (sports events only).
689
+ * Distinct from `endDate` (market close/expiration), which can sit well
690
+ * after the game. The FE prefers this over `endDate` for the game-date
691
+ * title suffix. Null for non-sports events.
692
+ */
693
+ gameStartTime?: string | null | undefined;
675
694
  slug?: string | null | undefined;
676
695
  subtitle?: string | null | undefined;
677
696
  venues?: Venue[];
678
697
  venueCount?: number | undefined;
698
+ groupMarketCount?: number | undefined;
679
699
  marketCount?: number | undefined;
680
700
  /**
681
701
  * ISO-8601 duration denormalized from Series.recurrence. `null` means
@@ -684,8 +704,12 @@ type VenueEvent = {
684
704
  * enum values.
685
705
  */
686
706
  recurrence?: string | null | undefined;
707
+ /** Deterministic game-level canonical key for cross-venue sports detail loading. */
708
+ aggKey?: string | null | undefined;
687
709
  /** Type-aware structure classification used to sort markets under this event. */
688
710
  structureType?: "candidate" | "sport" | "axis" | "dates" | null | undefined;
711
+ /** Canonical sport slug for sports events (e.g. "basketball", "soccer"); null for non-sports. */
712
+ sport?: string | null | undefined;
689
713
  };
690
714
  type Orderbook = {
691
715
  bids: {
@@ -1463,12 +1487,16 @@ interface WsArbMarketUpdate {
1463
1487
  venueEventId: string | null;
1464
1488
  arbReturn: number;
1465
1489
  ts: number;
1490
+ liquidityUsd?: number;
1491
+ liquidityTier?: "deep" | "shallow";
1466
1492
  }
1467
1493
  interface WsArbFeedEntry {
1468
1494
  marketId: string;
1469
1495
  venueEventId: string | null;
1470
1496
  arbReturn: number;
1471
1497
  ts: number;
1498
+ liquidityUsd?: number;
1499
+ liquidityTier?: "deep" | "shallow";
1472
1500
  }
1473
1501
  interface WsArbFeedBatch {
1474
1502
  type: "arb_feed_batch";
@@ -1751,6 +1779,10 @@ interface AppClientConfigResponse {
1751
1779
  earlyAccessEnabled: boolean;
1752
1780
  authOptions: AppClientAuthOption[];
1753
1781
  }
1782
+ interface RpcTokenResponse {
1783
+ token: string;
1784
+ expiresAt: number;
1785
+ }
1754
1786
  type AggAuthProviderType = "siwe" | "siws" | "google" | "twitter" | "apple" | "email";
1755
1787
  interface AppClientAuthOption {
1756
1788
  provider: AggAuthProviderType;
@@ -2011,6 +2043,36 @@ interface ListRecurringCryptoMarketsOptions {
2011
2043
  includeOrderbookPrices?: boolean;
2012
2044
  includeReferencePrices?: boolean;
2013
2045
  includeDirectVenueMarkets?: boolean;
2046
+ includeOrderbookDepth?: boolean;
2047
+ orderbookDepth?: number;
2048
+ orderbookDepthAmountUsd?: number;
2049
+ }
2050
+ interface RecurringCryptoOrderbookDepthLevel {
2051
+ price: number;
2052
+ size: number;
2053
+ notionalUsd: number;
2054
+ cumulativeSize: number;
2055
+ cumulativeNotionalUsd: number;
2056
+ fillSize: number | null;
2057
+ fillNotionalUsd: number | null;
2058
+ }
2059
+ interface RecurringCryptoOrderbookDepthSide {
2060
+ levels: RecurringCryptoOrderbookDepthLevel[];
2061
+ totalSize: number;
2062
+ totalNotionalUsd: number;
2063
+ requestedNotionalUsd: number | null;
2064
+ filledSize: number | null;
2065
+ filledNotionalUsd: number | null;
2066
+ unfilledNotionalUsd: number | null;
2067
+ avgPrice: number | null;
2068
+ worstPrice: number | null;
2069
+ fillsComplete: boolean | null;
2070
+ }
2071
+ interface RecurringCryptoOutcomeOrderbookDepth {
2072
+ currency: "USD";
2073
+ amountUsd: number | null;
2074
+ buy: RecurringCryptoOrderbookDepthSide;
2075
+ sell: RecurringCryptoOrderbookDepthSide;
2014
2076
  }
2015
2077
  interface RecurringCryptoOutcome {
2016
2078
  /**
@@ -2031,6 +2093,7 @@ interface RecurringCryptoOutcome {
2031
2093
  bestAsk: number | null;
2032
2094
  markSource: MarkSource | string | null;
2033
2095
  lastKnownPrice: number | null;
2096
+ orderbookDepth: RecurringCryptoOutcomeOrderbookDepth | null;
2034
2097
  }
2035
2098
  interface RecurringCryptoMarketMetrics {
2036
2099
  volume: number | null;
@@ -2427,9 +2490,9 @@ interface WithdrawManagedParams {
2427
2490
  /** Positive integer string in the token's native decimals (e.g. "100000" = 0.1 USDC). */
2428
2491
  amountRaw: string;
2429
2492
  tokenSymbol: WithdrawTokenSymbol;
2430
- /** EVM 0x-prefixed 20-byte recipient address. */
2493
+ /** Recipient address. EVM destinations use 0x-prefixed 20-byte hex; Solana uses base58. */
2431
2494
  destinationAddress: string;
2432
- /** EVM chain ID where the recipient should receive funds. Required as of v2026.04. */
2495
+ /** Chain ID where the recipient should receive funds. Required as of v2026.04. */
2433
2496
  destinationChainId: number;
2434
2497
  /**
2435
2498
  * When `true`, the server caps the withdrawal to the maximum deliverable amount
@@ -2481,6 +2544,17 @@ interface WithdrawalExpected {
2481
2544
  }
2482
2545
  /** Body for POST /execution/withdraw/preview — identical to a withdraw request. */
2483
2546
  type WithdrawPreviewParams = WithdrawManagedParams;
2547
+ interface WithdrawalQuoteParams {
2548
+ tokenSymbol: WithdrawTokenSymbol;
2549
+ destinationChainId: number;
2550
+ }
2551
+ interface WithdrawalQuoteResponse {
2552
+ tokenSymbol: WithdrawTokenSymbol;
2553
+ destinationChainId: number;
2554
+ maxDeliverableRaw: string;
2555
+ rawBalanceRaw: string;
2556
+ decimals: number;
2557
+ }
2484
2558
  /** Response from POST /execution/withdraw/preview. All amounts are raw strings in destination-token native decimals. */
2485
2559
  interface WithdrawPreviewResponse {
2486
2560
  receiveAmountRaw: string | null;
@@ -2577,6 +2651,60 @@ type ExecutionOrdersQuery = GetOrdersQuery & {
2577
2651
  mode?: ExecutionMode;
2578
2652
  };
2579
2653
  type ExecutionOrderItem = OrderListItem;
2654
+ type ExecutionStatusQuery = {
2655
+ quoteId: string;
2656
+ mode?: ExecutionMode;
2657
+ };
2658
+ type ExecutionOverallState = "created" | "routing" | "quoting" | "placing" | "confirming" | "filled" | "partially_filled" | "failed" | "cancelled" | "expired";
2659
+ interface ExecutionDagProgress {
2660
+ dagRunId: string;
2661
+ totalSteps: number;
2662
+ currentSequence: number;
2663
+ currentStepType: string | null;
2664
+ completedSequences: number[];
2665
+ stepTypes: Record<number, string>;
2666
+ status: "running" | "completed" | "failed";
2667
+ errorReason: string | null;
2668
+ }
2669
+ interface ExecutionStatusStep {
2670
+ sequence: number;
2671
+ stepType: string;
2672
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
2673
+ attempt: number;
2674
+ startedAt: string | null;
2675
+ completedAt: string | null;
2676
+ errorReason: string | null;
2677
+ }
2678
+ interface ExecutionStatusOrder {
2679
+ orderId: string;
2680
+ venue: string;
2681
+ status: string;
2682
+ event: "filled" | "partial_fill" | "failed" | null;
2683
+ filledAmountRaw?: string;
2684
+ remainingAmountRaw?: string;
2685
+ quotedSharesRaw?: string;
2686
+ actualSharesRaw?: string;
2687
+ quotedToWinRaw?: string;
2688
+ actualToWinRaw?: string;
2689
+ quotedPriceRaw?: string;
2690
+ executionPriceRaw?: string;
2691
+ partialFillReason?: string;
2692
+ errorReason?: string;
2693
+ txHash?: string;
2694
+ updatedAt: string;
2695
+ }
2696
+ interface ExecutionStatusResponse {
2697
+ executionId: string | null;
2698
+ quoteId: string;
2699
+ orderIds: string[];
2700
+ overallState: ExecutionOverallState;
2701
+ terminal: boolean;
2702
+ errorReason: string | null;
2703
+ pollAfterMs: number | null;
2704
+ dagProgress: ExecutionDagProgress | null;
2705
+ steps: ExecutionStatusStep[];
2706
+ orders: ExecutionStatusOrder[];
2707
+ }
2580
2708
  type ExecutionPositionsQuery = GetPositionsQuery & {
2581
2709
  mode?: ExecutionMode;
2582
2710
  };
@@ -2592,6 +2720,9 @@ interface PaperTradingListParams {
2592
2720
  limit?: number;
2593
2721
  cursor?: string;
2594
2722
  }
2723
+ interface PaperTradingAccountListParams extends PaperTradingListParams {
2724
+ externalId?: string;
2725
+ }
2595
2726
  interface CreatePaperTradingAccountParams {
2596
2727
  name?: string;
2597
2728
  externalId?: string;
@@ -2790,6 +2921,8 @@ interface UserActivityWithdrawal extends UserActivityBase {
2790
2921
  destinationAddress: string;
2791
2922
  destinationChainId: string;
2792
2923
  completedAmountRaw: string | null;
2924
+ chainId?: string | null;
2925
+ txHash?: string | null;
2793
2926
  errorMessage: string | null;
2794
2927
  }
2795
2928
  interface UserActivityBridge extends UserActivityBase {
@@ -3318,14 +3451,24 @@ interface CorrelatedMarketsStatus {
3318
3451
  interface CorrelatedMarketQueryResult {
3319
3452
  venueMarketId: string;
3320
3453
  marketQuestion: string;
3454
+ marketStatus: MarketStatus;
3455
+ marketStartDate: string;
3456
+ marketEndDate: string | null;
3321
3457
  eventTitle: string;
3458
+ eventStatus: MarketStatus;
3459
+ eventStartDate: string;
3460
+ eventEndDate: string | null;
3322
3461
  score: number;
3323
3462
  matchedSignal: CorrelatedMarketSignal;
3463
+ matchSource: "signal" | "title_fallback";
3324
3464
  venue: string;
3325
3465
  }
3326
3466
  interface CorrelatedMarketCascadeItem {
3327
3467
  venueEventId: string;
3328
3468
  eventTitle: string;
3469
+ eventStatus: MarketStatus;
3470
+ eventStartDate: string;
3471
+ eventEndDate: string | null;
3329
3472
  score: number;
3330
3473
  action: string;
3331
3474
  reason: string;
@@ -3397,6 +3540,7 @@ declare class AggClient {
3397
3540
  private paperTradingAccountsPath;
3398
3541
  private paperTradingAccountPath;
3399
3542
  private paperTradingListQuery;
3543
+ private paperTradingAccountListQuery;
3400
3544
  private withAuthPayload;
3401
3545
  private restoreSession;
3402
3546
  private persistSession;
@@ -3516,6 +3660,8 @@ declare class AggClient {
3516
3660
  * rollup (total cost, share-weighted avg price, to-win).
3517
3661
  */
3518
3662
  getExecutionOrders(params?: ExecutionOrdersQuery): Promise<PaginatedResponse<ExecutionOrderItem>>;
3663
+ /** Get quote-scoped execution progress, DAG step state, and order leg terminal status. */
3664
+ getExecutionStatus(params: ExecutionStatusQuery): Promise<ExecutionStatusResponse>;
3519
3665
  /** Unified user activity feed (trades, deposits, withdrawals, bridges, wallet ops). */
3520
3666
  getUserActivity(params?: UserActivityQuery): Promise<PaginatedResponse<UserActivityItem>>;
3521
3667
  /** List execution positions for the authenticated user (cursor pagination). */
@@ -3525,7 +3671,7 @@ declare class AggClient {
3525
3671
  /** Create a server-managed paper trading account for an app. Requires adminKey or apiKey. */
3526
3672
  createPaperTradingAccount(params: CreatePaperTradingAccountParams, options?: PaperTradingAppOptions): Promise<PaperTradingAccount>;
3527
3673
  /** List server-managed paper trading accounts for an app. Requires adminKey or apiKey. */
3528
- listPaperTradingAccounts(params?: PaperTradingListParams & PaperTradingAppOptions): Promise<PaperTradingAccountsPage>;
3674
+ listPaperTradingAccounts(params?: PaperTradingAccountListParams & PaperTradingAppOptions): Promise<PaperTradingAccountsPage>;
3529
3675
  /** Fetch a server-managed paper trading account. Requires adminKey or apiKey. */
3530
3676
  getPaperTradingAccount(accountId: string, options?: PaperTradingAppOptions): Promise<PaperTradingAccount>;
3531
3677
  /** Set a paper trading account cash balance. Requires adminKey or apiKey. */
@@ -3560,6 +3706,13 @@ declare class AggClient {
3560
3706
  maxYesPrice?: number;
3561
3707
  /** ISO-8601 timestamp. Hides events with endDate <= this value. NULL-endDate events are kept. */
3562
3708
  endDateFrom?: string;
3709
+ /**
3710
+ * When true, fold same-venue companion events into one tile per game
3711
+ * (`groupParentId IS NULL`). Sent as `grouped=true`; omitted when false/absent
3712
+ * (default = ungrouped). Consumers showing one tile per game need a detail
3713
+ * view that loads the folded companions via aggKey.
3714
+ */
3715
+ grouped?: boolean;
3563
3716
  }): Promise<PaginatedResponse<VenueEvent>>;
3564
3717
  /** Get a single venue event by ID. Requires appId or admin auth. */
3565
3718
  getVenueEventById(id: string, options?: {
@@ -3579,10 +3732,16 @@ declare class AggClient {
3579
3732
  matchStatus?: MatchStatus;
3580
3733
  status?: MarketStatus;
3581
3734
  categoryIds?: string[];
3735
+ aggKey?: string[];
3736
+ sportsMarketType?: string[];
3737
+ period?: string[];
3738
+ marketCategory?: string[];
3739
+ marketGroup?: string[];
3582
3740
  limit?: number;
3583
3741
  cursor?: string;
3584
3742
  sortBy?: "volume" | "volume24hr" | "createdAt" | "yesPrice" | "updatedAt";
3585
3743
  sortDir?: "asc" | "desc";
3744
+ context?: "list" | "detail";
3586
3745
  }): Promise<PaginatedResponse<VenueMarket>>;
3587
3746
  /** Get categories with cursor-based pagination. Requires appId. */
3588
3747
  getCategories(options?: {
@@ -3592,6 +3751,8 @@ declare class AggClient {
3592
3751
  }): Promise<PaginatedResponse<Category>>;
3593
3752
  /** Get per-app UI config (disabled venues + category presets). Requires appId. */
3594
3753
  getAppConfig(init?: RequestInit): Promise<AppClientConfigResponse>;
3754
+ /** Get a temporary Alchemy JWT token for RPC connections. */
3755
+ getRpcToken(init?: RequestInit): Promise<RpcTokenResponse>;
3595
3756
  private buildNewsFeedQuery;
3596
3757
  /** List available market news feeds and item counts. */
3597
3758
  getNewsFeeds(options?: {
@@ -3636,6 +3797,8 @@ declare class AggClient {
3636
3797
  text: string;
3637
3798
  limit?: number;
3638
3799
  includeResolved?: boolean;
3800
+ direction?: "more_likely" | "less_likely";
3801
+ balanced?: boolean;
3639
3802
  }, options?: {
3640
3803
  signal?: AbortSignal;
3641
3804
  }): Promise<{
@@ -3722,6 +3885,8 @@ declare class AggClient {
3722
3885
  * integrating against the SDK can ignore this entirely.
3723
3886
  */
3724
3887
  withdrawPreview(params: WithdrawPreviewParams): Promise<WithdrawPreviewResponse>;
3888
+ /** Quote maximum deliverable withdrawal amount for a token and destination chain. */
3889
+ getWithdrawalQuote(params: WithdrawalQuoteParams): Promise<WithdrawalQuoteResponse>;
3725
3890
  /**
3726
3891
  * Read the current persisted state of a withdrawal. Used as a backfill for
3727
3892
  * the WS lifecycle channel: the client polls this on hook mount and on WS
@@ -3834,4 +3999,4 @@ declare function aggregateMidpoint(midpoints: (number | null | undefined)[]): nu
3834
3999
 
3835
4000
  declare function createAggClient(options: AggClientOptions): AggClient;
3836
4001
 
3837
- export { type Account, AccountProvider, AccountType, type AggAuthDeliveryMode, type AggAuthProviderType, type AggAuthStartBody, type AggAuthStartResult, type AggAuthVerifyBody, AggClient, type AggClientAuthOptions, type AggClientSessionInput, type AggLinkAccountBody, type AggLinkAccountConfirmResult, type AggLinkAccountResult, type AggSessionUser, AggWebSocket, type AggWebSocketCallbacks, type AggWebSocketOptions, type AggregatedOrderbookLevel, type AggregatedOrderbookResponse, type App, type AppClientConfigResponse, type AttributedOrderbook, type AttributedOrderbookLevel, type AuthCodeResponse, type AuthStatus, type AuthTokenResponse, type AuthUser, type BatchMidpointsResponse, type BatchOrderbooksResponse, type BuildVenueUrlOpts, CONFIRMED_MATCH_STATUSES, type CancelManagedExecutionResponse, type Candle, CandleBuilder, type CandleInterval, type Category, Chain, type ChartBarsResponse, type ChartCandle, type ChartResolution, type ChartVenueCandles, type ComputeSplitsRequest, type ComputeSplitsResponse, type ComputeSplitsSelection, type CorrelatedMarketCascadeItem, type CorrelatedMarketCascadeResponse, type CorrelatedMarketQueryResult, type CorrelatedMarketSide, type CorrelatedMarketSignal, type CorrelatedMarketSignalBatch, type CorrelatedMarketSignalDirection, type CorrelatedMarketsStatus, type CreateApp, type CreatePaperTradingAccountParams, type CryptoReferencePriceError, type CryptoReferencePriceExternalMarketInput, type CryptoReferencePriceMarketInput, type CryptoReferencePriceResult, type CryptoReferencePriceSource, type CryptoReferencePriceTarget, type CryptoReferencePricesResponse, type DepositAddressesPendingResponse, type DepositAddressesReadyResponse, type DepositAddressesResponse, type DepositAddressesSupportedChain, type DepositAddressesToken, type DepositStep, type DiagnosticCallback, type DiagnosticEvent, type ExecuteManagedParams, type ExecuteManagedRequest, type ExecuteManagedResponse, type ExecuteTradeRequest, type ExecuteTradeResponse, type ExecutionMode, type ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionPositionGroup, type ExecutionPositionsQuery, type GetBalanceQuery, type GetBalanceResponse, type GetCryptoReferencePricesOptions, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type ListRecurringCryptoMarketsOptions, type ManagedBalancesParams, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedMidpointOutcome, type MatchedOrderbookMarket, type MatchedVenueMarketOutcomeRef, type MatchingReport, type MidpointItem, type MidpointRow, type NewsFeedArticleFeedItem, type NewsFeedArticleFeedResponse, type NewsFeedArticleWithSummary, type NewsFeedLinkedMarket, type NewsFeedListResponse, type NewsFeedMarketFeedArticle, type NewsFeedMarketFeedItem, type NewsFeedMarketFeedResponse, type NewsFeedMarketNewsParams, type NewsFeedMarketNewsResponse, type NewsFeedMarketNewsResult, type NewsFeedPageOptions, type NewsFeedStatusResponse, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, OrderType, type Orderbook, type OrderbookBatchItemError, type OrderbookBatchItemErrorCode, type OrderbookBatchItemStatus, type OrderbookHistoryPoint, type OrderbookHistoryResponse, type OrderbookLevel, type OrderbookQuoteFill, type OrderbookQuoteParams, type OrderbookQuoteResponse, type OrderbookServiceUnavailableError, type OrderbookState, type OrderbooksOnlyError, type OutcomeMidpoint, type OutcomeMidpointRow, type OutcomeOrderbookResponse, type PaginatedResponse, type PaperTradingAccount, type PaperTradingAccountsPage, type PaperTradingAppOptions, type PaperTradingBalanceAdjustment, type PaperTradingBalanceResponse, type PaperTradingLiquidityStatus, type PaperTradingListParams, type PaperTradingMarkSource, type PaperTradingOrder, type PaperTradingOrdersPage, type PaperTradingPortfolio, type PaperTradingPosition, type PaperTradingPositionsPage, type PersistedAuthSnapshot, type PlacePaperTradingOrderParams, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, RECURRENCE_CADENCES, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RecurrenceCadence, type RecurrenceFilter, type RecurringCryptoComparisonPoint, type RecurringCryptoComparisonPriceSource, type RecurringCryptoDuration, type RecurringCryptoDurationInput, type RecurringCryptoMarketMetrics, type RecurringCryptoMarketsResponse, type RecurringCryptoOutcome, type RecurringCryptoPriceComparison, type RecurringCryptoReferencePrice, type RecurringCryptoResolution, type RecurringCryptoSourceConfidence, type RecurringCryptoVenueMarket, type RecurringCryptoWindowComparisons, type RecurringCryptoWindowMarket, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type ResetPaperTradingAccountParams, type ResolveCorrelatedMarketsParams, type ResolveCorrelatedMarketsResponse, type ResolvedCorrelatedMarketsResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, type SetPaperTradingBalanceParams, type SettlementSource, type SetupDepositAddressStep, type SetupVenueKeyStep, type SimpleOrderbookLevel, type SmartRouteAllocation, type SmartRouteBridgeStep, type SmartRouteFeeBreakdown, type SmartRouteFill, type SmartRouteParams, type SmartRouteResponse, type SmartRouteSetupCostLine, type SmartRouteSide, type SmartRouteStatus, type SmartRouteVenueFill, type SplitsByAmountResult, type SyncBalancesResponse, TimeInForce, type TradeExecutorOrder, type TradeExecutorOrderListResponse, TradeSide$1 as TradeSide, type TradeSplit, type TradeStep, TurnstileChallengeError, type UnifiedBalanceResponse, type UpdateUserBody, type UpsertVenueKey, type UserActivityBridge, type UserActivityDeposit, type UserActivityItem, type UserActivityQuery, type UserActivityRedeem, type UserActivityRedeemLeg, type UserActivityTrade, type UserActivityType, type UserActivityUserOp, type UserActivityWithdrawal, type UserHolding, type UserProfile, VENUES, type ValidateBalanceOnClientStep, type ValidateManagedParams, type ValidateManagedRequest, type ValidateManagedResponse, type ValidateTradeRequest, type ValidateTradeResponse, Venue, type VenueEvent, type VenueEventListItem, type VenueEventWithMarkets, type VenueKeySummary, type VenueMarket, type VenueMarketClusterNode, type VenueMarketListItem, type VenueMarketOutcome, type VenueMarketRef, type VenueOrderbookEntry, type VenueOrderbookLevel, type VenuePositionBalance, type VenuePriceInfo, type VenueSoloQuote, type VerifyBody, type VerifyResponse, type WalletChainBalance, type WalletTokenBalance, type WithdrawManagedParams, type WithdrawManagedRequest, type WithdrawManagedResponse, type WithdrawManagedSourceItem, type WithdrawPreviewParams, type WithdrawPreviewResponse, type WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, type WithdrawalSourceTokenSymbol, type WsArbFeedBatch, type WsArbFeedEntry, type WsArbMarketUpdate, type WsAttributedLevel, type WsAuthenticated, type WsBalanceUpdate, type WsCandleInterval, type WsClientMessage, type WsConnected, type WsError, type WsHeartbeat, type WsMarkSource, type WsMarketResolved, type WsOrderEvent, type WsOrderEventType, type WsOrderSubmitted, type WsOrderbookDelta, type WsOrderbookSnapshot, type WsRedeemEvent, type WsServerMessage, type WsSubscribed, type WsTrade, type WsUnsubscribed, type WsVenueBook, type WsVenueInfo, type WsVenueLevel, type WsWithdrawalLegStatus, type WsWithdrawalLifecycleEvent, type WsWithdrawalLifecycleLeg, type WsWithdrawalLifecycleStatus, aggregateMidpoint, applyOrderbookDelta, buildVenueUrl, computeBestSplitsByAmount, computeChecksum, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getWalletAddressFromUserProfile, hasShape, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, parse, parseEmail, parseEmailStrict, safeParse, snapshotToOrderbook, sortVenues };
4002
+ export { type Account, AccountProvider, AccountType, type AggAuthDeliveryMode, type AggAuthProviderType, type AggAuthStartBody, type AggAuthStartResult, type AggAuthVerifyBody, AggClient, type AggClientAuthOptions, type AggClientSessionInput, type AggLinkAccountBody, type AggLinkAccountConfirmResult, type AggLinkAccountResult, type AggSessionUser, AggWebSocket, type AggWebSocketCallbacks, type AggWebSocketOptions, type AggregatedOrderbookLevel, type AggregatedOrderbookResponse, type App, type AppClientConfigResponse, type AttributedOrderbook, type AttributedOrderbookLevel, type AuthCodeResponse, type AuthStatus, type AuthTokenResponse, type AuthUser, type BatchMidpointsResponse, type BatchOrderbooksResponse, type BuildVenueUrlOpts, CONFIRMED_MATCH_STATUSES, type CancelManagedExecutionResponse, type Candle, CandleBuilder, type CandleInterval, type Category, Chain, type ChartBarsResponse, type ChartCandle, type ChartResolution, type ChartVenueCandles, type ComputeSplitsRequest, type ComputeSplitsResponse, type ComputeSplitsSelection, type CorrelatedMarketCascadeItem, type CorrelatedMarketCascadeResponse, type CorrelatedMarketQueryResult, type CorrelatedMarketSide, type CorrelatedMarketSignal, type CorrelatedMarketSignalBatch, type CorrelatedMarketSignalDirection, type CorrelatedMarketsStatus, type CreateApp, type CreatePaperTradingAccountParams, type CryptoReferencePriceError, type CryptoReferencePriceExternalMarketInput, type CryptoReferencePriceMarketInput, type CryptoReferencePriceResult, type CryptoReferencePriceSource, type CryptoReferencePriceTarget, type CryptoReferencePricesResponse, type DepositAddressesPendingResponse, type DepositAddressesReadyResponse, type DepositAddressesResponse, type DepositAddressesSupportedChain, type DepositAddressesToken, type DepositStep, type DiagnosticCallback, type DiagnosticEvent, type ExecuteManagedParams, type ExecuteManagedRequest, type ExecuteManagedResponse, type ExecuteTradeRequest, type ExecuteTradeResponse, type ExecutionDagProgress, type ExecutionMode, type ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionOverallState, type ExecutionPositionGroup, type ExecutionPositionsQuery, type ExecutionStatusOrder, type ExecutionStatusQuery, type ExecutionStatusResponse, type ExecutionStatusStep, type GetBalanceQuery, type GetBalanceResponse, type GetCryptoReferencePricesOptions, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type ListRecurringCryptoMarketsOptions, type ManagedBalancesParams, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedMidpointOutcome, type MatchedOrderbookMarket, type MatchedVenueMarketOutcomeRef, type MatchingReport, type MidpointItem, type MidpointRow, type NewsFeedArticleFeedItem, type NewsFeedArticleFeedResponse, type NewsFeedArticleWithSummary, type NewsFeedLinkedMarket, type NewsFeedListResponse, type NewsFeedMarketFeedArticle, type NewsFeedMarketFeedItem, type NewsFeedMarketFeedResponse, type NewsFeedMarketNewsParams, type NewsFeedMarketNewsResponse, type NewsFeedMarketNewsResult, type NewsFeedPageOptions, type NewsFeedStatusResponse, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, OrderType, type Orderbook, type OrderbookBatchItemError, type OrderbookBatchItemErrorCode, type OrderbookBatchItemStatus, type OrderbookHistoryPoint, type OrderbookHistoryResponse, type OrderbookLevel, type OrderbookQuoteFill, type OrderbookQuoteParams, type OrderbookQuoteResponse, type OrderbookServiceUnavailableError, type OrderbookState, type OrderbooksOnlyError, type OutcomeMidpoint, type OutcomeMidpointRow, type OutcomeOrderbookResponse, type PaginatedResponse, type PaperTradingAccount, type PaperTradingAccountsPage, type PaperTradingAppOptions, type PaperTradingBalanceAdjustment, type PaperTradingBalanceResponse, type PaperTradingLiquidityStatus, type PaperTradingListParams, type PaperTradingMarkSource, type PaperTradingOrder, type PaperTradingOrdersPage, type PaperTradingPortfolio, type PaperTradingPosition, type PaperTradingPositionsPage, type PersistedAuthSnapshot, type PlacePaperTradingOrderParams, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, RECURRENCE_CADENCES, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RecurrenceCadence, type RecurrenceFilter, type RecurringCryptoComparisonPoint, type RecurringCryptoComparisonPriceSource, type RecurringCryptoDuration, type RecurringCryptoDurationInput, type RecurringCryptoMarketMetrics, type RecurringCryptoMarketsResponse, type RecurringCryptoOrderbookDepthLevel, type RecurringCryptoOrderbookDepthSide, type RecurringCryptoOutcome, type RecurringCryptoOutcomeOrderbookDepth, type RecurringCryptoPriceComparison, type RecurringCryptoReferencePrice, type RecurringCryptoResolution, type RecurringCryptoSourceConfidence, type RecurringCryptoVenueMarket, type RecurringCryptoWindowComparisons, type RecurringCryptoWindowMarket, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type ResetPaperTradingAccountParams, type ResolveCorrelatedMarketsParams, type ResolveCorrelatedMarketsResponse, type ResolvedCorrelatedMarketsResponse, type RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, type SetPaperTradingBalanceParams, type SettlementSource, type SetupDepositAddressStep, type SetupVenueKeyStep, type SimpleOrderbookLevel, type SmartRouteAllocation, type SmartRouteBridgeStep, type SmartRouteFeeBreakdown, type SmartRouteFill, type SmartRouteParams, type SmartRouteResponse, type SmartRouteSetupCostLine, type SmartRouteSide, type SmartRouteStatus, type SmartRouteVenueFill, type SplitsByAmountResult, type SyncBalancesResponse, TimeInForce, type TradeExecutorOrder, type TradeExecutorOrderListResponse, TradeSide$1 as TradeSide, type TradeSplit, type TradeStep, TurnstileChallengeError, type UnifiedBalanceResponse, type UpdateUserBody, type UpsertVenueKey, type UserActivityBridge, type UserActivityDeposit, type UserActivityItem, type UserActivityQuery, type UserActivityRedeem, type UserActivityRedeemLeg, type UserActivityTrade, type UserActivityType, type UserActivityUserOp, type UserActivityWithdrawal, type UserHolding, type UserProfile, VENUES, type ValidateBalanceOnClientStep, type ValidateManagedParams, type ValidateManagedRequest, type ValidateManagedResponse, type ValidateTradeRequest, type ValidateTradeResponse, Venue, type VenueEvent, type VenueEventListItem, type VenueEventWithMarkets, type VenueKeySummary, type VenueMarket, type VenueMarketClusterNode, type VenueMarketListItem, type VenueMarketOutcome, type VenueMarketRef, type VenueOrderbookEntry, type VenueOrderbookLevel, type VenuePositionBalance, type VenuePriceInfo, type VenueSoloQuote, type VerifyBody, type VerifyResponse, type WalletChainBalance, type WalletTokenBalance, type WithdrawManagedParams, type WithdrawManagedRequest, type WithdrawManagedResponse, type WithdrawManagedSourceItem, type WithdrawPreviewParams, type WithdrawPreviewResponse, type WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalQuoteParams, type WithdrawalQuoteResponse, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, type WithdrawalSourceTokenSymbol, type WsArbFeedBatch, type WsArbFeedEntry, type WsArbMarketUpdate, type WsAttributedLevel, type WsAuthenticated, type WsBalanceUpdate, type WsCandleInterval, type WsClientMessage, type WsConnected, type WsError, type WsHeartbeat, type WsMarkSource, type WsMarketResolved, type WsOrderEvent, type WsOrderEventType, type WsOrderSubmitted, type WsOrderbookDelta, type WsOrderbookSnapshot, type WsRedeemEvent, type WsServerMessage, type WsSubscribed, type WsTrade, type WsUnsubscribed, type WsVenueBook, type WsVenueInfo, type WsVenueLevel, type WsWithdrawalLegStatus, type WsWithdrawalLifecycleEvent, type WsWithdrawalLifecycleLeg, type WsWithdrawalLifecycleStatus, aggregateMidpoint, applyOrderbookDelta, buildVenueUrl, computeBestSplitsByAmount, computeChecksum, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getWalletAddressFromUserProfile, hasShape, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, parse, parseEmail, parseEmailStrict, safeParse, snapshotToOrderbook, sortVenues };
package/dist/index.js CHANGED
@@ -1703,6 +1703,12 @@ var AggClient = class {
1703
1703
  if (params.cursor) query.cursor = params.cursor;
1704
1704
  return Object.keys(query).length ? query : void 0;
1705
1705
  }
1706
+ paperTradingAccountListQuery(params = {}) {
1707
+ var _a;
1708
+ const query = (_a = this.paperTradingListQuery(params)) != null ? _a : {};
1709
+ if (params.externalId) query.externalId = params.externalId;
1710
+ return Object.keys(query).length ? query : void 0;
1711
+ }
1706
1712
  withAuthPayload(payload) {
1707
1713
  var _a, _b, _c;
1708
1714
  if (typeof payload.earlyAccessCode === "string" && payload.earlyAccessCode.trim().length > 0) {
@@ -2297,6 +2303,14 @@ Issued At: ${issuedAt}`;
2297
2303
  });
2298
2304
  });
2299
2305
  }
2306
+ /** Get quote-scoped execution progress, DAG step state, and order leg terminal status. */
2307
+ getExecutionStatus(params) {
2308
+ return __async(this, null, function* () {
2309
+ const query = { quoteId: params.quoteId };
2310
+ if (params.mode) query.mode = params.mode;
2311
+ return this.request("/execution/status", { query });
2312
+ });
2313
+ }
2300
2314
  /** Unified user activity feed (trades, deposits, withdrawals, bridges, wallet ops). */
2301
2315
  getUserActivity() {
2302
2316
  return __async(this, arguments, function* (params = {}) {
@@ -2346,7 +2360,7 @@ Issued At: ${issuedAt}`;
2346
2360
  return __async(this, arguments, function* (params = {}) {
2347
2361
  const _a = params, { appId } = _a, listParams = __objRest(_a, ["appId"]);
2348
2362
  return this.request(this.paperTradingAccountsPath(appId), {
2349
- query: this.paperTradingListQuery(listParams)
2363
+ query: this.paperTradingAccountListQuery(listParams)
2350
2364
  });
2351
2365
  });
2352
2366
  }
@@ -2460,6 +2474,7 @@ Issued At: ${issuedAt}`;
2460
2474
  if ((options == null ? void 0 : options.minYesPrice) != null) query.minYesPrice = String(options.minYesPrice);
2461
2475
  if ((options == null ? void 0 : options.maxYesPrice) != null) query.maxYesPrice = String(options.maxYesPrice);
2462
2476
  if (options == null ? void 0 : options.endDateFrom) query.endDateFrom = options.endDateFrom;
2477
+ if (options == null ? void 0 : options.grouped) query.grouped = "true";
2463
2478
  return this.request("/venue-events", {
2464
2479
  query: Object.keys(query).length > 0 ? query : void 0
2465
2480
  });
@@ -2469,6 +2484,10 @@ Issued At: ${issuedAt}`;
2469
2484
  getVenueEventById(id, options) {
2470
2485
  return __async(this, null, function* () {
2471
2486
  return this.request(`/venue-events/${encodeURIComponent(id)}`, {
2487
+ // Opt into the lean response (no embedded `venueMarkets`) — markets are
2488
+ // fetched separately via GET /venue-markets. Empty `expand` (no `markets`
2489
+ // token) tells the API to omit the deprecated embedded array.
2490
+ query: { expand: "" },
2472
2491
  signal: options == null ? void 0 : options.signal
2473
2492
  });
2474
2493
  });
@@ -2496,6 +2515,15 @@ Issued At: ${issuedAt}`;
2496
2515
  if ((options == null ? void 0 : options.includeDirectVenueMarkets) != null) {
2497
2516
  query.includeDirectVenueMarkets = String(options.includeDirectVenueMarkets);
2498
2517
  }
2518
+ if ((options == null ? void 0 : options.includeOrderbookDepth) != null) {
2519
+ query.includeOrderbookDepth = String(options.includeOrderbookDepth);
2520
+ }
2521
+ if ((options == null ? void 0 : options.orderbookDepth) != null) {
2522
+ query.orderbookDepth = String(options.orderbookDepth);
2523
+ }
2524
+ if ((options == null ? void 0 : options.orderbookDepthAmountUsd) != null) {
2525
+ query.orderbookDepthAmountUsd = String(options.orderbookDepthAmountUsd);
2526
+ }
2499
2527
  return this.request("/crypto/recurring-markets", {
2500
2528
  query: Object.keys(query).length > 0 ? query : void 0,
2501
2529
  signal: options == null ? void 0 : options.signal
@@ -2571,10 +2599,22 @@ Issued At: ${issuedAt}`;
2571
2599
  if (options == null ? void 0 : options.status) query.status = options.status;
2572
2600
  if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
2573
2601
  query.categoryIds = options.categoryIds;
2602
+ if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
2603
+ if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
2604
+ query.sportsMarketType = options.sportsMarketType;
2605
+ }
2606
+ if ((options == null ? void 0 : options.period) && options.period.length > 0) query.period = options.period;
2607
+ if ((options == null ? void 0 : options.marketCategory) && options.marketCategory.length > 0) {
2608
+ query.marketCategory = options.marketCategory;
2609
+ }
2610
+ if ((options == null ? void 0 : options.marketGroup) && options.marketGroup.length > 0) {
2611
+ query.marketGroup = options.marketGroup;
2612
+ }
2574
2613
  if ((options == null ? void 0 : options.limit) != null) query.limit = String(options.limit);
2575
2614
  if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
2576
2615
  if (options == null ? void 0 : options.sortBy) query.sortBy = options.sortBy;
2577
2616
  if (options == null ? void 0 : options.sortDir) query.sortDir = options.sortDir;
2617
+ if (options == null ? void 0 : options.context) query.context = options.context;
2578
2618
  return this.request("/venue-markets", {
2579
2619
  query: Object.keys(query).length > 0 ? query : void 0
2580
2620
  });
@@ -2598,6 +2638,12 @@ Issued At: ${issuedAt}`;
2598
2638
  return this.request("/app/config", init);
2599
2639
  });
2600
2640
  }
2641
+ /** Get a temporary Alchemy JWT token for RPC connections. */
2642
+ getRpcToken(init) {
2643
+ return __async(this, null, function* () {
2644
+ return this.request("/app/rpc-tokens/alchemy", init);
2645
+ });
2646
+ }
2601
2647
  buildNewsFeedQuery(options) {
2602
2648
  const query = {};
2603
2649
  if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
@@ -2901,6 +2947,15 @@ Issued At: ${issuedAt}`;
2901
2947
  });
2902
2948
  });
2903
2949
  }
2950
+ /** Quote maximum deliverable withdrawal amount for a token and destination chain. */
2951
+ getWithdrawalQuote(params) {
2952
+ return __async(this, null, function* () {
2953
+ return this.request("/execution/withdrawable/quote", {
2954
+ method: "POST",
2955
+ body: JSON.stringify(params)
2956
+ });
2957
+ });
2958
+ }
2904
2959
  /**
2905
2960
  * Read the current persisted state of a withdrawal. Used as a backfill for
2906
2961
  * the WS lifecycle channel: the client polls this on hook mount and on WS
package/dist/index.mjs CHANGED
@@ -1590,6 +1590,12 @@ var AggClient = class {
1590
1590
  if (params.cursor) query.cursor = params.cursor;
1591
1591
  return Object.keys(query).length ? query : void 0;
1592
1592
  }
1593
+ paperTradingAccountListQuery(params = {}) {
1594
+ var _a;
1595
+ const query = (_a = this.paperTradingListQuery(params)) != null ? _a : {};
1596
+ if (params.externalId) query.externalId = params.externalId;
1597
+ return Object.keys(query).length ? query : void 0;
1598
+ }
1593
1599
  withAuthPayload(payload) {
1594
1600
  var _a, _b, _c;
1595
1601
  if (typeof payload.earlyAccessCode === "string" && payload.earlyAccessCode.trim().length > 0) {
@@ -2184,6 +2190,14 @@ Issued At: ${issuedAt}`;
2184
2190
  });
2185
2191
  });
2186
2192
  }
2193
+ /** Get quote-scoped execution progress, DAG step state, and order leg terminal status. */
2194
+ getExecutionStatus(params) {
2195
+ return __async(this, null, function* () {
2196
+ const query = { quoteId: params.quoteId };
2197
+ if (params.mode) query.mode = params.mode;
2198
+ return this.request("/execution/status", { query });
2199
+ });
2200
+ }
2187
2201
  /** Unified user activity feed (trades, deposits, withdrawals, bridges, wallet ops). */
2188
2202
  getUserActivity() {
2189
2203
  return __async(this, arguments, function* (params = {}) {
@@ -2233,7 +2247,7 @@ Issued At: ${issuedAt}`;
2233
2247
  return __async(this, arguments, function* (params = {}) {
2234
2248
  const _a = params, { appId } = _a, listParams = __objRest(_a, ["appId"]);
2235
2249
  return this.request(this.paperTradingAccountsPath(appId), {
2236
- query: this.paperTradingListQuery(listParams)
2250
+ query: this.paperTradingAccountListQuery(listParams)
2237
2251
  });
2238
2252
  });
2239
2253
  }
@@ -2347,6 +2361,7 @@ Issued At: ${issuedAt}`;
2347
2361
  if ((options == null ? void 0 : options.minYesPrice) != null) query.minYesPrice = String(options.minYesPrice);
2348
2362
  if ((options == null ? void 0 : options.maxYesPrice) != null) query.maxYesPrice = String(options.maxYesPrice);
2349
2363
  if (options == null ? void 0 : options.endDateFrom) query.endDateFrom = options.endDateFrom;
2364
+ if (options == null ? void 0 : options.grouped) query.grouped = "true";
2350
2365
  return this.request("/venue-events", {
2351
2366
  query: Object.keys(query).length > 0 ? query : void 0
2352
2367
  });
@@ -2356,6 +2371,10 @@ Issued At: ${issuedAt}`;
2356
2371
  getVenueEventById(id, options) {
2357
2372
  return __async(this, null, function* () {
2358
2373
  return this.request(`/venue-events/${encodeURIComponent(id)}`, {
2374
+ // Opt into the lean response (no embedded `venueMarkets`) — markets are
2375
+ // fetched separately via GET /venue-markets. Empty `expand` (no `markets`
2376
+ // token) tells the API to omit the deprecated embedded array.
2377
+ query: { expand: "" },
2359
2378
  signal: options == null ? void 0 : options.signal
2360
2379
  });
2361
2380
  });
@@ -2383,6 +2402,15 @@ Issued At: ${issuedAt}`;
2383
2402
  if ((options == null ? void 0 : options.includeDirectVenueMarkets) != null) {
2384
2403
  query.includeDirectVenueMarkets = String(options.includeDirectVenueMarkets);
2385
2404
  }
2405
+ if ((options == null ? void 0 : options.includeOrderbookDepth) != null) {
2406
+ query.includeOrderbookDepth = String(options.includeOrderbookDepth);
2407
+ }
2408
+ if ((options == null ? void 0 : options.orderbookDepth) != null) {
2409
+ query.orderbookDepth = String(options.orderbookDepth);
2410
+ }
2411
+ if ((options == null ? void 0 : options.orderbookDepthAmountUsd) != null) {
2412
+ query.orderbookDepthAmountUsd = String(options.orderbookDepthAmountUsd);
2413
+ }
2386
2414
  return this.request("/crypto/recurring-markets", {
2387
2415
  query: Object.keys(query).length > 0 ? query : void 0,
2388
2416
  signal: options == null ? void 0 : options.signal
@@ -2458,10 +2486,22 @@ Issued At: ${issuedAt}`;
2458
2486
  if (options == null ? void 0 : options.status) query.status = options.status;
2459
2487
  if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
2460
2488
  query.categoryIds = options.categoryIds;
2489
+ if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
2490
+ if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
2491
+ query.sportsMarketType = options.sportsMarketType;
2492
+ }
2493
+ if ((options == null ? void 0 : options.period) && options.period.length > 0) query.period = options.period;
2494
+ if ((options == null ? void 0 : options.marketCategory) && options.marketCategory.length > 0) {
2495
+ query.marketCategory = options.marketCategory;
2496
+ }
2497
+ if ((options == null ? void 0 : options.marketGroup) && options.marketGroup.length > 0) {
2498
+ query.marketGroup = options.marketGroup;
2499
+ }
2461
2500
  if ((options == null ? void 0 : options.limit) != null) query.limit = String(options.limit);
2462
2501
  if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
2463
2502
  if (options == null ? void 0 : options.sortBy) query.sortBy = options.sortBy;
2464
2503
  if (options == null ? void 0 : options.sortDir) query.sortDir = options.sortDir;
2504
+ if (options == null ? void 0 : options.context) query.context = options.context;
2465
2505
  return this.request("/venue-markets", {
2466
2506
  query: Object.keys(query).length > 0 ? query : void 0
2467
2507
  });
@@ -2485,6 +2525,12 @@ Issued At: ${issuedAt}`;
2485
2525
  return this.request("/app/config", init);
2486
2526
  });
2487
2527
  }
2528
+ /** Get a temporary Alchemy JWT token for RPC connections. */
2529
+ getRpcToken(init) {
2530
+ return __async(this, null, function* () {
2531
+ return this.request("/app/rpc-tokens/alchemy", init);
2532
+ });
2533
+ }
2488
2534
  buildNewsFeedQuery(options) {
2489
2535
  const query = {};
2490
2536
  if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
@@ -2788,6 +2834,15 @@ Issued At: ${issuedAt}`;
2788
2834
  });
2789
2835
  });
2790
2836
  }
2837
+ /** Quote maximum deliverable withdrawal amount for a token and destination chain. */
2838
+ getWithdrawalQuote(params) {
2839
+ return __async(this, null, function* () {
2840
+ return this.request("/execution/withdrawable/quote", {
2841
+ method: "POST",
2842
+ body: JSON.stringify(params)
2843
+ });
2844
+ });
2845
+ }
2791
2846
  /**
2792
2847
  * Read the current persisted state of a withdrawal. Used as a backfill for
2793
2848
  * the WS lifecycle channel: the client polls this on hook mount and on WS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.3",
4
4
  "description": "Vanilla TypeScript client for the AGG prediction market aggregator (auth, markets, orderbooks, charts, trading, managed execution, WebSockets). Works in browsers, Node.js, and React Native.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",