@agg-build/sdk 1.2.0 → 1.2.13
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 +9 -0
- package/dist/index.d.mts +482 -17
- package/dist/index.d.ts +482 -17
- package/dist/index.js +159 -3
- package/dist/index.mjs +157 -3
- package/dist/server.d.mts +62 -6
- package/dist/server.d.ts +62 -6
- package/dist/server.js +61 -2
- package/dist/server.mjs +58 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -375,7 +375,9 @@ type WalletChainBalance = {
|
|
|
375
375
|
chainId: number;
|
|
376
376
|
tokenAddress: string;
|
|
377
377
|
balanceRaw: string;
|
|
378
|
+
decimals: number;
|
|
378
379
|
lastSyncedAt: string;
|
|
380
|
+
tokenSymbol?: string | undefined;
|
|
379
381
|
};
|
|
380
382
|
type WalletTokenBalance = {
|
|
381
383
|
tokenSymbol: string;
|
|
@@ -454,6 +456,8 @@ type GetHoldingsQuery = {
|
|
|
454
456
|
type GetOrdersQuery = {
|
|
455
457
|
status?: OrderStatus | undefined;
|
|
456
458
|
orderId?: string | undefined;
|
|
459
|
+
/** Filter to all legs of one quote (multi-venue split routes). */
|
|
460
|
+
quoteId?: string | undefined;
|
|
457
461
|
cursor?: string | undefined;
|
|
458
462
|
limit?: number | undefined;
|
|
459
463
|
};
|
|
@@ -465,6 +469,12 @@ type GetPositionsQuery = {
|
|
|
465
469
|
type OrderListItem = {
|
|
466
470
|
status: string;
|
|
467
471
|
id: string;
|
|
472
|
+
/**
|
|
473
|
+
* Parent quote — lets the frontend correlate legs of a multi-venue
|
|
474
|
+
* split route without a second request. Nullable for sell-side /
|
|
475
|
+
* standalone orders without a Quote row.
|
|
476
|
+
*/
|
|
477
|
+
quoteId: string | null;
|
|
468
478
|
createdAt: Date;
|
|
469
479
|
updatedAt: Date;
|
|
470
480
|
venue: Venue;
|
|
@@ -473,8 +483,28 @@ type OrderListItem = {
|
|
|
473
483
|
slippageBps: number | null;
|
|
474
484
|
quotedPriceRaw: string | null;
|
|
475
485
|
quotedCostRaw: string | null;
|
|
486
|
+
/**
|
|
487
|
+
* Quote-time shares + payout, 6-decimal atomic. Lets the UI render
|
|
488
|
+
* "Quoted X shares / $Y to win" without re-deriving from cost ÷
|
|
489
|
+
* price (precision drift on fractional fills; divide-by-zero before
|
|
490
|
+
* `executionPrice` exists).
|
|
491
|
+
*/
|
|
492
|
+
quotedSharesRaw: string | null;
|
|
493
|
+
quotedToWinRaw: string | null;
|
|
476
494
|
filledAmountRaw: string | null;
|
|
477
495
|
executionPrice: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* Actual shares + payout, populated by the venue's finalize handler.
|
|
498
|
+
* Pair with the quoted-side fields above to render the diff inline.
|
|
499
|
+
*/
|
|
500
|
+
actualSharesRaw: string | null;
|
|
501
|
+
actualToWinRaw: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* Set only on `partial_fill`. One of `"venue_capacity"`,
|
|
504
|
+
* `"price_slipped"`, `"user_cancelled"`, `"timeout"`, `"bridge_short"`,
|
|
505
|
+
* or a venue-specific tag.
|
|
506
|
+
*/
|
|
507
|
+
partialFillReason: string | null;
|
|
478
508
|
txHash: string | null;
|
|
479
509
|
errorMessage: string | null;
|
|
480
510
|
dagRunId: string | null;
|
|
@@ -504,7 +534,7 @@ type PositionGroup = {
|
|
|
504
534
|
venue: Venue;
|
|
505
535
|
size: number;
|
|
506
536
|
venueMarketId: string;
|
|
507
|
-
venueMarketOutcomeId
|
|
537
|
+
venueMarketOutcomeId: string;
|
|
508
538
|
}[];
|
|
509
539
|
totalSize: number;
|
|
510
540
|
avgEntryPrice: number;
|
|
@@ -532,6 +562,14 @@ type VenueMarket = {
|
|
|
532
562
|
title?: string | null | undefined;
|
|
533
563
|
externalIdentifier?: string | null | undefined;
|
|
534
564
|
winner?: boolean | null | undefined;
|
|
565
|
+
/** Counterpart outcomes on matched sibling markets — only populated
|
|
566
|
+
* on the parent (queried) market's outcomes. Each entry is a
|
|
567
|
+
* `{ venueMarketId, venueMarketOutcomeId }` ref into the same
|
|
568
|
+
* response's `matchedVenueMarkets[].venueMarketOutcomes[]`. */
|
|
569
|
+
matchedVenueMarketOutcomes?: {
|
|
570
|
+
venueMarketId: string;
|
|
571
|
+
venueMarketOutcomeId: string;
|
|
572
|
+
}[];
|
|
535
573
|
}[];
|
|
536
574
|
externalIdentifier: string;
|
|
537
575
|
status?: MarketStatus | undefined;
|
|
@@ -604,6 +642,13 @@ type VenueEvent = {
|
|
|
604
642
|
venues?: Venue[];
|
|
605
643
|
venueCount?: number | undefined;
|
|
606
644
|
marketCount?: number | undefined;
|
|
645
|
+
/**
|
|
646
|
+
* ISO-8601 duration denormalized from Series.recurrence. `null` means
|
|
647
|
+
* the event has no recurring schedule (one-off). Use this value with
|
|
648
|
+
* the `?recurrence=` filter on /venue-events; discover all available
|
|
649
|
+
* values via GET /recurrences.
|
|
650
|
+
*/
|
|
651
|
+
recurrence?: string | null | undefined;
|
|
607
652
|
};
|
|
608
653
|
type Orderbook = {
|
|
609
654
|
bids: {
|
|
@@ -696,6 +741,14 @@ type OrderbookHistoryResponse = {
|
|
|
696
741
|
close?: number | undefined;
|
|
697
742
|
}[];
|
|
698
743
|
};
|
|
744
|
+
/** Reference to a counterpart outcome on a matched sibling market.
|
|
745
|
+
* Resolves into the same response's `matchedVenueMarkets[].venueMarketOutcomes[]`
|
|
746
|
+
* by id. Sourced from `MatchedVenueMarketOutcome` so the alignment is
|
|
747
|
+
* robust to inversely-framed binary markets and multi-outcome markets. */
|
|
748
|
+
type MatchedVenueMarketOutcomeRef = {
|
|
749
|
+
venueMarketId: string;
|
|
750
|
+
venueMarketOutcomeId: string;
|
|
751
|
+
};
|
|
699
752
|
type VenueMarketOutcome = {
|
|
700
753
|
id: string;
|
|
701
754
|
price: number;
|
|
@@ -704,6 +757,9 @@ type VenueMarketOutcome = {
|
|
|
704
757
|
title?: string | null | undefined;
|
|
705
758
|
externalIdentifier?: string | null | undefined;
|
|
706
759
|
winner?: boolean | null | undefined;
|
|
760
|
+
/** Counterpart outcomes on matched sibling markets — only populated on
|
|
761
|
+
* the parent (queried) market's outcomes. */
|
|
762
|
+
matchedVenueMarketOutcomes?: MatchedVenueMarketOutcomeRef[];
|
|
707
763
|
};
|
|
708
764
|
type VenueEventWithMarkets = VenueEvent & {
|
|
709
765
|
venueMarkets: VenueMarket[];
|
|
@@ -713,15 +769,31 @@ type VenueEventListItem = VenueEvent & {
|
|
|
713
769
|
venueMarkets: VenueMarketListItem[];
|
|
714
770
|
marketCount: number;
|
|
715
771
|
};
|
|
772
|
+
/** Per-outcome midpoint inside a matched-sibling entry. Aligned via MVMO
|
|
773
|
+
* so the `venueMarketOutcomeId` resolves the same outcome the parent's
|
|
774
|
+
* `matchedVenueMarketOutcomes` ref points to. */
|
|
775
|
+
type MatchedMidpointOutcome = {
|
|
776
|
+
venueMarketOutcomeId: string;
|
|
777
|
+
midpoint: number | null;
|
|
778
|
+
bestBid?: number | null;
|
|
779
|
+
bestAsk?: number | null;
|
|
780
|
+
};
|
|
716
781
|
type MatchedMidpoint = {
|
|
717
782
|
venueMarketId: string;
|
|
718
783
|
venue: string;
|
|
784
|
+
/** Sibling's market-level midpoint. Kept for backwards compat — the
|
|
785
|
+
* authoritative cross-venue alignment lives in `outcomes`. */
|
|
719
786
|
midpoint: number | null;
|
|
787
|
+
/** Per-outcome midpoints keyed by sibling outcome id. Optional during
|
|
788
|
+
* rollout — older engine builds may omit it. */
|
|
789
|
+
outcomes?: MatchedMidpointOutcome[];
|
|
720
790
|
};
|
|
721
791
|
type OutcomeMidpoint = {
|
|
722
792
|
venueMarketOutcomeId: string;
|
|
723
793
|
label: string;
|
|
724
794
|
midpoint: number | null;
|
|
795
|
+
bestBid?: number | null;
|
|
796
|
+
bestAsk?: number | null;
|
|
725
797
|
};
|
|
726
798
|
type MidpointItem = {
|
|
727
799
|
venueMarketId: string;
|
|
@@ -964,6 +1036,35 @@ declare function formatMarketQuestion(venue: Venue, market: {
|
|
|
964
1036
|
title?: string | null;
|
|
965
1037
|
}>;
|
|
966
1038
|
}): string;
|
|
1039
|
+
/**
|
|
1040
|
+
* Resolve the display title for a VenueMarketOutcome.
|
|
1041
|
+
*
|
|
1042
|
+
* Returns `null` when every outcome on the market shares the same `title`
|
|
1043
|
+
* (Kalshi binary markets often store the same human-readable phrase on
|
|
1044
|
+
* both Yes/No outcomes — repeating it on each option is redundant). The
|
|
1045
|
+
* frontend should fall back to `label` in that case.
|
|
1046
|
+
*
|
|
1047
|
+
* Otherwise returns the outcome's stored `title` verbatim (or `null` when
|
|
1048
|
+
* unset). The DB `label` is always returned untouched by this helper.
|
|
1049
|
+
*
|
|
1050
|
+
* Polymarket player-prop fallback: when a binary Yes/No outcome has no
|
|
1051
|
+
* stored title (Gamma sends `outcomes=["Yes","No"]` for these markets,
|
|
1052
|
+
* e.g. *"Mikal Bridges: Rebounds O/U 2.5"*), derive `Over`/`Under` from
|
|
1053
|
+
* the question's `O/U <n>` token so the FE has something meaningful to
|
|
1054
|
+
* show. Sports-totals (`["Over","Under"]`) and spread markets
|
|
1055
|
+
* (`["<TeamA>","<TeamB>"]`) already get titles from upstream and are
|
|
1056
|
+
* unaffected.
|
|
1057
|
+
*/
|
|
1058
|
+
declare function formatOutcomeTitle(_venue: Venue, outcome: {
|
|
1059
|
+
label: string;
|
|
1060
|
+
title?: string | null;
|
|
1061
|
+
}, market: {
|
|
1062
|
+
question?: string | null;
|
|
1063
|
+
venueMarketOutcomes?: Array<{
|
|
1064
|
+
label: string;
|
|
1065
|
+
title?: string | null;
|
|
1066
|
+
}>;
|
|
1067
|
+
}): string | null;
|
|
967
1068
|
|
|
968
1069
|
declare function getWalletAddressFromUserProfile(user: UserProfile | undefined): string | undefined;
|
|
969
1070
|
|
|
@@ -1052,6 +1153,31 @@ declare const normalizeVenueMarketCluster: <TMarket extends VenueMarketClusterNo
|
|
|
1052
1153
|
|
|
1053
1154
|
declare const sortVenues: <T extends string>(venues: readonly T[]) => T[];
|
|
1054
1155
|
|
|
1156
|
+
/**
|
|
1157
|
+
* Build an external URL to a venue's event/market page.
|
|
1158
|
+
*
|
|
1159
|
+
* Single source of truth — used by API services (market-intel digests,
|
|
1160
|
+
* gap-alerts) AND by the admin Matched Events page to deep-link rows out
|
|
1161
|
+
* to the venue's UI.
|
|
1162
|
+
*
|
|
1163
|
+
* Returns `null` when there isn't enough data to construct a working URL.
|
|
1164
|
+
* Callers should hide the link button rather than render a broken href.
|
|
1165
|
+
*
|
|
1166
|
+
* Per-venue URL conventions are kept here so any future change (e.g.
|
|
1167
|
+
* Kalshi moves to a new path, Polymarket rebrands) is a one-file edit.
|
|
1168
|
+
*/
|
|
1169
|
+
interface BuildVenueUrlOpts {
|
|
1170
|
+
/** VenueEvent.slug — preferred input for venues that use slug-style URLs. */
|
|
1171
|
+
eventSlug?: string | null;
|
|
1172
|
+
/** VenueEvent.externalIdentifier — used by Kalshi (with series) and as a fallback. */
|
|
1173
|
+
eventExternalId?: string | null;
|
|
1174
|
+
/** VenueEvent.series.externalIdentifier — required for Kalshi's canonical URL. */
|
|
1175
|
+
seriesExternalId?: string | null;
|
|
1176
|
+
/** VenueMarket.conditionId — used as a fallback for Polymarket when slug is missing. */
|
|
1177
|
+
conditionId?: string | null;
|
|
1178
|
+
}
|
|
1179
|
+
declare function buildVenueUrl(venue: string, opts: BuildVenueUrlOpts): string | null;
|
|
1180
|
+
|
|
1055
1181
|
/**
|
|
1056
1182
|
* WebSocket protocol types for the Agg platform.
|
|
1057
1183
|
* All callback timestamps are in **seconds** (converted from server ms at SDK dispatch).
|
|
@@ -1209,6 +1335,28 @@ interface WsOrderEvent {
|
|
|
1209
1335
|
stepTypes?: Record<number, string>;
|
|
1210
1336
|
filledAmountRaw?: string;
|
|
1211
1337
|
remainingAmountRaw?: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* Quote-time and actual shares + payout. All 6-decimal atomic units
|
|
1340
|
+
* (so 1.234567 shares = "1234567", "$50 to win" = "50000000"). Set
|
|
1341
|
+
* on `filled` / `partial_fill` so the UI can render "Quoted X / Got Y"
|
|
1342
|
+
* without re-deriving from cost ÷ price (which loses precision on
|
|
1343
|
+
* fractional fills and divides by zero before `executionPrice` exists).
|
|
1344
|
+
*/
|
|
1345
|
+
quotedSharesRaw?: string;
|
|
1346
|
+
actualSharesRaw?: string;
|
|
1347
|
+
quotedToWinRaw?: string;
|
|
1348
|
+
actualToWinRaw?: string;
|
|
1349
|
+
/** Quote-time price (decimal string, e.g. "0.5"). Pair with `executionPriceRaw`
|
|
1350
|
+
* to render the slippage diff inline. */
|
|
1351
|
+
quotedPriceRaw?: string;
|
|
1352
|
+
/** Actual avg fill price (decimal string). */
|
|
1353
|
+
executionPriceRaw?: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* Set on `partial_fill` events only. One of `"venue_capacity"`,
|
|
1356
|
+
* `"price_slipped"`, `"user_cancelled"`, `"timeout"`, `"bridge_short"`,
|
|
1357
|
+
* or a venue-specific tag.
|
|
1358
|
+
*/
|
|
1359
|
+
partialFillReason?: string;
|
|
1212
1360
|
errorReason?: string;
|
|
1213
1361
|
attempt?: number;
|
|
1214
1362
|
correlationId?: string;
|
|
@@ -1238,6 +1386,8 @@ interface WsWithdrawalLifecycleLeg {
|
|
|
1238
1386
|
amountRaw: string;
|
|
1239
1387
|
txHash: string | null;
|
|
1240
1388
|
bridgeOperationId: string | null;
|
|
1389
|
+
/** Human-readable failure reason when `status === "failed"`. Null/absent when succeeded or in-flight. */
|
|
1390
|
+
errorMessage?: string | null;
|
|
1241
1391
|
}
|
|
1242
1392
|
/**
|
|
1243
1393
|
* Per-withdrawal lifecycle event. Wire shape is intentionally additive:
|
|
@@ -1248,6 +1398,10 @@ interface WsWithdrawalLifecycleEvent {
|
|
|
1248
1398
|
withdrawalId: string;
|
|
1249
1399
|
userId: string;
|
|
1250
1400
|
status: WsWithdrawalLifecycleStatus;
|
|
1401
|
+
/** Requested withdrawal amount in destination-token native decimals. */
|
|
1402
|
+
requestedAmountRaw?: string;
|
|
1403
|
+
/** Terminal settled amount in destination-token native decimals. */
|
|
1404
|
+
completedAmountRaw?: string | null;
|
|
1251
1405
|
/** True when `status` is terminal (`completed` / `partial` / `failed`). */
|
|
1252
1406
|
terminal: boolean;
|
|
1253
1407
|
/** Optional leg delta — present when this event was triggered by a leg flip. */
|
|
@@ -1494,8 +1648,16 @@ interface AppClientConfigResponse {
|
|
|
1494
1648
|
disabledVenues: Venue[];
|
|
1495
1649
|
disabledCategoryPresets: string[];
|
|
1496
1650
|
earlyAccessEnabled: boolean;
|
|
1651
|
+
authOptions: AppClientAuthOption[];
|
|
1497
1652
|
}
|
|
1498
1653
|
type AggAuthProviderType = "siwe" | "siws" | "google" | "twitter" | "apple" | "email";
|
|
1654
|
+
interface AppClientAuthOption {
|
|
1655
|
+
provider: AggAuthProviderType;
|
|
1656
|
+
type: "oauth" | "email" | "wallet";
|
|
1657
|
+
enabled: boolean;
|
|
1658
|
+
callbackUrl?: string;
|
|
1659
|
+
statement?: string;
|
|
1660
|
+
}
|
|
1499
1661
|
type AggAuthDeliveryMode = "body" | "cookie-refresh";
|
|
1500
1662
|
interface AggClientAuthOptions {
|
|
1501
1663
|
getEarlyAccessCode?: () => string | null;
|
|
@@ -1522,6 +1684,7 @@ interface AggAuthVerifyBody {
|
|
|
1522
1684
|
type AggAuthStartResult = {
|
|
1523
1685
|
type: "nonce";
|
|
1524
1686
|
nonce: string;
|
|
1687
|
+
statement?: string;
|
|
1525
1688
|
} | {
|
|
1526
1689
|
type: "redirect";
|
|
1527
1690
|
url: string;
|
|
@@ -1919,6 +2082,21 @@ interface QuoteManagedResponse {
|
|
|
1919
2082
|
}
|
|
1920
2083
|
interface ExecuteManagedParams {
|
|
1921
2084
|
quoteId: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Optional intent fallback. When the supplied `quoteId` has expired in the
|
|
2087
|
+
* cache (e.g. user clicked Buy after a tab was inactive), the server
|
|
2088
|
+
* resolves the latest live quote for this intent and refreshes/executes
|
|
2089
|
+
* against that instead of returning 400 `quote_not_found`. Same intent =
|
|
2090
|
+
* same buttons the user pressed in the UI; a different `maxSpend` is a
|
|
2091
|
+
* different intent and won't match.
|
|
2092
|
+
*/
|
|
2093
|
+
fallbackToLatest?: {
|
|
2094
|
+
outcomeId: string;
|
|
2095
|
+
side: "buy" | "sell";
|
|
2096
|
+
maxSpend?: number;
|
|
2097
|
+
sellShares?: number;
|
|
2098
|
+
allowedVenues?: Venue[];
|
|
2099
|
+
};
|
|
1922
2100
|
}
|
|
1923
2101
|
interface ExecuteManagedResponse {
|
|
1924
2102
|
quoteId: string;
|
|
@@ -1959,6 +2137,8 @@ interface WithdrawalLeg {
|
|
|
1959
2137
|
amountRaw: string;
|
|
1960
2138
|
txHash: string | null;
|
|
1961
2139
|
bridgeOperationId: string | null;
|
|
2140
|
+
/** Human-readable failure reason when `status === "failed"`. Null when succeeded or in-flight. */
|
|
2141
|
+
errorMessage?: string | null;
|
|
1962
2142
|
}
|
|
1963
2143
|
interface WithdrawManagedSourceItem {
|
|
1964
2144
|
sourceId: string;
|
|
@@ -1977,8 +2157,9 @@ interface WithdrawManagedSourceItem {
|
|
|
1977
2157
|
bridgeOperationId: string | null;
|
|
1978
2158
|
}
|
|
1979
2159
|
/**
|
|
1980
|
-
* `pricingStatus === "
|
|
1981
|
-
*
|
|
2160
|
+
* `pricingStatus === "quoted"` means the response includes a fresh preflight
|
|
2161
|
+
* quote; other states may carry null `expected.*` fields. Do NOT treat null
|
|
2162
|
+
* fields as missing.
|
|
1982
2163
|
*/
|
|
1983
2164
|
interface WithdrawalExpected {
|
|
1984
2165
|
outputRaw: string | null;
|
|
@@ -1992,6 +2173,11 @@ interface WithdrawManagedResponse {
|
|
|
1992
2173
|
tokenSymbol: WithdrawTokenSymbol;
|
|
1993
2174
|
amountRaw: string;
|
|
1994
2175
|
};
|
|
2176
|
+
/**
|
|
2177
|
+
* Terminal settled amount in destination-token native decimals.
|
|
2178
|
+
* Null until at least one source confirms.
|
|
2179
|
+
*/
|
|
2180
|
+
completedAmountRaw: string | null;
|
|
1995
2181
|
destination: {
|
|
1996
2182
|
chainId: number;
|
|
1997
2183
|
address: string;
|
|
@@ -1999,7 +2185,7 @@ interface WithdrawManagedResponse {
|
|
|
1999
2185
|
};
|
|
2000
2186
|
legs: WithdrawalLeg[];
|
|
2001
2187
|
expected: WithdrawalExpected;
|
|
2002
|
-
pricingStatus: "unquoted" | "quoted";
|
|
2188
|
+
pricingStatus: "unquoted" | "quoting" | "quoted" | "unviable";
|
|
2003
2189
|
/**
|
|
2004
2190
|
* Persisted terminal-state error reason. Always `null` until the
|
|
2005
2191
|
* withdrawal reaches `failed` / `partial`. The submit response always
|
|
@@ -2064,7 +2250,7 @@ type ExecutionOrdersQuery = GetOrdersQuery;
|
|
|
2064
2250
|
type ExecutionOrderItem = OrderListItem;
|
|
2065
2251
|
type ExecutionPositionsQuery = GetPositionsQuery;
|
|
2066
2252
|
type ExecutionPositionGroup = PositionGroup;
|
|
2067
|
-
type UserActivityType = "trade" | "withdrawal" | "bridge" | "deposit" | "user_op";
|
|
2253
|
+
type UserActivityType = "trade" | "withdrawal" | "bridge" | "deposit" | "user_op" | "redeem";
|
|
2068
2254
|
interface UserActivityBase {
|
|
2069
2255
|
id: string;
|
|
2070
2256
|
createdAt: string;
|
|
@@ -2133,7 +2319,25 @@ interface UserActivityUserOp extends UserActivityBase {
|
|
|
2133
2319
|
txHash: string | null;
|
|
2134
2320
|
confirmedAt: string | null;
|
|
2135
2321
|
}
|
|
2136
|
-
|
|
2322
|
+
interface UserActivityRedeemLeg {
|
|
2323
|
+
id: string;
|
|
2324
|
+
venueMarketOutcomeId: string;
|
|
2325
|
+
venue: string;
|
|
2326
|
+
status: string;
|
|
2327
|
+
chainId: string;
|
|
2328
|
+
payoutTokenSymbol: string;
|
|
2329
|
+
payoutAmountRaw: string | null;
|
|
2330
|
+
txHash: string | null;
|
|
2331
|
+
errorMessage: string | null;
|
|
2332
|
+
venueMarket: UserActivityVenueMarket | null;
|
|
2333
|
+
venueMarketOutcome: Omit<UserActivityVenueMarketOutcome, "price"> | null;
|
|
2334
|
+
}
|
|
2335
|
+
interface UserActivityRedeem extends UserActivityBase {
|
|
2336
|
+
type: "redeem";
|
|
2337
|
+
totalPayoutRaw: string | null;
|
|
2338
|
+
legs: UserActivityRedeemLeg[];
|
|
2339
|
+
}
|
|
2340
|
+
type UserActivityItem = UserActivityTrade | UserActivityWithdrawal | UserActivityBridge | UserActivityDeposit | UserActivityUserOp | UserActivityRedeem;
|
|
2137
2341
|
interface UserActivityQuery {
|
|
2138
2342
|
type?: UserActivityType;
|
|
2139
2343
|
cursor?: string;
|
|
@@ -2196,12 +2400,22 @@ interface SmartRouteVenueFill {
|
|
|
2196
2400
|
fills: SmartRouteFill[];
|
|
2197
2401
|
venueQty: number;
|
|
2198
2402
|
}
|
|
2199
|
-
interface
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2403
|
+
interface SmartRouteAllocation {
|
|
2404
|
+
sourceChainId: string;
|
|
2405
|
+
venue: string;
|
|
2406
|
+
amount: number;
|
|
2407
|
+
sourceTokenAddress?: string;
|
|
2408
|
+
custodyKind?: "EOA" | "DEPOSIT_WALLET";
|
|
2409
|
+
custodyAddress?: string;
|
|
2410
|
+
exactToken?: boolean;
|
|
2411
|
+
}
|
|
2412
|
+
interface SmartRouteBridgeStep {
|
|
2413
|
+
sourceChainId: string;
|
|
2414
|
+
destChainId: string;
|
|
2415
|
+
amount: number;
|
|
2416
|
+
cost: number;
|
|
2417
|
+
sourceTokenAddress?: string;
|
|
2418
|
+
destTokenAddress?: string;
|
|
2205
2419
|
}
|
|
2206
2420
|
interface VenueSoloQuote {
|
|
2207
2421
|
/**
|
|
@@ -2221,6 +2435,19 @@ interface VenueSoloQuote {
|
|
|
2221
2435
|
status: string;
|
|
2222
2436
|
/** Per-price-level fills, identical shape to primary fills. Empty for non-ok statuses. */
|
|
2223
2437
|
fills: SmartRouteVenueFill[];
|
|
2438
|
+
allocations?: SmartRouteAllocation[];
|
|
2439
|
+
bridgeSteps?: SmartRouteBridgeStep[];
|
|
2440
|
+
/**
|
|
2441
|
+
* One-time setup costs for this solo's chosen venue + market. Populated
|
|
2442
|
+
* only when the originating quote opted in via `deepEstimate=true`; absent
|
|
2443
|
+
* on cheap quotes and on non-executable / failed solos. Same shape as the
|
|
2444
|
+
* multi-route `feeBreakdown.setupCosts`. The solo's `estimatedProfit` and
|
|
2445
|
+
* `returnPct` are recomputed against `cost basis + setupCostsTotal` so
|
|
2446
|
+
* per-venue comparisons are setup-inclusive.
|
|
2447
|
+
*/
|
|
2448
|
+
setupCosts?: SmartRouteSetupCostLine[];
|
|
2449
|
+
/** Sum of this solo's `setupCosts` entries where `alreadyPaid=false`. */
|
|
2450
|
+
setupCostsTotal?: number;
|
|
2224
2451
|
}
|
|
2225
2452
|
/** @deprecated Smart-route side overrides are kept only for source compatibility. */
|
|
2226
2453
|
type SmartRouteSide = "yes" | "no";
|
|
@@ -2243,6 +2470,73 @@ interface SmartRouteParams {
|
|
|
2243
2470
|
chainBalances?: Record<string, number>;
|
|
2244
2471
|
slipCapBps?: number;
|
|
2245
2472
|
compareVenues?: boolean;
|
|
2473
|
+
/** Restrict this quote to one or more executable venues. */
|
|
2474
|
+
allowedVenues?: Venue[];
|
|
2475
|
+
/**
|
|
2476
|
+
* Opt in to the deep cost-estimate surface. When `true`, the response
|
|
2477
|
+
* `feeBreakdown` includes `setupCosts` (one-time chain approvals + Kalshi
|
|
2478
|
+
* SPL token-account rents) with per-item `alreadyPaid` flags from the
|
|
2479
|
+
* user's prior trade history. Buy-only; ignored for sells.
|
|
2480
|
+
*
|
|
2481
|
+
* Deep quotes also pre-deduct the unpaid setup total from `maxSpend`
|
|
2482
|
+
* before routing, so `totalCostIncFees` (and the recomputed
|
|
2483
|
+
* `estimatedProfit` / `returnPct`) stay within the partner's stated
|
|
2484
|
+
* budget.
|
|
2485
|
+
*/
|
|
2486
|
+
deepEstimate?: boolean;
|
|
2487
|
+
}
|
|
2488
|
+
/** One-time setup line item — populated only on deep-estimate quotes. */
|
|
2489
|
+
interface SmartRouteSetupCostLine {
|
|
2490
|
+
/** "chainApproval" = ERC-20 + venue-contract approvals on the venue's
|
|
2491
|
+
* chain (Polymarket / Polygon, Limitless / Base, predict.fun / BNB).
|
|
2492
|
+
* "venueMarketAta" = Kalshi-on-Solana per-market token-account rent. */
|
|
2493
|
+
kind: "chainApproval" | "venueMarketAta";
|
|
2494
|
+
venue: string;
|
|
2495
|
+
/** Set when `kind === "chainApproval"`. */
|
|
2496
|
+
chainId?: number;
|
|
2497
|
+
/** Set when `kind === "venueMarketAta"`. */
|
|
2498
|
+
venueMarketId?: string;
|
|
2499
|
+
/** Per-item cost in USD. Sourced from documented chain-paymaster floors
|
|
2500
|
+
* (Polygon/Base/Arbitrum ≈ $0.05, BNB $0.20, Solana ATA ≈ $0.30). */
|
|
2501
|
+
costUsd: number;
|
|
2502
|
+
/** True if the user has already paid this on a prior fill — render as a
|
|
2503
|
+
* strike-through "first-time fee" chip rather than charging again. */
|
|
2504
|
+
alreadyPaid: boolean;
|
|
2505
|
+
}
|
|
2506
|
+
interface SmartRouteFeeBreakdown {
|
|
2507
|
+
rawExecCost: number;
|
|
2508
|
+
venueFees: number;
|
|
2509
|
+
bridgeFees: number;
|
|
2510
|
+
executionGas: number;
|
|
2511
|
+
totalCost: number;
|
|
2512
|
+
}
|
|
2513
|
+
/** Cost breakdown for a route quote. */
|
|
2514
|
+
interface SmartRouteFeeBreakdown {
|
|
2515
|
+
rawExecCost: number;
|
|
2516
|
+
venueFees: number;
|
|
2517
|
+
bridgeFees: number;
|
|
2518
|
+
executionGas: number;
|
|
2519
|
+
totalCost: number;
|
|
2520
|
+
/** Populated only when the request specified `deepEstimate=true`. */
|
|
2521
|
+
setupCosts?: SmartRouteSetupCostLine[];
|
|
2522
|
+
/** Sum of `setupCosts` entries where `alreadyPaid === false`. */
|
|
2523
|
+
setupCostsTotal?: number;
|
|
2524
|
+
/**
|
|
2525
|
+
* Partner-level execution fee in USD. The worst-case fee the user will
|
|
2526
|
+
* pay against the routed buy notional at quote time. Buy-side only —
|
|
2527
|
+
* sell quotes don't carry this field.
|
|
2528
|
+
*
|
|
2529
|
+
* Actual collection happens after the trade fills, against realized
|
|
2530
|
+
* notional (which may be less on partial fills). Partner UIs should
|
|
2531
|
+
* render this as "you'll pay up to $X in app fees".
|
|
2532
|
+
*
|
|
2533
|
+
* Both `appFee` and `appFeeBips` are present iff `appFee > 0`.
|
|
2534
|
+
*/
|
|
2535
|
+
appFee?: number;
|
|
2536
|
+
/** Partner's configured bips for this market — the rate that produced `appFee`. */
|
|
2537
|
+
appFeeBips?: number;
|
|
2538
|
+
/** Category key the bips resolved against (e.g. "sports", or "all" for the fallback). */
|
|
2539
|
+
appFeeCategory?: string;
|
|
2246
2540
|
}
|
|
2247
2541
|
/** Response from GET /orderbook/:venueMarketOutcomeId/route. */
|
|
2248
2542
|
interface SmartRouteResponse {
|
|
@@ -2251,6 +2545,12 @@ interface SmartRouteResponse {
|
|
|
2251
2545
|
venueMarketId: string;
|
|
2252
2546
|
estimatedCostRaw: string;
|
|
2253
2547
|
expiresAt: string;
|
|
2548
|
+
/**
|
|
2549
|
+
* Timestamp at which the quote begins to drift — frontends should refetch
|
|
2550
|
+
* a fresh `getSmartRoute` at this point even though the cached quoteId
|
|
2551
|
+
* remains executable until `expiresAt`. Always earlier than `expiresAt`.
|
|
2552
|
+
*/
|
|
2553
|
+
refreshAt: string;
|
|
2254
2554
|
status: SmartRouteStatus;
|
|
2255
2555
|
fills: SmartRouteVenueFill[];
|
|
2256
2556
|
totalFilled: number;
|
|
@@ -2268,16 +2568,25 @@ interface SmartRouteResponse {
|
|
|
2268
2568
|
venueMarketOutcomeId: string;
|
|
2269
2569
|
reason: string;
|
|
2270
2570
|
}>;
|
|
2271
|
-
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
2272
2571
|
venueSoloQuotes?: VenueSoloQuote[];
|
|
2572
|
+
allocations?: SmartRouteAllocation[];
|
|
2573
|
+
bridgeSteps?: SmartRouteBridgeStep[];
|
|
2273
2574
|
/** Estimated payout if the outcome wins (= totalFilled shares × $1). */
|
|
2274
2575
|
estimatedPayout?: number;
|
|
2275
|
-
/** Total cost including all fees (rawExecCost + venueFees + bridgeFees +
|
|
2576
|
+
/** Total cost including all fees (rawExecCost + venueFees + bridgeFees +
|
|
2577
|
+
* executionGas). For deep-estimate quotes, `setupCostsTotal` is folded
|
|
2578
|
+
* into this number and `estimatedProfit` / `returnPct` are recomputed
|
|
2579
|
+
* against it. */
|
|
2276
2580
|
totalCostIncFees?: number;
|
|
2277
2581
|
/** Estimated profit if the outcome wins (= estimatedPayout − totalCostIncFees). */
|
|
2278
2582
|
estimatedProfit?: number;
|
|
2279
2583
|
/** Return on investment percentage (= estimatedProfit / totalCostIncFees × 100). */
|
|
2280
2584
|
returnPct?: number;
|
|
2585
|
+
/** Per-route fee breakdown. Always present when the engine produced a
|
|
2586
|
+
* feasible plan; omitted on solo / failed quotes. The `setupCosts` and
|
|
2587
|
+
* `setupCostsTotal` fields are populated only when the request set
|
|
2588
|
+
* `deepEstimate=true`. */
|
|
2589
|
+
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
2281
2590
|
/** Populated only when status === "insufficient_position". */
|
|
2282
2591
|
positionAvailability?: {
|
|
2283
2592
|
totalSellableShares: number;
|
|
@@ -2320,6 +2629,18 @@ interface SearchParams {
|
|
|
2320
2629
|
categoryIds?: string[];
|
|
2321
2630
|
limit?: number;
|
|
2322
2631
|
cursor?: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* Opt in to the server-side reranker for higher-quality top results.
|
|
2634
|
+
*
|
|
2635
|
+
* Send `deep: true` for the final search-results page (submit / Enter) and
|
|
2636
|
+
* leave it off for debounced typeahead. Adds ~100–150 ms on a cold rerank
|
|
2637
|
+
* cache and ~3 ms on a warm one — typeahead can't afford the cold cost,
|
|
2638
|
+
* and the result orderings differ enough that the server gives the two
|
|
2639
|
+
* modes separate cache slots.
|
|
2640
|
+
*
|
|
2641
|
+
* Defaults to `false`.
|
|
2642
|
+
*/
|
|
2643
|
+
deep?: boolean;
|
|
2323
2644
|
}
|
|
2324
2645
|
type SearchResponse<T> = {
|
|
2325
2646
|
type: SearchType;
|
|
@@ -2327,6 +2648,99 @@ type SearchResponse<T> = {
|
|
|
2327
2648
|
nextCursor: string | null;
|
|
2328
2649
|
hasMore: boolean;
|
|
2329
2650
|
};
|
|
2651
|
+
type CorrelatedMarketSide = "yes" | "no";
|
|
2652
|
+
type CorrelatedMarketSignalDirection = "more_likely" | "less_likely";
|
|
2653
|
+
interface CorrelatedMarketSignal {
|
|
2654
|
+
id: string;
|
|
2655
|
+
text: string;
|
|
2656
|
+
side: CorrelatedMarketSide;
|
|
2657
|
+
direction: CorrelatedMarketSignalDirection;
|
|
2658
|
+
domain: string;
|
|
2659
|
+
}
|
|
2660
|
+
interface CorrelatedMarketSignalBatch {
|
|
2661
|
+
id: string;
|
|
2662
|
+
venueMarketId: string;
|
|
2663
|
+
sourceModel: string;
|
|
2664
|
+
promptVersion: number;
|
|
2665
|
+
createdAt: string;
|
|
2666
|
+
signals: CorrelatedMarketSignal[];
|
|
2667
|
+
}
|
|
2668
|
+
interface CorrelatedMarketsStatus {
|
|
2669
|
+
markets: {
|
|
2670
|
+
total: number;
|
|
2671
|
+
processed: number;
|
|
2672
|
+
coverage: number;
|
|
2673
|
+
};
|
|
2674
|
+
signals: {
|
|
2675
|
+
total: number;
|
|
2676
|
+
withEmbeddings: number;
|
|
2677
|
+
missingEmbeddings: number;
|
|
2678
|
+
};
|
|
2679
|
+
eventTitleEmbeddings: {
|
|
2680
|
+
total: number;
|
|
2681
|
+
events: number;
|
|
2682
|
+
coverage: number;
|
|
2683
|
+
};
|
|
2684
|
+
config: {
|
|
2685
|
+
batchSize: number;
|
|
2686
|
+
jobsEnabled: boolean;
|
|
2687
|
+
backfillInterval: string;
|
|
2688
|
+
reembedInterval: string;
|
|
2689
|
+
eventEmbeddingInterval: string;
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
interface CorrelatedMarketQueryResult {
|
|
2693
|
+
venueMarketId: string;
|
|
2694
|
+
marketQuestion: string;
|
|
2695
|
+
eventTitle: string;
|
|
2696
|
+
score: number;
|
|
2697
|
+
matchedSignal: CorrelatedMarketSignal;
|
|
2698
|
+
venue: string;
|
|
2699
|
+
}
|
|
2700
|
+
interface CorrelatedMarketCascadeItem {
|
|
2701
|
+
venueEventId: string;
|
|
2702
|
+
eventTitle: string;
|
|
2703
|
+
score: number;
|
|
2704
|
+
action: string;
|
|
2705
|
+
reason: string;
|
|
2706
|
+
reasonDomain: string;
|
|
2707
|
+
}
|
|
2708
|
+
interface CorrelatedMarketCascadeResponse {
|
|
2709
|
+
data: CorrelatedMarketCascadeItem[];
|
|
2710
|
+
nextCursor: string | null;
|
|
2711
|
+
hasMore: boolean;
|
|
2712
|
+
}
|
|
2713
|
+
interface ResolveCorrelatedMarketsParams {
|
|
2714
|
+
venue?: string;
|
|
2715
|
+
externalId?: string;
|
|
2716
|
+
slug?: string;
|
|
2717
|
+
conditionId?: string;
|
|
2718
|
+
q?: string;
|
|
2719
|
+
side?: CorrelatedMarketSide;
|
|
2720
|
+
mode?: "expand" | "hedge";
|
|
2721
|
+
limit?: number;
|
|
2722
|
+
cursor?: string;
|
|
2723
|
+
includeResolved?: boolean;
|
|
2724
|
+
}
|
|
2725
|
+
type ResolveCorrelatedMarketsResponse = ({
|
|
2726
|
+
market: {
|
|
2727
|
+
id: string;
|
|
2728
|
+
question: string;
|
|
2729
|
+
};
|
|
2730
|
+
} & CorrelatedMarketCascadeResponse) | {
|
|
2731
|
+
market: {
|
|
2732
|
+
id: string;
|
|
2733
|
+
question: string;
|
|
2734
|
+
};
|
|
2735
|
+
status: "processing";
|
|
2736
|
+
message: string;
|
|
2737
|
+
};
|
|
2738
|
+
interface ResolvedCorrelatedMarketsResponse extends CorrelatedMarketCascadeResponse {
|
|
2739
|
+
market: {
|
|
2740
|
+
id: string;
|
|
2741
|
+
question: string;
|
|
2742
|
+
};
|
|
2743
|
+
}
|
|
2330
2744
|
|
|
2331
2745
|
type AuthStateListener = (authenticated: boolean) => void;
|
|
2332
2746
|
type UserAuthResult = {
|
|
@@ -2464,7 +2878,13 @@ declare class AggClient {
|
|
|
2464
2878
|
}): Promise<PaginatedResponse<UserHolding>>;
|
|
2465
2879
|
/** List trade-executor orders for the authenticated user. */
|
|
2466
2880
|
getOrders(params?: OrderListQuery): Promise<TradeExecutorOrderListResponse>;
|
|
2467
|
-
/**
|
|
2881
|
+
/**
|
|
2882
|
+
* List execution orders for the authenticated user (cursor pagination).
|
|
2883
|
+
*
|
|
2884
|
+
* Pass `quoteId` to fetch every leg of a multi-venue split route in
|
|
2885
|
+
* one call — `useQuoteSummary(quoteId)` reduces the list into a
|
|
2886
|
+
* rollup (total cost, share-weighted avg price, to-win).
|
|
2887
|
+
*/
|
|
2468
2888
|
getExecutionOrders(params?: ExecutionOrdersQuery): Promise<PaginatedResponse<ExecutionOrderItem>>;
|
|
2469
2889
|
/** Unified user activity feed (trades, deposits, withdrawals, bridges, wallet ops). */
|
|
2470
2890
|
getUserActivity(params?: UserActivityQuery): Promise<PaginatedResponse<UserActivityItem>>;
|
|
@@ -2485,6 +2905,7 @@ declare class AggClient {
|
|
|
2485
2905
|
status?: MarketStatus[];
|
|
2486
2906
|
sortBy?: string;
|
|
2487
2907
|
sortDir?: string;
|
|
2908
|
+
recurrence?: string;
|
|
2488
2909
|
limit?: number;
|
|
2489
2910
|
cursor?: string;
|
|
2490
2911
|
minYesPrice?: number;
|
|
@@ -2513,11 +2934,53 @@ declare class AggClient {
|
|
|
2513
2934
|
getCategories(options?: {
|
|
2514
2935
|
limit?: number;
|
|
2515
2936
|
cursor?: string;
|
|
2937
|
+
parentId?: string;
|
|
2516
2938
|
}): Promise<PaginatedResponse<Category>>;
|
|
2517
2939
|
/** Get per-app UI config (disabled venues + category presets). Requires appId. */
|
|
2518
2940
|
getAppConfig(init?: RequestInit): Promise<AppClientConfigResponse>;
|
|
2519
|
-
/**
|
|
2941
|
+
/**
|
|
2942
|
+
* Search events or markets by query string. Supports cursor-based pagination.
|
|
2943
|
+
*
|
|
2944
|
+
* Pass `deep: true` on submit (Enter / Search button) to opt in to the
|
|
2945
|
+
* server-side reranker. Leave it off for debounced typeahead — the wire
|
|
2946
|
+
* format intentionally omits the param so the server hits the cheaper
|
|
2947
|
+
* (and longer-TTL) light cache slot.
|
|
2948
|
+
*/
|
|
2520
2949
|
search<T = VenueEvent>(params: SearchParams): Promise<SearchResponse<T>>;
|
|
2950
|
+
/** Get Correlated Markets processing and embedding coverage. */
|
|
2951
|
+
getCorrelatedMarketsStatus(options?: {
|
|
2952
|
+
signal?: AbortSignal;
|
|
2953
|
+
}): Promise<CorrelatedMarketsStatus>;
|
|
2954
|
+
/** Get the generated correlated market signals for a market. */
|
|
2955
|
+
getMarketCorrelatedSignals(venueMarketId: string, options?: {
|
|
2956
|
+
signal?: AbortSignal;
|
|
2957
|
+
includeResolved?: boolean;
|
|
2958
|
+
}): Promise<CorrelatedMarketSignalBatch>;
|
|
2959
|
+
/** Search markets by Correlated Markets signal similarity. */
|
|
2960
|
+
queryCorrelatedMarkets(params: {
|
|
2961
|
+
text: string;
|
|
2962
|
+
limit?: number;
|
|
2963
|
+
includeResolved?: boolean;
|
|
2964
|
+
}, options?: {
|
|
2965
|
+
signal?: AbortSignal;
|
|
2966
|
+
}): Promise<{
|
|
2967
|
+
results: CorrelatedMarketQueryResult[];
|
|
2968
|
+
}>;
|
|
2969
|
+
/** Get expansion and hedge candidates for an already-processed market. */
|
|
2970
|
+
getCorrelatedMarketCascade(params: {
|
|
2971
|
+
venueMarketId: string;
|
|
2972
|
+
side?: "yes" | "no";
|
|
2973
|
+
mode?: "expand" | "hedge";
|
|
2974
|
+
limit?: number;
|
|
2975
|
+
cursor?: string;
|
|
2976
|
+
includeResolved?: boolean;
|
|
2977
|
+
}, options?: {
|
|
2978
|
+
signal?: AbortSignal;
|
|
2979
|
+
}): Promise<CorrelatedMarketCascadeResponse>;
|
|
2980
|
+
/** Resolve a market by ID, venue identifier, slug, conditionId, or text, then return candidates. */
|
|
2981
|
+
resolveCorrelatedMarkets(params: ResolveCorrelatedMarketsParams, options?: {
|
|
2982
|
+
signal?: AbortSignal;
|
|
2983
|
+
}): Promise<ResolveCorrelatedMarketsResponse>;
|
|
2521
2984
|
/** Get the canonical TradingView-style bar series for a single venue market outcome. */
|
|
2522
2985
|
getChartBars(params: {
|
|
2523
2986
|
venueMarketOutcomeId: string;
|
|
@@ -2538,11 +3001,13 @@ declare class AggClient {
|
|
|
2538
3001
|
/** Get live midpoints for the explicit venueMarketIds requested. */
|
|
2539
3002
|
getMidpoints(params: {
|
|
2540
3003
|
venueMarketIds: string[];
|
|
3004
|
+
bestPrice?: boolean;
|
|
2541
3005
|
}, options?: {
|
|
2542
3006
|
signal?: AbortSignal;
|
|
2543
3007
|
}): Promise<BatchMidpointsResponse>;
|
|
2544
3008
|
getMidpoints(venueMarketIds: string[], options?: {
|
|
2545
3009
|
signal?: AbortSignal;
|
|
3010
|
+
bestPrice?: boolean;
|
|
2546
3011
|
}): Promise<BatchMidpointsResponse>;
|
|
2547
3012
|
/** Get a single outcome-level orderbook from the engine. */
|
|
2548
3013
|
getOutcomeOrderbook(outcomeId: string, options?: {
|
|
@@ -2676,4 +3141,4 @@ declare function aggregateMidpoint(midpoints: (number | null | undefined)[]): nu
|
|
|
2676
3141
|
|
|
2677
3142
|
declare function createAggClient(options: AggClientOptions): AggClient;
|
|
2678
3143
|
|
|
2679
|
-
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, 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 CreateApp, 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 ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionPositionGroup, type ExecutionPositionsQuery, type GetBalanceQuery, type GetBalanceResponse, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedOrderbookMarket, type MatchingReport, type MidpointItem, type MidpointRow, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, 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 PersistedAuthSnapshot, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, type SettlementSource, type SetupDepositAddressStep, type SetupVenueKeyStep, type SimpleOrderbookLevel, type SmartRouteFill, type SmartRouteParams, type SmartRouteResponse, type SmartRouteSide, type SmartRouteStatus, type SmartRouteVenueFill, type SplitsByAmountResult, type SyncBalancesResponse, 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 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 WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, 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, computeBestSplitsByAmount, computeChecksum, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, getWalletAddressFromUserProfile, hasShape, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, parse, parseEmail, parseEmailStrict, safeParse, snapshotToOrderbook, sortVenues };
|
|
3144
|
+
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 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 ExecutionOrderItem, type ExecutionOrdersQuery, type ExecutionPositionGroup, type ExecutionPositionsQuery, type GetBalanceQuery, type GetBalanceResponse, type GetHoldingsQuery, type GetHoldingsResponse, type GetOrdersParams, type GetOrdersQuery, type GetPositionsParams, type GetPositionsQuery, type HelloResponse, IMAGE_SIZES, ImageSize, type MarkSource, type MarketPriceHistory, MarketStatus, MatchStatus, MatchType, type MatchedMidpoint, type MatchedMidpointOutcome, type MatchedOrderbookMarket, type MatchedVenueMarketOutcomeRef, type MatchingReport, type MidpointItem, type MidpointRow, type NonceResponse, type OrderListItem, type OrderListQuery, OrderStatus, 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 PersistedAuthSnapshot, type PositionGroup, type PositionRedeemStatus, type PricePoint, type PriceSource, type PricesHistoryResponse, type QuoteManagedParams, type QuoteManagedRequest, type QuoteManagedResponse, type QuoteManagedSplit, type QuoteManagedStep, type QuoteSplit, type QuoteStep, type RampQuote, type RampQuoteRequest, type RampSessionRequest, type RampWidgetSession, type RedeemLegResult, type RedeemLegStatus, type RedeemRequest, type RedeemResponse, type RequestedOrderbookMarket, type ResolveCorrelatedMarketsParams, type ResolveCorrelatedMarketsResponse, type ResolvedCorrelatedMarketsResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, type ServerWallet, 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, 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 WithdrawTokenSymbol, type WithdrawalExpected, type WithdrawalLeg, type WithdrawalLegStatus, type WithdrawalLegType, type WithdrawalLifecycleStatus, type WithdrawalSource, type WithdrawalSourceItem, type WithdrawalSourceStatus, 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 };
|