@agg-build/sdk 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3655,6 +3655,12 @@ interface SmartRouteVenueFill {
3655
3655
  noPrice: number;
3656
3656
  fills: SmartRouteFill[];
3657
3657
  venueQty: number;
3658
+ /**
3659
+ * Builder fee for this fill in USD — the slice paid to a builder code
3660
+ * rather than to the venue. Excluded from `venueFee`. Optional so an
3661
+ * older engine build that does not emit it still validates.
3662
+ */
3663
+ builderFee?: number;
3658
3664
  /** Inclusive fee/reserve funding budget. For fee display, use the route's
3659
3665
  * feeBreakdown.venueFees and executionReserve instead. */
3660
3666
  venueFee?: number;
@@ -3797,6 +3803,13 @@ interface SmartRouteSetupCostLine {
3797
3803
  interface SmartRouteFeeBreakdown {
3798
3804
  rawExecCost: number;
3799
3805
  venueFees: number;
3806
+ /**
3807
+ * Builder fee in USD — the slice paid to a builder code rather than to the
3808
+ * venue. Partners with their own builder code see their own rate here;
3809
+ * everyone else sees the platform default. Excluded from `venueFees`,
3810
+ * included in `totalCost`.
3811
+ */
3812
+ builderFee?: number;
3800
3813
  /** Additional CH funding reserve for slippage or possible venue charges.
3801
3814
  * Excluded from venueFees and totalCost; included in funding allocations.
3802
3815
  * Only the unused portion is released after execution. */
@@ -3916,6 +3929,21 @@ interface SmartRouteResponse {
3916
3929
  * `setupCostsTotal` fields are populated only when the request set
3917
3930
  * `deepEstimate=true`. */
3918
3931
  feeBreakdown?: SmartRouteFeeBreakdown;
3932
+ /**
3933
+ * Quote-time snapshot of the partner fee configuration that produced
3934
+ * `feeBreakdown.appFee`, frozen so config drift between quote and execute
3935
+ * cannot change what the user is charged.
3936
+ *
3937
+ * This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
3938
+ * This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
3939
+ * 6-decimal USD atoms, and is what a partner reconciles against their
3940
+ * `AppFeeCharge` rows. `null` when the app has no fee configured.
3941
+ */
3942
+ appFee?: {
3943
+ bips: number;
3944
+ categoryKey: string;
3945
+ quotedAppFeeRaw: string;
3946
+ } | null;
3919
3947
  /** Populated only when status === "insufficient_position". */
3920
3948
  positionAvailability?: {
3921
3949
  totalSellableShares: number;
@@ -4496,7 +4524,6 @@ declare class AggClient {
4496
4524
  search?: string;
4497
4525
  matchStatus?: MatchStatus;
4498
4526
  status?: MarketStatus;
4499
- categoryIds?: string[];
4500
4527
  aggKey?: string[];
4501
4528
  sportsMarketType?: string[];
4502
4529
  period?: string[];
package/dist/index.d.ts CHANGED
@@ -3655,6 +3655,12 @@ interface SmartRouteVenueFill {
3655
3655
  noPrice: number;
3656
3656
  fills: SmartRouteFill[];
3657
3657
  venueQty: number;
3658
+ /**
3659
+ * Builder fee for this fill in USD — the slice paid to a builder code
3660
+ * rather than to the venue. Excluded from `venueFee`. Optional so an
3661
+ * older engine build that does not emit it still validates.
3662
+ */
3663
+ builderFee?: number;
3658
3664
  /** Inclusive fee/reserve funding budget. For fee display, use the route's
3659
3665
  * feeBreakdown.venueFees and executionReserve instead. */
3660
3666
  venueFee?: number;
@@ -3797,6 +3803,13 @@ interface SmartRouteSetupCostLine {
3797
3803
  interface SmartRouteFeeBreakdown {
3798
3804
  rawExecCost: number;
3799
3805
  venueFees: number;
3806
+ /**
3807
+ * Builder fee in USD — the slice paid to a builder code rather than to the
3808
+ * venue. Partners with their own builder code see their own rate here;
3809
+ * everyone else sees the platform default. Excluded from `venueFees`,
3810
+ * included in `totalCost`.
3811
+ */
3812
+ builderFee?: number;
3800
3813
  /** Additional CH funding reserve for slippage or possible venue charges.
3801
3814
  * Excluded from venueFees and totalCost; included in funding allocations.
3802
3815
  * Only the unused portion is released after execution. */
@@ -3916,6 +3929,21 @@ interface SmartRouteResponse {
3916
3929
  * `setupCostsTotal` fields are populated only when the request set
3917
3930
  * `deepEstimate=true`. */
3918
3931
  feeBreakdown?: SmartRouteFeeBreakdown;
3932
+ /**
3933
+ * Quote-time snapshot of the partner fee configuration that produced
3934
+ * `feeBreakdown.appFee`, frozen so config drift between quote and execute
3935
+ * cannot change what the user is charged.
3936
+ *
3937
+ * This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
3938
+ * This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
3939
+ * 6-decimal USD atoms, and is what a partner reconciles against their
3940
+ * `AppFeeCharge` rows. `null` when the app has no fee configured.
3941
+ */
3942
+ appFee?: {
3943
+ bips: number;
3944
+ categoryKey: string;
3945
+ quotedAppFeeRaw: string;
3946
+ } | null;
3919
3947
  /** Populated only when status === "insufficient_position". */
3920
3948
  positionAvailability?: {
3921
3949
  totalSellableShares: number;
@@ -4496,7 +4524,6 @@ declare class AggClient {
4496
4524
  search?: string;
4497
4525
  matchStatus?: MatchStatus;
4498
4526
  status?: MarketStatus;
4499
- categoryIds?: string[];
4500
4527
  aggKey?: string[];
4501
4528
  sportsMarketType?: string[];
4502
4529
  period?: string[];
package/dist/index.js CHANGED
@@ -686,13 +686,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
686
686
  // ../common/src/utils/sort-venues.ts
687
687
  var VENUE_SORT_ORDER = [
688
688
  "polymarket" /* polymarket */,
689
+ "hyperliquid" /* hyperliquid */,
690
+ "predict" /* predict */,
691
+ "prophetx" /* prophetx */,
689
692
  "kalshi" /* kalshi */,
690
- "opinion" /* opinion */,
691
693
  "limitless" /* limitless */,
692
- "predict" /* predict */,
693
- "pred" /* pred */,
694
694
  "myriad" /* myriad */,
695
- "hyperliquid" /* hyperliquid */
695
+ "pred" /* pred */,
696
+ "probable" /* probable */,
697
+ "novig" /* novig */,
698
+ "opinion" /* opinion */
696
699
  ];
697
700
  var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
698
701
  var getVenueOrder = (venue) => {
@@ -3015,8 +3018,6 @@ Issued At: ${issuedAt}`;
3015
3018
  if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
3016
3019
  if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
3017
3020
  if (options == null ? void 0 : options.status) query.status = options.status;
3018
- if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
3019
- query.categoryIds = options.categoryIds;
3020
3021
  if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
3021
3022
  if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
3022
3023
  query.sportsMarketType = options.sportsMarketType;
package/dist/index.mjs CHANGED
@@ -554,13 +554,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
554
554
  // ../common/src/utils/sort-venues.ts
555
555
  var VENUE_SORT_ORDER = [
556
556
  "polymarket" /* polymarket */,
557
+ "hyperliquid" /* hyperliquid */,
558
+ "predict" /* predict */,
559
+ "prophetx" /* prophetx */,
557
560
  "kalshi" /* kalshi */,
558
- "opinion" /* opinion */,
559
561
  "limitless" /* limitless */,
560
- "predict" /* predict */,
561
- "pred" /* pred */,
562
562
  "myriad" /* myriad */,
563
- "hyperliquid" /* hyperliquid */
563
+ "pred" /* pred */,
564
+ "probable" /* probable */,
565
+ "novig" /* novig */,
566
+ "opinion" /* opinion */
564
567
  ];
565
568
  var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
566
569
  var getVenueOrder = (venue) => {
@@ -2883,8 +2886,6 @@ Issued At: ${issuedAt}`;
2883
2886
  if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
2884
2887
  if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
2885
2888
  if (options == null ? void 0 : options.status) query.status = options.status;
2886
- if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
2887
- query.categoryIds = options.categoryIds;
2888
2889
  if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
2889
2890
  if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
2890
2891
  query.sportsMarketType = options.sportsMarketType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/sdk",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
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",