@agg-build/sdk 4.23.0 → 4.25.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/{agg-websocket-WvLXKqYo.d.mts → agg-websocket-Bxt9PzTz.d.mts} +84 -2
- package/dist/{agg-websocket-WvLXKqYo.d.ts → agg-websocket-Bxt9PzTz.d.ts} +84 -2
- package/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/index.d.mts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +68 -6
- package/dist/index.mjs +67 -6
- package/dist/market-data.d.mts +2 -2
- package/dist/market-data.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1905,6 +1905,16 @@ type SignerFn = (req: SignatureRequest) => Promise<string | {
|
|
|
1905
1905
|
declare const SELF_CUSTODY_FILL_TIMEOUT_MS: number;
|
|
1906
1906
|
/** Gap between re-reads while an on-chain step is in flight. */
|
|
1907
1907
|
declare const SELF_CUSTODY_POLL_INTERVAL_MS = 2000;
|
|
1908
|
+
/**
|
|
1909
|
+
* How long `fillSelfCustody` waits on the `signer` for ONE optional request
|
|
1910
|
+
* signed by a wallet other than the user's — e.g. a partner's activation
|
|
1911
|
+
* sponsor. Such a request can delay the batch's submission by at most this long,
|
|
1912
|
+
* after which it is declined and the required signatures go out without it.
|
|
1913
|
+
* Required requests, and optional ones the user's own wallet signs (the fill's
|
|
1914
|
+
* `signingAddress` or any required request's `signerAddress`, e.g. a referral
|
|
1915
|
+
* code), are never bounded by this.
|
|
1916
|
+
*/
|
|
1917
|
+
declare const OPTIONAL_SIGNATURE_TIMEOUT_MS = 15000;
|
|
1908
1918
|
/**
|
|
1909
1919
|
* States a run never leaves. Everything else means "still working".
|
|
1910
1920
|
*
|
|
@@ -2713,14 +2723,27 @@ interface PlaceOrderParams {
|
|
|
2713
2723
|
chainBalances?: Record<string, number>;
|
|
2714
2724
|
/** Per-trade app fee in bips (0..10000), replacing the app's configured rate. Needs an app API key. Buy only. */
|
|
2715
2725
|
appFeeBips?: number;
|
|
2726
|
+
/** Per-venue app fee in bips (each 0..10000), e.g. `{ polymarket: 20, hyperliquid: 10 }`. Wins over `appFeeBips` on the venues it names; `appFeeBips` still covers the rest. Needs an app API key. Buy only. */
|
|
2727
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
2716
2728
|
/** Referral: EVM address that receives the referral fee. Needs an app API key. */
|
|
2717
2729
|
referrer?: string;
|
|
2718
2730
|
/** Referral fee in bips of routed notional (1..10000). Snag-free. */
|
|
2719
2731
|
referrerFeeBips?: number;
|
|
2732
|
+
/** Per-venue referral fee in bips (each 0..10000; 0 = none on that venue). Wins over `referrerFeeBips` on the venues it names. Needs `referrer` and an app API key. Not for `skipQuote`. */
|
|
2733
|
+
referrerFeeBipsByVenue?: Record<string, number>;
|
|
2720
2734
|
/** Who funds the referral: "user" (default) reserves it from maxSpend; "app" pays from `referralPayerAddress` after the fill. */
|
|
2721
2735
|
referralPayer?: "user" | "app";
|
|
2722
2736
|
/** Required with `referralPayer: "app"`: the wallet that signs the parked payout transaction. */
|
|
2723
2737
|
referralPayerAddress?: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* User-paid referral only: a wallet that pays Hyperliquid's one-time 1 USDC
|
|
2740
|
+
* activation fee for a referrer with no HyperCore account (self-custody
|
|
2741
|
+
* Hyperliquid buys). Before the fill a pending signature with this
|
|
2742
|
+
* `signerAddress` and `purpose: "hl_activation_sponsor"` is passed to your
|
|
2743
|
+
* `signer`; it is `optional`, so declining it — or not answering within
|
|
2744
|
+
* `OPTIONAL_SIGNATURE_TIMEOUT_MS` — never costs the trade.
|
|
2745
|
+
*/
|
|
2746
|
+
referralActivationSponsorAddress?: string;
|
|
2724
2747
|
/**
|
|
2725
2748
|
* Skip the smart-route solver and send one order straight to `venue` (predict,
|
|
2726
2749
|
* hyperliquid, novig and prophetx only; others return 400). Requires a `read_write` `x-app-api-key`. No
|
|
@@ -3391,6 +3414,40 @@ interface LeaderboardRow {
|
|
|
3391
3414
|
/** Gross realized P&L in USD (sells + settlements, before fees). */
|
|
3392
3415
|
realizedPnl: number;
|
|
3393
3416
|
}
|
|
3417
|
+
/** Exactly one of `userId`, `externalId`, `username`, `walletAddress` is required. */
|
|
3418
|
+
interface LeaderboardSeriesQuery {
|
|
3419
|
+
/** Inclusive UTC calendar day, `YYYY-MM-DD`. Default: 29 days before `to`. */
|
|
3420
|
+
from?: string;
|
|
3421
|
+
/** Inclusive UTC calendar day, `YYYY-MM-DD`. Default and maximum: today. */
|
|
3422
|
+
to?: string;
|
|
3423
|
+
userId?: string;
|
|
3424
|
+
externalId?: string;
|
|
3425
|
+
/** Only when the app's `leaderboardIdentity` is `profile`. */
|
|
3426
|
+
username?: string;
|
|
3427
|
+
/** Not when the app's `leaderboardIdentity` is `anonymous`. */
|
|
3428
|
+
walletAddress?: string;
|
|
3429
|
+
}
|
|
3430
|
+
interface LeaderboardSeriesPoint {
|
|
3431
|
+
/** UTC calendar day, `YYYY-MM-DD`. */
|
|
3432
|
+
day: string;
|
|
3433
|
+
/** Filled orders on this day. */
|
|
3434
|
+
orders: number;
|
|
3435
|
+
/** USD notional of every filled order on this day, buys and sells. */
|
|
3436
|
+
volume: number;
|
|
3437
|
+
/** USD notional of filled buy orders only. */
|
|
3438
|
+
spent: number;
|
|
3439
|
+
/** Gross realized P&L in USD booked this day (sells + settlements, before fees). */
|
|
3440
|
+
realizedPnl: number;
|
|
3441
|
+
/** Running total of `realizedPnl` from `from` through this day. */
|
|
3442
|
+
cumulativeRealizedPnl: number;
|
|
3443
|
+
}
|
|
3444
|
+
interface LeaderboardSeries {
|
|
3445
|
+
userId: string;
|
|
3446
|
+
from: string;
|
|
3447
|
+
to: string;
|
|
3448
|
+
/** One point per day in `[from, to]`, oldest first; days without activity are 0. */
|
|
3449
|
+
points: LeaderboardSeriesPoint[];
|
|
3450
|
+
}
|
|
3394
3451
|
interface RampQuoteRequest {
|
|
3395
3452
|
sourceAmount: string;
|
|
3396
3453
|
sourceCurrencyCode: string;
|
|
@@ -3605,14 +3662,27 @@ interface SmartRouteParams {
|
|
|
3605
3662
|
deepEstimate?: boolean;
|
|
3606
3663
|
/** Per-trade app fee in bips (0..10000), replacing the app's configured rate. Needs an app API key. Buy only. */
|
|
3607
3664
|
appFeeBips?: number;
|
|
3665
|
+
/** Per-venue app fee in bips (each 0..10000), e.g. `{ polymarket: 20, hyperliquid: 10 }`. Wins over `appFeeBips` on the venues it names; `appFeeBips` still covers the rest. Needs an app API key. Buy only. */
|
|
3666
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
3608
3667
|
/** Referral: EVM address that receives the referral fee. Needs an app API key. */
|
|
3609
3668
|
referrer?: string;
|
|
3610
3669
|
/** Referral fee in bips of routed notional (1..10000). Snag-free. */
|
|
3611
3670
|
referrerFeeBips?: number;
|
|
3671
|
+
/** Per-venue referral fee in bips (each 0..10000; 0 = none on that venue). Wins over `referrerFeeBips` on the venues it names. Needs `referrer` and an app API key. Not for `skipQuote`. */
|
|
3672
|
+
referrerFeeBipsByVenue?: Record<string, number>;
|
|
3612
3673
|
/** Who funds the referral: "user" (default) reserves it from maxSpend; "app" pays from `referralPayerAddress` after the fill. */
|
|
3613
3674
|
referralPayer?: "user" | "app";
|
|
3614
3675
|
/** Required with `referralPayer: "app"`: the wallet that signs the parked payout transaction. */
|
|
3615
3676
|
referralPayerAddress?: string;
|
|
3677
|
+
/**
|
|
3678
|
+
* User-paid referral only: a wallet that pays Hyperliquid's one-time 1 USDC
|
|
3679
|
+
* activation fee for a referrer with no HyperCore account (self-custody
|
|
3680
|
+
* Hyperliquid buys). Before the fill a pending signature with this
|
|
3681
|
+
* `signerAddress` and `purpose: "hl_activation_sponsor"` is passed to your
|
|
3682
|
+
* `signer`; it is `optional`, so declining it — or not answering within
|
|
3683
|
+
* `OPTIONAL_SIGNATURE_TIMEOUT_MS` — never costs the trade.
|
|
3684
|
+
*/
|
|
3685
|
+
referralActivationSponsorAddress?: string;
|
|
3616
3686
|
}
|
|
3617
3687
|
/** One-time setup line item — populated only on deep-estimate quotes. */
|
|
3618
3688
|
interface SmartRouteSetupCostLine {
|
|
@@ -3669,14 +3739,18 @@ interface SmartRouteFeeBreakdown {
|
|
|
3669
3739
|
* Both `appFee` and `appFeeBips` are present iff `appFee > 0`.
|
|
3670
3740
|
*/
|
|
3671
3741
|
appFee?: number;
|
|
3672
|
-
/** The rate that produced `appFee` — the partner's configured bips, or the request's `appFeeBips`. */
|
|
3742
|
+
/** The rate that produced `appFee` — the partner's configured bips, or the request's `appFeeBips`. When the venues this route fills have different rates, the highest of them; see `appFeeBipsByVenue`. */
|
|
3673
3743
|
appFeeBips?: number;
|
|
3744
|
+
/** App fee rate per venue this route fills, in bips. Present only when those rates differ. */
|
|
3745
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
3674
3746
|
/** Category key the bips resolved against (e.g. "sports", "all" for the fallback, "override" for a per-request `appFeeBips`). */
|
|
3675
3747
|
appFeeCategory?: string;
|
|
3676
3748
|
/** The `executionGas` line when it is actually collected with the app fee. Present iff > 0; already inside `totalCost`. */
|
|
3677
3749
|
gasReimbursement?: number;
|
|
3678
3750
|
/** Referral fee the USER pays, in USD. Present iff > 0 and `referralPayer` is "user"; already inside `totalCostIncFees`. An app-paid referral never appears here. */
|
|
3679
3751
|
referralFee?: number;
|
|
3752
|
+
/** Referral fee rate per venue this route fills, in bips. Present with `referralFee`, only when those rates differ. */
|
|
3753
|
+
referralFeeBipsByVenue?: Record<string, number>;
|
|
3680
3754
|
}
|
|
3681
3755
|
/** Response from GET /orderbook/:venueMarketOutcomeId/route. */
|
|
3682
3756
|
interface SmartRouteSettlementLeg {
|
|
@@ -3781,16 +3855,24 @@ interface SmartRouteResponse {
|
|
|
3781
3855
|
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3782
3856
|
*/
|
|
3783
3857
|
appFee?: {
|
|
3858
|
+
/** The route rate: the highest among the venues this route fills. */
|
|
3784
3859
|
bips: number;
|
|
3785
3860
|
categoryKey: string;
|
|
3786
3861
|
quotedAppFeeRaw: string;
|
|
3862
|
+
/** Rate per venue this route fills. Present only when those rates differ. */
|
|
3863
|
+
bipsByVenue?: Record<string, number>;
|
|
3787
3864
|
} | null;
|
|
3788
3865
|
/** Referral snapshot; null/absent when no referrer was accepted. */
|
|
3789
3866
|
referral?: {
|
|
3790
3867
|
referrer: string;
|
|
3868
|
+
/** The highest rate among the venues this route fills. */
|
|
3791
3869
|
feeBips: number;
|
|
3870
|
+
/** Rate per venue this route fills. Present only when those rates differ. */
|
|
3871
|
+
feeBipsByVenue?: Record<string, number>;
|
|
3792
3872
|
payer: "user" | "app";
|
|
3793
3873
|
payerAddress?: string;
|
|
3874
|
+
/** Wallet sponsoring the referrer's HyperCore activation, when sent. */
|
|
3875
|
+
activationSponsorAddress?: string;
|
|
3794
3876
|
quotedFeeUsd: number;
|
|
3795
3877
|
} | null;
|
|
3796
3878
|
/** Populated only when status === "insufficient_position". */
|
|
@@ -4394,4 +4476,4 @@ declare class AggWebSocket {
|
|
|
4394
4476
|
private isOrderbookDebugEnabled;
|
|
4395
4477
|
}
|
|
4396
4478
|
|
|
4397
|
-
export { type PaperTradingAccountListParams as $, AggWebSocket as A, type ExecutionStatusQuery as B, type ChartBarsResponse as C, type ExecutionStatusResponse as D, type ExecutionOrdersQuery as E, type UserActivityQuery as F, type UserActivityItem as G, type LeaderboardRow as H, type ExecutionPositionsQuery as I, type ExecutionPositionGroup as J, type ManagedBalancesParams as K, type LeaderboardQuery as L, MarketDataEngine as M, type UnifiedBalanceResponse as N, type OrderbookState as O, type PaginatedResponse as P, type UpsertVenueKey as Q, type VenueKeySummary as R, type SiweMessageParams as S, type TradeSplit as T, type UserProfile as U, Venue as V, type WsArbMarketUpdate as W, type VenueKeyStatus as X, type CreatePaperTradingAccountParams as Y, type PaperTradingAppOptions as Z, type PaperTradingAccount as _, type AggWebSocketOptions as a, type WithdrawPreviewResponse as a$, type PaperTradingAccountsPage as a0, type SetPaperTradingBalanceParams as a1, type PaperTradingBalanceResponse as a2, type ResetPaperTradingAccountParams as a3, type PlacePaperTradingOrderParams as a4, type PaperTradingOrder as a5, type PaperTradingListParams as a6, type PaperTradingPositionsPage as a7, type PaperTradingOrdersPage as a8, type PaperTradingPortfolio as a9, type CorrelatedMarketsStatus as aA, type CorrelatedMarketSignalBatch as aB, type CorrelatedMarketQueryResult as aC, type CorrelatedMarketCascadeResponse as aD, type ResolveCorrelatedMarketsParams as aE, type ResolveCorrelatedMarketsResponse as aF, type ChartResolution as aG, type BatchOrderbooksResponse as aH, type BatchMidpointsResponse as aI, type OutcomeOrderbookResponse as aJ, type SmartRouteParams as aK, type SmartRouteResponse as aL, type ExecuteManagedParams as aM, type ExecuteManagedResponse as aN, type PlaceLimitOrderParams as aO, type PlaceLimitOrderResponse as aP, type PlaceOrderParams as aQ, type PlaceOrderResponse as aR, type RedeemRequest as aS, type RedeemResponse as aT, type BalanceRefillPolicy as aU, type CreateBalanceRefillPolicyParams as aV, type UpdateBalanceRefillPolicyParams as aW, type BalanceRefillAttempt as aX, type WithdrawManagedParams as aY, type WithdrawManagedResponse as aZ, type WithdrawPreviewParams as a_, type CancelOrderSignature as aa, type CancelManagedExecutionResponse as ab, type CancelVenueOrderParams as ac, MatchStatus as ad, MarketStatus as ae, type RecurrenceFilter as af, type VenueEvent as ag, type EventBootstrapResponse as ah, type SportsLiveResponse as ai, type ListRecurringCryptoMarketsOptions as aj, type RecurringCryptoMarketsResponse as ak, type GetCryptoReferencePricesOptions as al, type CryptoReferencePricesResponse as am, type Category as an, type AppClientConfigResponse as ao, type VenueGeoPolicyResponse as ap, type RpcTokenResponse as aq, type NewsFeedListResponse as ar, type NewsFeedPageOptions as as, type NewsFeedArticleFeedResponse as at, type NewsFeedMarketFeedResponse as au, type NewsFeedStatusResponse as av, type NewsFeedMarketNewsParams as aw, type NewsFeedMarketNewsResponse as ax, type SearchParams as ay, type SearchResponse as az, type ChartHistoryManifest as b, type ExecuteTradeRequest as b$, type WithdrawalQuoteParams as b0, type WithdrawalQuoteResponse as b1, type SyncBalancesResponse as b2, type DepositAddressesResponse as b3, type GetPositionsParams as b4, type PositionGroup as b5, type RampQuoteRequest as b6, type RampQuote as b7, type RampSessionRequest as b8, type RampWidgetSession as b9, type CandleInterval as bA, type CandleTail as bB, Chain as bC, type ChartBarsMeta as bD, type ChartVenueCandles as bE, type ComputeSplitsRequest as bF, type ComputeSplitsResponse as bG, type ComputeSplitsSelection as bH, type CorrelatedMarketCascadeItem as bI, type CorrelatedMarketSide as bJ, type CorrelatedMarketSignal as bK, type CorrelatedMarketSignalDirection as bL, type CreateApp as bM, type CryptoReferencePriceError as bN, type CryptoReferencePriceExternalMarketInput as bO, type CryptoReferencePriceMarketInput as bP, type CryptoReferencePriceResult as bQ, type CryptoReferencePriceSource as bR, type CryptoReferencePriceTarget as bS, type DepositAddressesPendingResponse as bT, type DepositAddressesReadyResponse as bU, type DepositAddressesSupportedChain as bV, type DepositAddressesToken as bW, type DepositStep as bX, type DiagnosticCallback as bY, type DiagnosticEvent as bZ, type ExecuteManagedRequest as b_, type Candle as ba, ACTIVE_VENUES as bb, type Account as bc, AccountProvider as bd, AccountType as be, type AggAuthDeliveryMode as bf, type AggAuthPrivyVerifyBody as bg, type AggAuthProviderType as bh, type AggAuthWalletVerifyBody as bi, type AggClientAuthOptions as bj, type AggSessionUser as bk, type AggregatedOrderbookLevel as bl, type AggregatedOrderbookResponse as bm, type App as bn, type AppTradingMode as bo, type AttributedOrderbook as bp, type AttributedOrderbookLevel as bq, type AuthCodeResponse as br, type AuthTokenResponse as bs, type AuthUser as bt, type BalanceCustody as bu, type BalanceRefillAttemptStatus as bv, type BalanceRefillPolicyStatus as bw, type BookQuality as bx, CONFIRMED_MATCH_STATUSES as by, CandleBuilder as bz, type ChartCandle as c, type PricesHistoryResponse as c$, type ExecuteTradeResponse as c0, type ExecutionDagProgress as c1, type ExecutionDisplayGroupStatus as c2, type ExecutionDisplayStepKind as c3, type ExecutionMode as c4, type ExecutionOverallState as c5, type ExecutionStatusOrder as c6, type ExecutionStatusStep as c7, type GetBalanceQuery as c8, type GetBalanceResponse as c9, type NewsFeedMarketNewsResult as cA, type NonceResponse as cB, type NovigExecutionMode as cC, type OrderListItem as cD, OrderStatus as cE, OrderType as cF, type OrderbookBatchItemError as cG, type OrderbookBatchItemErrorCode as cH, type OrderbookBatchItemStatus as cI, type OrderbookHistoryPoint as cJ, type OrderbookHistoryResponse as cK, type OrderbookLevel as cL, type OrderbookQuoteFill as cM, type OrderbookQuoteParams as cN, type OrderbookQuoteResponse as cO, type OrderbookServiceUnavailableError as cP, type OrderbooksOnlyError as cQ, type OutcomeMidpoint as cR, type OutcomeMidpointRow as cS, type PaperTradingBalanceAdjustment as cT, type PaperTradingLiquidityStatus as cU, type PaperTradingMarkSource as cV, type PaperTradingPosition as cW, type PersistedAuthSnapshot as cX, type PositionRedeemStatus as cY, type PricePoint as cZ, type PriceSource as c_, type GetHoldingsQuery as ca, type GetHoldingsResponse as cb, type GetOrdersParams as cc, type GetOrdersQuery as cd, type GetPositionsQuery as ce, type HelloResponse as cf, type HistoryRangeRequest as cg, INACTIVE_VENUES as ch, type LeaderboardMetric as ci, type LimitOrderTimeInForce as cj, type MarkSource as ck, type MarketPriceHistory as cl, type MarketView as cm, type MarketViewBatch as cn, MatchType as co, type MatchedMidpoint as cp, type MatchedMidpointOutcome as cq, type MatchedOrderbookMarket as cr, type MatchedVenueMarketOutcomeRef as cs, type MidpointItem as ct, type MidpointRow as cu, type NewsFeedArticleFeedItem as cv, type NewsFeedArticleWithSummary as cw, type NewsFeedLinkedMarket as cx, type NewsFeedMarketFeedArticle as cy, type NewsFeedMarketFeedItem as cz, type AggWebSocketDiagnostics as d, type ValidateBalanceOnClientStep as d$, type ProphetxExecutionMode as d0, RECURRENCE_CADENCES as d1, type RecurrenceCadence as d2, type RecurringCryptoComparisonPoint as d3, type RecurringCryptoComparisonPriceSource as d4, type RecurringCryptoDuration as d5, type RecurringCryptoDurationInput as d6, type RecurringCryptoMarketMetrics as d7, type RecurringCryptoOrderbookDepthLevel as d8, type RecurringCryptoOrderbookDepthSide as d9, type SmartRouteAllocation as dA, type SmartRouteBridgeStep as dB, type SmartRouteFeeBreakdown as dC, type SmartRouteFill as dD, type SmartRouteSettlementLeg as dE, type SmartRouteSettlementPlan as dF, type SmartRouteSetupCostLine as dG, type SmartRouteSide as dH, type SmartRouteStatus as dI, type SmartRouteVenueFill as dJ, type SportsGameStatus as dK, type SportsLiveParticipant as dL, type SportsLiveState as dM, TERMINAL_EXECUTION_STATES as dN, TimeInForce as dO, type TradeExecutorOrder as dP, type TradeStep as dQ, type UserActivityBridge as dR, type UserActivityDeposit as dS, type UserActivityRedeem as dT, type UserActivityRedeemLeg as dU, type UserActivityTrade as dV, type UserActivityType as dW, type UserActivityUserOp as dX, type UserActivityWithdrawal as dY, VENUES as dZ, VENUE_CHAIN_IDS as d_, type RecurringCryptoOutcome as da, type RecurringCryptoOutcomeOrderbookDepth as db, type RecurringCryptoPriceComparison as dc, type RecurringCryptoReferencePrice as dd, type RecurringCryptoResolution as de, type RecurringCryptoSourceConfidence as df, type RecurringCryptoVenueMarket as dg, type RecurringCryptoWindowComparisons as dh, type RecurringCryptoWindowMarket as di, type RedeemLegResult as dj, type RedeemLegStatus as dk, type RequestedOrderbookMarket as dl, type ResolvedCorrelatedMarketsResponse as dm, SELF_CUSTODY_FILL_TIMEOUT_MS as dn, SELF_CUSTODY_POLL_INTERVAL_MS as dp, type ServerWallet as dq, type SettlementDiff as dr, type SettlementDifference as ds, type SettlementSource as dt, type SetupDepositAddressStep as du, type SetupVenueKeyStep as dv, type SignatureRequest as dw, type SignatureRequestType as dx, type SignerFn as dy, type SimpleOrderbookLevel as dz, type WsArbFeedBatch as e, isVenueDataVisible as e$, type ValidateManagedParams as e0, type ValidateManagedRequest as e1, type ValidateManagedResponse as e2, type ValidateTradeRequest as e3, type ValidateTradeResponse as e4, type VenueEventListItem as e5, type VenueEventWithMarkets as e6, type VenueGeoPolicyEntry as e7, type VenueMarketListItem as e8, type VenueMarketRef as e9, type WsClientMessage as eA, type WsConnected as eB, type WsError as eC, type WsHeartbeat as eD, type WsMarkSource as eE, type WsMarketResolved as eF, type WsOrderEvent as eG, type WsOrderEventType as eH, type WsOrderSubmitted as eI, type WsOrderbookDelta as eJ, type WsOrderbookSnapshot as eK, type WsRedeemEvent as eL, type WsServerMessage as eM, type WsSubscribed as eN, type WsTrade as eO, type WsUnsubscribed as eP, type WsVenueBook as eQ, type WsVenueInfo as eR, type WsVenueLevel as eS, type WsWithdrawalLegStatus as eT, type WsWithdrawalLifecycleEvent as eU, type WsWithdrawalLifecycleLeg as eV, type WsWithdrawalLifecycleStatus as eW, applyOrderbookDelta as eX, computeChecksum as eY, getEffectiveDisabledVenues as eZ, isVenueActive as e_, type VenueOrderbookEntry as ea, type VenueOrderbookLevel as eb, type VenuePositionBalance as ec, type VenuePriceInfo as ed, type VenueSoloQuote as ee, type VerifyBody as ef, type VerifyResponse as eg, type WalletChainBalance as eh, type WalletTokenBalance as ei, type WithdrawManagedRequest as ej, type WithdrawManagedSourceItem as ek, type WithdrawTokenSymbol as el, type WithdrawalExpected as em, type WithdrawalLeg as en, type WithdrawalLegStatus as eo, type WithdrawalLegType as ep, type WithdrawalLifecycleStatus as eq, type WithdrawalSource as er, type WithdrawalSourceItem as es, type WithdrawalSourceStatus as et, type WithdrawalSourceTokenSymbol as eu, type WsArbFeedEntry as ev, type WsAttributedLevel as ew, type WsAuthenticated as ex, type WsBalanceUpdate as ey, type WsCandleInterval as ez, type AggWebSocketCallbacks as f, isVenueInactive as f0, snapshotToOrderbook as f1, type VenueMarket as g, type VenueMarketOutcome as h, type Orderbook as i, TradeSide$1 as j, type AggClientOptions as k, type AggClientSessionInput as l, type AuthStatus as m, type SiwsMessageParams as n, type AggAuthVerifyBody as o, type AggAuthStartBody as p, type AggAuthStartResult as q, type AggLinkAccountBody as r, type AggLinkAccountResult as s, type AggLinkAccountWalletConfirmBody as t, type AggLinkAccountConfirmResult as u, type UpdateUserBody as v, type UserHolding as w, type OrderListQuery as x, type TradeExecutorOrderListResponse as y, type ExecutionOrderItem as z };
|
|
4479
|
+
export { type PaperTradingAppOptions as $, AggWebSocket as A, type ExecutionStatusQuery as B, type ChartBarsResponse as C, type ExecutionStatusResponse as D, type ExecutionOrdersQuery as E, type UserActivityQuery as F, type UserActivityItem as G, type LeaderboardRow as H, type LeaderboardSeriesQuery as I, type LeaderboardSeries as J, type ExecutionPositionsQuery as K, type LeaderboardQuery as L, MarketDataEngine as M, type ExecutionPositionGroup as N, type OrderbookState as O, type PaginatedResponse as P, type ManagedBalancesParams as Q, type UnifiedBalanceResponse as R, type SiweMessageParams as S, type TradeSplit as T, type UserProfile as U, Venue as V, type WsArbMarketUpdate as W, type UpsertVenueKey as X, type VenueKeySummary as Y, type VenueKeyStatus as Z, type CreatePaperTradingAccountParams as _, type AggWebSocketOptions as a, type WithdrawManagedResponse as a$, type PaperTradingAccount as a0, type PaperTradingAccountListParams as a1, type PaperTradingAccountsPage as a2, type SetPaperTradingBalanceParams as a3, type PaperTradingBalanceResponse as a4, type ResetPaperTradingAccountParams as a5, type PlacePaperTradingOrderParams as a6, type PaperTradingOrder as a7, type PaperTradingListParams as a8, type PaperTradingPositionsPage as a9, type SearchParams as aA, type SearchResponse as aB, type CorrelatedMarketsStatus as aC, type CorrelatedMarketSignalBatch as aD, type CorrelatedMarketQueryResult as aE, type CorrelatedMarketCascadeResponse as aF, type ResolveCorrelatedMarketsParams as aG, type ResolveCorrelatedMarketsResponse as aH, type ChartResolution as aI, type BatchOrderbooksResponse as aJ, type BatchMidpointsResponse as aK, type OutcomeOrderbookResponse as aL, type SmartRouteParams as aM, type SmartRouteResponse as aN, type ExecuteManagedParams as aO, type ExecuteManagedResponse as aP, type PlaceLimitOrderParams as aQ, type PlaceLimitOrderResponse as aR, type PlaceOrderParams as aS, type PlaceOrderResponse as aT, type RedeemRequest as aU, type RedeemResponse as aV, type BalanceRefillPolicy as aW, type CreateBalanceRefillPolicyParams as aX, type UpdateBalanceRefillPolicyParams as aY, type BalanceRefillAttempt as aZ, type WithdrawManagedParams as a_, type PaperTradingOrdersPage as aa, type PaperTradingPortfolio as ab, type CancelOrderSignature as ac, type CancelManagedExecutionResponse as ad, type CancelVenueOrderParams as ae, MatchStatus as af, MarketStatus as ag, type RecurrenceFilter as ah, type VenueEvent as ai, type EventBootstrapResponse as aj, type SportsLiveResponse as ak, type ListRecurringCryptoMarketsOptions as al, type RecurringCryptoMarketsResponse as am, type GetCryptoReferencePricesOptions as an, type CryptoReferencePricesResponse as ao, type Category as ap, type AppClientConfigResponse as aq, type VenueGeoPolicyResponse as ar, type RpcTokenResponse as as, type NewsFeedListResponse as at, type NewsFeedPageOptions as au, type NewsFeedArticleFeedResponse as av, type NewsFeedMarketFeedResponse as aw, type NewsFeedStatusResponse as ax, type NewsFeedMarketNewsParams as ay, type NewsFeedMarketNewsResponse as az, type ChartHistoryManifest as b, type DiagnosticEvent as b$, type WithdrawPreviewParams as b0, type WithdrawPreviewResponse as b1, type WithdrawalQuoteParams as b2, type WithdrawalQuoteResponse as b3, type SyncBalancesResponse as b4, type DepositAddressesResponse as b5, type GetPositionsParams as b6, type PositionGroup as b7, type RampQuoteRequest as b8, type RampQuote as b9, CONFIRMED_MATCH_STATUSES as bA, CandleBuilder as bB, type CandleInterval as bC, type CandleTail as bD, Chain as bE, type ChartBarsMeta as bF, type ChartVenueCandles as bG, type ComputeSplitsRequest as bH, type ComputeSplitsResponse as bI, type ComputeSplitsSelection as bJ, type CorrelatedMarketCascadeItem as bK, type CorrelatedMarketSide as bL, type CorrelatedMarketSignal as bM, type CorrelatedMarketSignalDirection as bN, type CreateApp as bO, type CryptoReferencePriceError as bP, type CryptoReferencePriceExternalMarketInput as bQ, type CryptoReferencePriceMarketInput as bR, type CryptoReferencePriceResult as bS, type CryptoReferencePriceSource as bT, type CryptoReferencePriceTarget as bU, type DepositAddressesPendingResponse as bV, type DepositAddressesReadyResponse as bW, type DepositAddressesSupportedChain as bX, type DepositAddressesToken as bY, type DepositStep as bZ, type DiagnosticCallback as b_, type RampSessionRequest as ba, type RampWidgetSession as bb, type Candle as bc, ACTIVE_VENUES as bd, type Account as be, AccountProvider as bf, AccountType as bg, type AggAuthDeliveryMode as bh, type AggAuthPrivyVerifyBody as bi, type AggAuthProviderType as bj, type AggAuthWalletVerifyBody as bk, type AggClientAuthOptions as bl, type AggSessionUser as bm, type AggregatedOrderbookLevel as bn, type AggregatedOrderbookResponse as bo, type App as bp, type AppTradingMode as bq, type AttributedOrderbook as br, type AttributedOrderbookLevel as bs, type AuthCodeResponse as bt, type AuthTokenResponse as bu, type AuthUser as bv, type BalanceCustody as bw, type BalanceRefillAttemptStatus as bx, type BalanceRefillPolicyStatus as by, type BookQuality as bz, type ChartCandle as c, type PersistedAuthSnapshot as c$, type ExecuteManagedRequest as c0, type ExecuteTradeRequest as c1, type ExecuteTradeResponse as c2, type ExecutionDagProgress as c3, type ExecutionDisplayGroupStatus as c4, type ExecutionDisplayStepKind as c5, type ExecutionMode as c6, type ExecutionOverallState as c7, type ExecutionStatusOrder as c8, type ExecutionStatusStep as c9, type NewsFeedLinkedMarket as cA, type NewsFeedMarketFeedArticle as cB, type NewsFeedMarketFeedItem as cC, type NewsFeedMarketNewsResult as cD, type NonceResponse as cE, type NovigExecutionMode as cF, OPTIONAL_SIGNATURE_TIMEOUT_MS as cG, type OrderListItem as cH, OrderStatus as cI, OrderType as cJ, type OrderbookBatchItemError as cK, type OrderbookBatchItemErrorCode as cL, type OrderbookBatchItemStatus as cM, type OrderbookHistoryPoint as cN, type OrderbookHistoryResponse as cO, type OrderbookLevel as cP, type OrderbookQuoteFill as cQ, type OrderbookQuoteParams as cR, type OrderbookQuoteResponse as cS, type OrderbookServiceUnavailableError as cT, type OrderbooksOnlyError as cU, type OutcomeMidpoint as cV, type OutcomeMidpointRow as cW, type PaperTradingBalanceAdjustment as cX, type PaperTradingLiquidityStatus as cY, type PaperTradingMarkSource as cZ, type PaperTradingPosition as c_, type GetBalanceQuery as ca, type GetBalanceResponse as cb, type GetHoldingsQuery as cc, type GetHoldingsResponse as cd, type GetOrdersParams as ce, type GetOrdersQuery as cf, type GetPositionsQuery as cg, type HelloResponse as ch, type HistoryRangeRequest as ci, INACTIVE_VENUES as cj, type LeaderboardMetric as ck, type LeaderboardSeriesPoint as cl, type LimitOrderTimeInForce as cm, type MarkSource as cn, type MarketPriceHistory as co, type MarketView as cp, type MarketViewBatch as cq, MatchType as cr, type MatchedMidpoint as cs, type MatchedMidpointOutcome as ct, type MatchedOrderbookMarket as cu, type MatchedVenueMarketOutcomeRef as cv, type MidpointItem as cw, type MidpointRow as cx, type NewsFeedArticleFeedItem as cy, type NewsFeedArticleWithSummary as cz, type AggWebSocketDiagnostics as d, type UserActivityUserOp as d$, type PositionRedeemStatus as d0, type PricePoint as d1, type PriceSource as d2, type PricesHistoryResponse as d3, type ProphetxExecutionMode as d4, RECURRENCE_CADENCES as d5, type RecurrenceCadence as d6, type RecurringCryptoComparisonPoint as d7, type RecurringCryptoComparisonPriceSource as d8, type RecurringCryptoDuration as d9, type SignatureRequest as dA, type SignatureRequestType as dB, type SignerFn as dC, type SimpleOrderbookLevel as dD, type SmartRouteAllocation as dE, type SmartRouteBridgeStep as dF, type SmartRouteFeeBreakdown as dG, type SmartRouteFill as dH, type SmartRouteSettlementLeg as dI, type SmartRouteSettlementPlan as dJ, type SmartRouteSetupCostLine as dK, type SmartRouteSide as dL, type SmartRouteStatus as dM, type SmartRouteVenueFill as dN, type SportsGameStatus as dO, type SportsLiveParticipant as dP, type SportsLiveState as dQ, TERMINAL_EXECUTION_STATES as dR, TimeInForce as dS, type TradeExecutorOrder as dT, type TradeStep as dU, type UserActivityBridge as dV, type UserActivityDeposit as dW, type UserActivityRedeem as dX, type UserActivityRedeemLeg as dY, type UserActivityTrade as dZ, type UserActivityType as d_, type RecurringCryptoDurationInput as da, type RecurringCryptoMarketMetrics as db, type RecurringCryptoOrderbookDepthLevel as dc, type RecurringCryptoOrderbookDepthSide as dd, type RecurringCryptoOutcome as de, type RecurringCryptoOutcomeOrderbookDepth as df, type RecurringCryptoPriceComparison as dg, type RecurringCryptoReferencePrice as dh, type RecurringCryptoResolution as di, type RecurringCryptoSourceConfidence as dj, type RecurringCryptoVenueMarket as dk, type RecurringCryptoWindowComparisons as dl, type RecurringCryptoWindowMarket as dm, type RedeemLegResult as dn, type RedeemLegStatus as dp, type RequestedOrderbookMarket as dq, type ResolvedCorrelatedMarketsResponse as dr, SELF_CUSTODY_FILL_TIMEOUT_MS as ds, SELF_CUSTODY_POLL_INTERVAL_MS as dt, type ServerWallet as du, type SettlementDiff as dv, type SettlementDifference as dw, type SettlementSource as dx, type SetupDepositAddressStep as dy, type SetupVenueKeyStep as dz, type WsArbFeedBatch as e, applyOrderbookDelta as e$, type UserActivityWithdrawal as e0, VENUES as e1, VENUE_CHAIN_IDS as e2, type ValidateBalanceOnClientStep as e3, type ValidateManagedParams as e4, type ValidateManagedRequest as e5, type ValidateManagedResponse as e6, type ValidateTradeRequest as e7, type ValidateTradeResponse as e8, type VenueEventListItem as e9, type WsAttributedLevel as eA, type WsAuthenticated as eB, type WsBalanceUpdate as eC, type WsCandleInterval as eD, type WsClientMessage as eE, type WsConnected as eF, type WsError as eG, type WsHeartbeat as eH, type WsMarkSource as eI, type WsMarketResolved as eJ, type WsOrderEvent as eK, type WsOrderEventType as eL, type WsOrderSubmitted as eM, type WsOrderbookDelta as eN, type WsOrderbookSnapshot as eO, type WsRedeemEvent as eP, type WsServerMessage as eQ, type WsSubscribed as eR, type WsTrade as eS, type WsUnsubscribed as eT, type WsVenueBook as eU, type WsVenueInfo as eV, type WsVenueLevel as eW, type WsWithdrawalLegStatus as eX, type WsWithdrawalLifecycleEvent as eY, type WsWithdrawalLifecycleLeg as eZ, type WsWithdrawalLifecycleStatus as e_, type VenueEventWithMarkets as ea, type VenueGeoPolicyEntry as eb, type VenueMarketListItem as ec, type VenueMarketRef as ed, type VenueOrderbookEntry as ee, type VenueOrderbookLevel as ef, type VenuePositionBalance as eg, type VenuePriceInfo as eh, type VenueSoloQuote as ei, type VerifyBody as ej, type VerifyResponse as ek, type WalletChainBalance as el, type WalletTokenBalance as em, type WithdrawManagedRequest as en, type WithdrawManagedSourceItem as eo, type WithdrawTokenSymbol as ep, type WithdrawalExpected as eq, type WithdrawalLeg as er, type WithdrawalLegStatus as es, type WithdrawalLegType as et, type WithdrawalLifecycleStatus as eu, type WithdrawalSource as ev, type WithdrawalSourceItem as ew, type WithdrawalSourceStatus as ex, type WithdrawalSourceTokenSymbol as ey, type WsArbFeedEntry as ez, type AggWebSocketCallbacks as f, computeChecksum as f0, getEffectiveDisabledVenues as f1, isVenueActive as f2, isVenueDataVisible as f3, isVenueInactive as f4, snapshotToOrderbook as f5, type VenueMarket as g, type VenueMarketOutcome as h, type Orderbook as i, TradeSide$1 as j, type AggClientOptions as k, type AggClientSessionInput as l, type AuthStatus as m, type SiwsMessageParams as n, type AggAuthVerifyBody as o, type AggAuthStartBody as p, type AggAuthStartResult as q, type AggLinkAccountBody as r, type AggLinkAccountResult as s, type AggLinkAccountWalletConfirmBody as t, type AggLinkAccountConfirmResult as u, type UpdateUserBody as v, type UserHolding as w, type OrderListQuery as x, type TradeExecutorOrderListResponse as y, type ExecutionOrderItem as z };
|
|
@@ -1905,6 +1905,16 @@ type SignerFn = (req: SignatureRequest) => Promise<string | {
|
|
|
1905
1905
|
declare const SELF_CUSTODY_FILL_TIMEOUT_MS: number;
|
|
1906
1906
|
/** Gap between re-reads while an on-chain step is in flight. */
|
|
1907
1907
|
declare const SELF_CUSTODY_POLL_INTERVAL_MS = 2000;
|
|
1908
|
+
/**
|
|
1909
|
+
* How long `fillSelfCustody` waits on the `signer` for ONE optional request
|
|
1910
|
+
* signed by a wallet other than the user's — e.g. a partner's activation
|
|
1911
|
+
* sponsor. Such a request can delay the batch's submission by at most this long,
|
|
1912
|
+
* after which it is declined and the required signatures go out without it.
|
|
1913
|
+
* Required requests, and optional ones the user's own wallet signs (the fill's
|
|
1914
|
+
* `signingAddress` or any required request's `signerAddress`, e.g. a referral
|
|
1915
|
+
* code), are never bounded by this.
|
|
1916
|
+
*/
|
|
1917
|
+
declare const OPTIONAL_SIGNATURE_TIMEOUT_MS = 15000;
|
|
1908
1918
|
/**
|
|
1909
1919
|
* States a run never leaves. Everything else means "still working".
|
|
1910
1920
|
*
|
|
@@ -2713,14 +2723,27 @@ interface PlaceOrderParams {
|
|
|
2713
2723
|
chainBalances?: Record<string, number>;
|
|
2714
2724
|
/** Per-trade app fee in bips (0..10000), replacing the app's configured rate. Needs an app API key. Buy only. */
|
|
2715
2725
|
appFeeBips?: number;
|
|
2726
|
+
/** Per-venue app fee in bips (each 0..10000), e.g. `{ polymarket: 20, hyperliquid: 10 }`. Wins over `appFeeBips` on the venues it names; `appFeeBips` still covers the rest. Needs an app API key. Buy only. */
|
|
2727
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
2716
2728
|
/** Referral: EVM address that receives the referral fee. Needs an app API key. */
|
|
2717
2729
|
referrer?: string;
|
|
2718
2730
|
/** Referral fee in bips of routed notional (1..10000). Snag-free. */
|
|
2719
2731
|
referrerFeeBips?: number;
|
|
2732
|
+
/** Per-venue referral fee in bips (each 0..10000; 0 = none on that venue). Wins over `referrerFeeBips` on the venues it names. Needs `referrer` and an app API key. Not for `skipQuote`. */
|
|
2733
|
+
referrerFeeBipsByVenue?: Record<string, number>;
|
|
2720
2734
|
/** Who funds the referral: "user" (default) reserves it from maxSpend; "app" pays from `referralPayerAddress` after the fill. */
|
|
2721
2735
|
referralPayer?: "user" | "app";
|
|
2722
2736
|
/** Required with `referralPayer: "app"`: the wallet that signs the parked payout transaction. */
|
|
2723
2737
|
referralPayerAddress?: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* User-paid referral only: a wallet that pays Hyperliquid's one-time 1 USDC
|
|
2740
|
+
* activation fee for a referrer with no HyperCore account (self-custody
|
|
2741
|
+
* Hyperliquid buys). Before the fill a pending signature with this
|
|
2742
|
+
* `signerAddress` and `purpose: "hl_activation_sponsor"` is passed to your
|
|
2743
|
+
* `signer`; it is `optional`, so declining it — or not answering within
|
|
2744
|
+
* `OPTIONAL_SIGNATURE_TIMEOUT_MS` — never costs the trade.
|
|
2745
|
+
*/
|
|
2746
|
+
referralActivationSponsorAddress?: string;
|
|
2724
2747
|
/**
|
|
2725
2748
|
* Skip the smart-route solver and send one order straight to `venue` (predict,
|
|
2726
2749
|
* hyperliquid, novig and prophetx only; others return 400). Requires a `read_write` `x-app-api-key`. No
|
|
@@ -3391,6 +3414,40 @@ interface LeaderboardRow {
|
|
|
3391
3414
|
/** Gross realized P&L in USD (sells + settlements, before fees). */
|
|
3392
3415
|
realizedPnl: number;
|
|
3393
3416
|
}
|
|
3417
|
+
/** Exactly one of `userId`, `externalId`, `username`, `walletAddress` is required. */
|
|
3418
|
+
interface LeaderboardSeriesQuery {
|
|
3419
|
+
/** Inclusive UTC calendar day, `YYYY-MM-DD`. Default: 29 days before `to`. */
|
|
3420
|
+
from?: string;
|
|
3421
|
+
/** Inclusive UTC calendar day, `YYYY-MM-DD`. Default and maximum: today. */
|
|
3422
|
+
to?: string;
|
|
3423
|
+
userId?: string;
|
|
3424
|
+
externalId?: string;
|
|
3425
|
+
/** Only when the app's `leaderboardIdentity` is `profile`. */
|
|
3426
|
+
username?: string;
|
|
3427
|
+
/** Not when the app's `leaderboardIdentity` is `anonymous`. */
|
|
3428
|
+
walletAddress?: string;
|
|
3429
|
+
}
|
|
3430
|
+
interface LeaderboardSeriesPoint {
|
|
3431
|
+
/** UTC calendar day, `YYYY-MM-DD`. */
|
|
3432
|
+
day: string;
|
|
3433
|
+
/** Filled orders on this day. */
|
|
3434
|
+
orders: number;
|
|
3435
|
+
/** USD notional of every filled order on this day, buys and sells. */
|
|
3436
|
+
volume: number;
|
|
3437
|
+
/** USD notional of filled buy orders only. */
|
|
3438
|
+
spent: number;
|
|
3439
|
+
/** Gross realized P&L in USD booked this day (sells + settlements, before fees). */
|
|
3440
|
+
realizedPnl: number;
|
|
3441
|
+
/** Running total of `realizedPnl` from `from` through this day. */
|
|
3442
|
+
cumulativeRealizedPnl: number;
|
|
3443
|
+
}
|
|
3444
|
+
interface LeaderboardSeries {
|
|
3445
|
+
userId: string;
|
|
3446
|
+
from: string;
|
|
3447
|
+
to: string;
|
|
3448
|
+
/** One point per day in `[from, to]`, oldest first; days without activity are 0. */
|
|
3449
|
+
points: LeaderboardSeriesPoint[];
|
|
3450
|
+
}
|
|
3394
3451
|
interface RampQuoteRequest {
|
|
3395
3452
|
sourceAmount: string;
|
|
3396
3453
|
sourceCurrencyCode: string;
|
|
@@ -3605,14 +3662,27 @@ interface SmartRouteParams {
|
|
|
3605
3662
|
deepEstimate?: boolean;
|
|
3606
3663
|
/** Per-trade app fee in bips (0..10000), replacing the app's configured rate. Needs an app API key. Buy only. */
|
|
3607
3664
|
appFeeBips?: number;
|
|
3665
|
+
/** Per-venue app fee in bips (each 0..10000), e.g. `{ polymarket: 20, hyperliquid: 10 }`. Wins over `appFeeBips` on the venues it names; `appFeeBips` still covers the rest. Needs an app API key. Buy only. */
|
|
3666
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
3608
3667
|
/** Referral: EVM address that receives the referral fee. Needs an app API key. */
|
|
3609
3668
|
referrer?: string;
|
|
3610
3669
|
/** Referral fee in bips of routed notional (1..10000). Snag-free. */
|
|
3611
3670
|
referrerFeeBips?: number;
|
|
3671
|
+
/** Per-venue referral fee in bips (each 0..10000; 0 = none on that venue). Wins over `referrerFeeBips` on the venues it names. Needs `referrer` and an app API key. Not for `skipQuote`. */
|
|
3672
|
+
referrerFeeBipsByVenue?: Record<string, number>;
|
|
3612
3673
|
/** Who funds the referral: "user" (default) reserves it from maxSpend; "app" pays from `referralPayerAddress` after the fill. */
|
|
3613
3674
|
referralPayer?: "user" | "app";
|
|
3614
3675
|
/** Required with `referralPayer: "app"`: the wallet that signs the parked payout transaction. */
|
|
3615
3676
|
referralPayerAddress?: string;
|
|
3677
|
+
/**
|
|
3678
|
+
* User-paid referral only: a wallet that pays Hyperliquid's one-time 1 USDC
|
|
3679
|
+
* activation fee for a referrer with no HyperCore account (self-custody
|
|
3680
|
+
* Hyperliquid buys). Before the fill a pending signature with this
|
|
3681
|
+
* `signerAddress` and `purpose: "hl_activation_sponsor"` is passed to your
|
|
3682
|
+
* `signer`; it is `optional`, so declining it — or not answering within
|
|
3683
|
+
* `OPTIONAL_SIGNATURE_TIMEOUT_MS` — never costs the trade.
|
|
3684
|
+
*/
|
|
3685
|
+
referralActivationSponsorAddress?: string;
|
|
3616
3686
|
}
|
|
3617
3687
|
/** One-time setup line item — populated only on deep-estimate quotes. */
|
|
3618
3688
|
interface SmartRouteSetupCostLine {
|
|
@@ -3669,14 +3739,18 @@ interface SmartRouteFeeBreakdown {
|
|
|
3669
3739
|
* Both `appFee` and `appFeeBips` are present iff `appFee > 0`.
|
|
3670
3740
|
*/
|
|
3671
3741
|
appFee?: number;
|
|
3672
|
-
/** The rate that produced `appFee` — the partner's configured bips, or the request's `appFeeBips`. */
|
|
3742
|
+
/** The rate that produced `appFee` — the partner's configured bips, or the request's `appFeeBips`. When the venues this route fills have different rates, the highest of them; see `appFeeBipsByVenue`. */
|
|
3673
3743
|
appFeeBips?: number;
|
|
3744
|
+
/** App fee rate per venue this route fills, in bips. Present only when those rates differ. */
|
|
3745
|
+
appFeeBipsByVenue?: Record<string, number>;
|
|
3674
3746
|
/** Category key the bips resolved against (e.g. "sports", "all" for the fallback, "override" for a per-request `appFeeBips`). */
|
|
3675
3747
|
appFeeCategory?: string;
|
|
3676
3748
|
/** The `executionGas` line when it is actually collected with the app fee. Present iff > 0; already inside `totalCost`. */
|
|
3677
3749
|
gasReimbursement?: number;
|
|
3678
3750
|
/** Referral fee the USER pays, in USD. Present iff > 0 and `referralPayer` is "user"; already inside `totalCostIncFees`. An app-paid referral never appears here. */
|
|
3679
3751
|
referralFee?: number;
|
|
3752
|
+
/** Referral fee rate per venue this route fills, in bips. Present with `referralFee`, only when those rates differ. */
|
|
3753
|
+
referralFeeBipsByVenue?: Record<string, number>;
|
|
3680
3754
|
}
|
|
3681
3755
|
/** Response from GET /orderbook/:venueMarketOutcomeId/route. */
|
|
3682
3756
|
interface SmartRouteSettlementLeg {
|
|
@@ -3781,16 +3855,24 @@ interface SmartRouteResponse {
|
|
|
3781
3855
|
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3782
3856
|
*/
|
|
3783
3857
|
appFee?: {
|
|
3858
|
+
/** The route rate: the highest among the venues this route fills. */
|
|
3784
3859
|
bips: number;
|
|
3785
3860
|
categoryKey: string;
|
|
3786
3861
|
quotedAppFeeRaw: string;
|
|
3862
|
+
/** Rate per venue this route fills. Present only when those rates differ. */
|
|
3863
|
+
bipsByVenue?: Record<string, number>;
|
|
3787
3864
|
} | null;
|
|
3788
3865
|
/** Referral snapshot; null/absent when no referrer was accepted. */
|
|
3789
3866
|
referral?: {
|
|
3790
3867
|
referrer: string;
|
|
3868
|
+
/** The highest rate among the venues this route fills. */
|
|
3791
3869
|
feeBips: number;
|
|
3870
|
+
/** Rate per venue this route fills. Present only when those rates differ. */
|
|
3871
|
+
feeBipsByVenue?: Record<string, number>;
|
|
3792
3872
|
payer: "user" | "app";
|
|
3793
3873
|
payerAddress?: string;
|
|
3874
|
+
/** Wallet sponsoring the referrer's HyperCore activation, when sent. */
|
|
3875
|
+
activationSponsorAddress?: string;
|
|
3794
3876
|
quotedFeeUsd: number;
|
|
3795
3877
|
} | null;
|
|
3796
3878
|
/** Populated only when status === "insufficient_position". */
|
|
@@ -4394,4 +4476,4 @@ declare class AggWebSocket {
|
|
|
4394
4476
|
private isOrderbookDebugEnabled;
|
|
4395
4477
|
}
|
|
4396
4478
|
|
|
4397
|
-
export { type PaperTradingAccountListParams as $, AggWebSocket as A, type ExecutionStatusQuery as B, type ChartBarsResponse as C, type ExecutionStatusResponse as D, type ExecutionOrdersQuery as E, type UserActivityQuery as F, type UserActivityItem as G, type LeaderboardRow as H, type ExecutionPositionsQuery as I, type ExecutionPositionGroup as J, type ManagedBalancesParams as K, type LeaderboardQuery as L, MarketDataEngine as M, type UnifiedBalanceResponse as N, type OrderbookState as O, type PaginatedResponse as P, type UpsertVenueKey as Q, type VenueKeySummary as R, type SiweMessageParams as S, type TradeSplit as T, type UserProfile as U, Venue as V, type WsArbMarketUpdate as W, type VenueKeyStatus as X, type CreatePaperTradingAccountParams as Y, type PaperTradingAppOptions as Z, type PaperTradingAccount as _, type AggWebSocketOptions as a, type WithdrawPreviewResponse as a$, type PaperTradingAccountsPage as a0, type SetPaperTradingBalanceParams as a1, type PaperTradingBalanceResponse as a2, type ResetPaperTradingAccountParams as a3, type PlacePaperTradingOrderParams as a4, type PaperTradingOrder as a5, type PaperTradingListParams as a6, type PaperTradingPositionsPage as a7, type PaperTradingOrdersPage as a8, type PaperTradingPortfolio as a9, type CorrelatedMarketsStatus as aA, type CorrelatedMarketSignalBatch as aB, type CorrelatedMarketQueryResult as aC, type CorrelatedMarketCascadeResponse as aD, type ResolveCorrelatedMarketsParams as aE, type ResolveCorrelatedMarketsResponse as aF, type ChartResolution as aG, type BatchOrderbooksResponse as aH, type BatchMidpointsResponse as aI, type OutcomeOrderbookResponse as aJ, type SmartRouteParams as aK, type SmartRouteResponse as aL, type ExecuteManagedParams as aM, type ExecuteManagedResponse as aN, type PlaceLimitOrderParams as aO, type PlaceLimitOrderResponse as aP, type PlaceOrderParams as aQ, type PlaceOrderResponse as aR, type RedeemRequest as aS, type RedeemResponse as aT, type BalanceRefillPolicy as aU, type CreateBalanceRefillPolicyParams as aV, type UpdateBalanceRefillPolicyParams as aW, type BalanceRefillAttempt as aX, type WithdrawManagedParams as aY, type WithdrawManagedResponse as aZ, type WithdrawPreviewParams as a_, type CancelOrderSignature as aa, type CancelManagedExecutionResponse as ab, type CancelVenueOrderParams as ac, MatchStatus as ad, MarketStatus as ae, type RecurrenceFilter as af, type VenueEvent as ag, type EventBootstrapResponse as ah, type SportsLiveResponse as ai, type ListRecurringCryptoMarketsOptions as aj, type RecurringCryptoMarketsResponse as ak, type GetCryptoReferencePricesOptions as al, type CryptoReferencePricesResponse as am, type Category as an, type AppClientConfigResponse as ao, type VenueGeoPolicyResponse as ap, type RpcTokenResponse as aq, type NewsFeedListResponse as ar, type NewsFeedPageOptions as as, type NewsFeedArticleFeedResponse as at, type NewsFeedMarketFeedResponse as au, type NewsFeedStatusResponse as av, type NewsFeedMarketNewsParams as aw, type NewsFeedMarketNewsResponse as ax, type SearchParams as ay, type SearchResponse as az, type ChartHistoryManifest as b, type ExecuteTradeRequest as b$, type WithdrawalQuoteParams as b0, type WithdrawalQuoteResponse as b1, type SyncBalancesResponse as b2, type DepositAddressesResponse as b3, type GetPositionsParams as b4, type PositionGroup as b5, type RampQuoteRequest as b6, type RampQuote as b7, type RampSessionRequest as b8, type RampWidgetSession as b9, type CandleInterval as bA, type CandleTail as bB, Chain as bC, type ChartBarsMeta as bD, type ChartVenueCandles as bE, type ComputeSplitsRequest as bF, type ComputeSplitsResponse as bG, type ComputeSplitsSelection as bH, type CorrelatedMarketCascadeItem as bI, type CorrelatedMarketSide as bJ, type CorrelatedMarketSignal as bK, type CorrelatedMarketSignalDirection as bL, type CreateApp as bM, type CryptoReferencePriceError as bN, type CryptoReferencePriceExternalMarketInput as bO, type CryptoReferencePriceMarketInput as bP, type CryptoReferencePriceResult as bQ, type CryptoReferencePriceSource as bR, type CryptoReferencePriceTarget as bS, type DepositAddressesPendingResponse as bT, type DepositAddressesReadyResponse as bU, type DepositAddressesSupportedChain as bV, type DepositAddressesToken as bW, type DepositStep as bX, type DiagnosticCallback as bY, type DiagnosticEvent as bZ, type ExecuteManagedRequest as b_, type Candle as ba, ACTIVE_VENUES as bb, type Account as bc, AccountProvider as bd, AccountType as be, type AggAuthDeliveryMode as bf, type AggAuthPrivyVerifyBody as bg, type AggAuthProviderType as bh, type AggAuthWalletVerifyBody as bi, type AggClientAuthOptions as bj, type AggSessionUser as bk, type AggregatedOrderbookLevel as bl, type AggregatedOrderbookResponse as bm, type App as bn, type AppTradingMode as bo, type AttributedOrderbook as bp, type AttributedOrderbookLevel as bq, type AuthCodeResponse as br, type AuthTokenResponse as bs, type AuthUser as bt, type BalanceCustody as bu, type BalanceRefillAttemptStatus as bv, type BalanceRefillPolicyStatus as bw, type BookQuality as bx, CONFIRMED_MATCH_STATUSES as by, CandleBuilder as bz, type ChartCandle as c, type PricesHistoryResponse as c$, type ExecuteTradeResponse as c0, type ExecutionDagProgress as c1, type ExecutionDisplayGroupStatus as c2, type ExecutionDisplayStepKind as c3, type ExecutionMode as c4, type ExecutionOverallState as c5, type ExecutionStatusOrder as c6, type ExecutionStatusStep as c7, type GetBalanceQuery as c8, type GetBalanceResponse as c9, type NewsFeedMarketNewsResult as cA, type NonceResponse as cB, type NovigExecutionMode as cC, type OrderListItem as cD, OrderStatus as cE, OrderType as cF, type OrderbookBatchItemError as cG, type OrderbookBatchItemErrorCode as cH, type OrderbookBatchItemStatus as cI, type OrderbookHistoryPoint as cJ, type OrderbookHistoryResponse as cK, type OrderbookLevel as cL, type OrderbookQuoteFill as cM, type OrderbookQuoteParams as cN, type OrderbookQuoteResponse as cO, type OrderbookServiceUnavailableError as cP, type OrderbooksOnlyError as cQ, type OutcomeMidpoint as cR, type OutcomeMidpointRow as cS, type PaperTradingBalanceAdjustment as cT, type PaperTradingLiquidityStatus as cU, type PaperTradingMarkSource as cV, type PaperTradingPosition as cW, type PersistedAuthSnapshot as cX, type PositionRedeemStatus as cY, type PricePoint as cZ, type PriceSource as c_, type GetHoldingsQuery as ca, type GetHoldingsResponse as cb, type GetOrdersParams as cc, type GetOrdersQuery as cd, type GetPositionsQuery as ce, type HelloResponse as cf, type HistoryRangeRequest as cg, INACTIVE_VENUES as ch, type LeaderboardMetric as ci, type LimitOrderTimeInForce as cj, type MarkSource as ck, type MarketPriceHistory as cl, type MarketView as cm, type MarketViewBatch as cn, MatchType as co, type MatchedMidpoint as cp, type MatchedMidpointOutcome as cq, type MatchedOrderbookMarket as cr, type MatchedVenueMarketOutcomeRef as cs, type MidpointItem as ct, type MidpointRow as cu, type NewsFeedArticleFeedItem as cv, type NewsFeedArticleWithSummary as cw, type NewsFeedLinkedMarket as cx, type NewsFeedMarketFeedArticle as cy, type NewsFeedMarketFeedItem as cz, type AggWebSocketDiagnostics as d, type ValidateBalanceOnClientStep as d$, type ProphetxExecutionMode as d0, RECURRENCE_CADENCES as d1, type RecurrenceCadence as d2, type RecurringCryptoComparisonPoint as d3, type RecurringCryptoComparisonPriceSource as d4, type RecurringCryptoDuration as d5, type RecurringCryptoDurationInput as d6, type RecurringCryptoMarketMetrics as d7, type RecurringCryptoOrderbookDepthLevel as d8, type RecurringCryptoOrderbookDepthSide as d9, type SmartRouteAllocation as dA, type SmartRouteBridgeStep as dB, type SmartRouteFeeBreakdown as dC, type SmartRouteFill as dD, type SmartRouteSettlementLeg as dE, type SmartRouteSettlementPlan as dF, type SmartRouteSetupCostLine as dG, type SmartRouteSide as dH, type SmartRouteStatus as dI, type SmartRouteVenueFill as dJ, type SportsGameStatus as dK, type SportsLiveParticipant as dL, type SportsLiveState as dM, TERMINAL_EXECUTION_STATES as dN, TimeInForce as dO, type TradeExecutorOrder as dP, type TradeStep as dQ, type UserActivityBridge as dR, type UserActivityDeposit as dS, type UserActivityRedeem as dT, type UserActivityRedeemLeg as dU, type UserActivityTrade as dV, type UserActivityType as dW, type UserActivityUserOp as dX, type UserActivityWithdrawal as dY, VENUES as dZ, VENUE_CHAIN_IDS as d_, type RecurringCryptoOutcome as da, type RecurringCryptoOutcomeOrderbookDepth as db, type RecurringCryptoPriceComparison as dc, type RecurringCryptoReferencePrice as dd, type RecurringCryptoResolution as de, type RecurringCryptoSourceConfidence as df, type RecurringCryptoVenueMarket as dg, type RecurringCryptoWindowComparisons as dh, type RecurringCryptoWindowMarket as di, type RedeemLegResult as dj, type RedeemLegStatus as dk, type RequestedOrderbookMarket as dl, type ResolvedCorrelatedMarketsResponse as dm, SELF_CUSTODY_FILL_TIMEOUT_MS as dn, SELF_CUSTODY_POLL_INTERVAL_MS as dp, type ServerWallet as dq, type SettlementDiff as dr, type SettlementDifference as ds, type SettlementSource as dt, type SetupDepositAddressStep as du, type SetupVenueKeyStep as dv, type SignatureRequest as dw, type SignatureRequestType as dx, type SignerFn as dy, type SimpleOrderbookLevel as dz, type WsArbFeedBatch as e, isVenueDataVisible as e$, type ValidateManagedParams as e0, type ValidateManagedRequest as e1, type ValidateManagedResponse as e2, type ValidateTradeRequest as e3, type ValidateTradeResponse as e4, type VenueEventListItem as e5, type VenueEventWithMarkets as e6, type VenueGeoPolicyEntry as e7, type VenueMarketListItem as e8, type VenueMarketRef as e9, type WsClientMessage as eA, type WsConnected as eB, type WsError as eC, type WsHeartbeat as eD, type WsMarkSource as eE, type WsMarketResolved as eF, type WsOrderEvent as eG, type WsOrderEventType as eH, type WsOrderSubmitted as eI, type WsOrderbookDelta as eJ, type WsOrderbookSnapshot as eK, type WsRedeemEvent as eL, type WsServerMessage as eM, type WsSubscribed as eN, type WsTrade as eO, type WsUnsubscribed as eP, type WsVenueBook as eQ, type WsVenueInfo as eR, type WsVenueLevel as eS, type WsWithdrawalLegStatus as eT, type WsWithdrawalLifecycleEvent as eU, type WsWithdrawalLifecycleLeg as eV, type WsWithdrawalLifecycleStatus as eW, applyOrderbookDelta as eX, computeChecksum as eY, getEffectiveDisabledVenues as eZ, isVenueActive as e_, type VenueOrderbookEntry as ea, type VenueOrderbookLevel as eb, type VenuePositionBalance as ec, type VenuePriceInfo as ed, type VenueSoloQuote as ee, type VerifyBody as ef, type VerifyResponse as eg, type WalletChainBalance as eh, type WalletTokenBalance as ei, type WithdrawManagedRequest as ej, type WithdrawManagedSourceItem as ek, type WithdrawTokenSymbol as el, type WithdrawalExpected as em, type WithdrawalLeg as en, type WithdrawalLegStatus as eo, type WithdrawalLegType as ep, type WithdrawalLifecycleStatus as eq, type WithdrawalSource as er, type WithdrawalSourceItem as es, type WithdrawalSourceStatus as et, type WithdrawalSourceTokenSymbol as eu, type WsArbFeedEntry as ev, type WsAttributedLevel as ew, type WsAuthenticated as ex, type WsBalanceUpdate as ey, type WsCandleInterval as ez, type AggWebSocketCallbacks as f, isVenueInactive as f0, snapshotToOrderbook as f1, type VenueMarket as g, type VenueMarketOutcome as h, type Orderbook as i, TradeSide$1 as j, type AggClientOptions as k, type AggClientSessionInput as l, type AuthStatus as m, type SiwsMessageParams as n, type AggAuthVerifyBody as o, type AggAuthStartBody as p, type AggAuthStartResult as q, type AggLinkAccountBody as r, type AggLinkAccountResult as s, type AggLinkAccountWalletConfirmBody as t, type AggLinkAccountConfirmResult as u, type UpdateUserBody as v, type UserHolding as w, type OrderListQuery as x, type TradeExecutorOrderListResponse as y, type ExecutionOrderItem as z };
|
|
4479
|
+
export { type PaperTradingAppOptions as $, AggWebSocket as A, type ExecutionStatusQuery as B, type ChartBarsResponse as C, type ExecutionStatusResponse as D, type ExecutionOrdersQuery as E, type UserActivityQuery as F, type UserActivityItem as G, type LeaderboardRow as H, type LeaderboardSeriesQuery as I, type LeaderboardSeries as J, type ExecutionPositionsQuery as K, type LeaderboardQuery as L, MarketDataEngine as M, type ExecutionPositionGroup as N, type OrderbookState as O, type PaginatedResponse as P, type ManagedBalancesParams as Q, type UnifiedBalanceResponse as R, type SiweMessageParams as S, type TradeSplit as T, type UserProfile as U, Venue as V, type WsArbMarketUpdate as W, type UpsertVenueKey as X, type VenueKeySummary as Y, type VenueKeyStatus as Z, type CreatePaperTradingAccountParams as _, type AggWebSocketOptions as a, type WithdrawManagedResponse as a$, type PaperTradingAccount as a0, type PaperTradingAccountListParams as a1, type PaperTradingAccountsPage as a2, type SetPaperTradingBalanceParams as a3, type PaperTradingBalanceResponse as a4, type ResetPaperTradingAccountParams as a5, type PlacePaperTradingOrderParams as a6, type PaperTradingOrder as a7, type PaperTradingListParams as a8, type PaperTradingPositionsPage as a9, type SearchParams as aA, type SearchResponse as aB, type CorrelatedMarketsStatus as aC, type CorrelatedMarketSignalBatch as aD, type CorrelatedMarketQueryResult as aE, type CorrelatedMarketCascadeResponse as aF, type ResolveCorrelatedMarketsParams as aG, type ResolveCorrelatedMarketsResponse as aH, type ChartResolution as aI, type BatchOrderbooksResponse as aJ, type BatchMidpointsResponse as aK, type OutcomeOrderbookResponse as aL, type SmartRouteParams as aM, type SmartRouteResponse as aN, type ExecuteManagedParams as aO, type ExecuteManagedResponse as aP, type PlaceLimitOrderParams as aQ, type PlaceLimitOrderResponse as aR, type PlaceOrderParams as aS, type PlaceOrderResponse as aT, type RedeemRequest as aU, type RedeemResponse as aV, type BalanceRefillPolicy as aW, type CreateBalanceRefillPolicyParams as aX, type UpdateBalanceRefillPolicyParams as aY, type BalanceRefillAttempt as aZ, type WithdrawManagedParams as a_, type PaperTradingOrdersPage as aa, type PaperTradingPortfolio as ab, type CancelOrderSignature as ac, type CancelManagedExecutionResponse as ad, type CancelVenueOrderParams as ae, MatchStatus as af, MarketStatus as ag, type RecurrenceFilter as ah, type VenueEvent as ai, type EventBootstrapResponse as aj, type SportsLiveResponse as ak, type ListRecurringCryptoMarketsOptions as al, type RecurringCryptoMarketsResponse as am, type GetCryptoReferencePricesOptions as an, type CryptoReferencePricesResponse as ao, type Category as ap, type AppClientConfigResponse as aq, type VenueGeoPolicyResponse as ar, type RpcTokenResponse as as, type NewsFeedListResponse as at, type NewsFeedPageOptions as au, type NewsFeedArticleFeedResponse as av, type NewsFeedMarketFeedResponse as aw, type NewsFeedStatusResponse as ax, type NewsFeedMarketNewsParams as ay, type NewsFeedMarketNewsResponse as az, type ChartHistoryManifest as b, type DiagnosticEvent as b$, type WithdrawPreviewParams as b0, type WithdrawPreviewResponse as b1, type WithdrawalQuoteParams as b2, type WithdrawalQuoteResponse as b3, type SyncBalancesResponse as b4, type DepositAddressesResponse as b5, type GetPositionsParams as b6, type PositionGroup as b7, type RampQuoteRequest as b8, type RampQuote as b9, CONFIRMED_MATCH_STATUSES as bA, CandleBuilder as bB, type CandleInterval as bC, type CandleTail as bD, Chain as bE, type ChartBarsMeta as bF, type ChartVenueCandles as bG, type ComputeSplitsRequest as bH, type ComputeSplitsResponse as bI, type ComputeSplitsSelection as bJ, type CorrelatedMarketCascadeItem as bK, type CorrelatedMarketSide as bL, type CorrelatedMarketSignal as bM, type CorrelatedMarketSignalDirection as bN, type CreateApp as bO, type CryptoReferencePriceError as bP, type CryptoReferencePriceExternalMarketInput as bQ, type CryptoReferencePriceMarketInput as bR, type CryptoReferencePriceResult as bS, type CryptoReferencePriceSource as bT, type CryptoReferencePriceTarget as bU, type DepositAddressesPendingResponse as bV, type DepositAddressesReadyResponse as bW, type DepositAddressesSupportedChain as bX, type DepositAddressesToken as bY, type DepositStep as bZ, type DiagnosticCallback as b_, type RampSessionRequest as ba, type RampWidgetSession as bb, type Candle as bc, ACTIVE_VENUES as bd, type Account as be, AccountProvider as bf, AccountType as bg, type AggAuthDeliveryMode as bh, type AggAuthPrivyVerifyBody as bi, type AggAuthProviderType as bj, type AggAuthWalletVerifyBody as bk, type AggClientAuthOptions as bl, type AggSessionUser as bm, type AggregatedOrderbookLevel as bn, type AggregatedOrderbookResponse as bo, type App as bp, type AppTradingMode as bq, type AttributedOrderbook as br, type AttributedOrderbookLevel as bs, type AuthCodeResponse as bt, type AuthTokenResponse as bu, type AuthUser as bv, type BalanceCustody as bw, type BalanceRefillAttemptStatus as bx, type BalanceRefillPolicyStatus as by, type BookQuality as bz, type ChartCandle as c, type PersistedAuthSnapshot as c$, type ExecuteManagedRequest as c0, type ExecuteTradeRequest as c1, type ExecuteTradeResponse as c2, type ExecutionDagProgress as c3, type ExecutionDisplayGroupStatus as c4, type ExecutionDisplayStepKind as c5, type ExecutionMode as c6, type ExecutionOverallState as c7, type ExecutionStatusOrder as c8, type ExecutionStatusStep as c9, type NewsFeedLinkedMarket as cA, type NewsFeedMarketFeedArticle as cB, type NewsFeedMarketFeedItem as cC, type NewsFeedMarketNewsResult as cD, type NonceResponse as cE, type NovigExecutionMode as cF, OPTIONAL_SIGNATURE_TIMEOUT_MS as cG, type OrderListItem as cH, OrderStatus as cI, OrderType as cJ, type OrderbookBatchItemError as cK, type OrderbookBatchItemErrorCode as cL, type OrderbookBatchItemStatus as cM, type OrderbookHistoryPoint as cN, type OrderbookHistoryResponse as cO, type OrderbookLevel as cP, type OrderbookQuoteFill as cQ, type OrderbookQuoteParams as cR, type OrderbookQuoteResponse as cS, type OrderbookServiceUnavailableError as cT, type OrderbooksOnlyError as cU, type OutcomeMidpoint as cV, type OutcomeMidpointRow as cW, type PaperTradingBalanceAdjustment as cX, type PaperTradingLiquidityStatus as cY, type PaperTradingMarkSource as cZ, type PaperTradingPosition as c_, type GetBalanceQuery as ca, type GetBalanceResponse as cb, type GetHoldingsQuery as cc, type GetHoldingsResponse as cd, type GetOrdersParams as ce, type GetOrdersQuery as cf, type GetPositionsQuery as cg, type HelloResponse as ch, type HistoryRangeRequest as ci, INACTIVE_VENUES as cj, type LeaderboardMetric as ck, type LeaderboardSeriesPoint as cl, type LimitOrderTimeInForce as cm, type MarkSource as cn, type MarketPriceHistory as co, type MarketView as cp, type MarketViewBatch as cq, MatchType as cr, type MatchedMidpoint as cs, type MatchedMidpointOutcome as ct, type MatchedOrderbookMarket as cu, type MatchedVenueMarketOutcomeRef as cv, type MidpointItem as cw, type MidpointRow as cx, type NewsFeedArticleFeedItem as cy, type NewsFeedArticleWithSummary as cz, type AggWebSocketDiagnostics as d, type UserActivityUserOp as d$, type PositionRedeemStatus as d0, type PricePoint as d1, type PriceSource as d2, type PricesHistoryResponse as d3, type ProphetxExecutionMode as d4, RECURRENCE_CADENCES as d5, type RecurrenceCadence as d6, type RecurringCryptoComparisonPoint as d7, type RecurringCryptoComparisonPriceSource as d8, type RecurringCryptoDuration as d9, type SignatureRequest as dA, type SignatureRequestType as dB, type SignerFn as dC, type SimpleOrderbookLevel as dD, type SmartRouteAllocation as dE, type SmartRouteBridgeStep as dF, type SmartRouteFeeBreakdown as dG, type SmartRouteFill as dH, type SmartRouteSettlementLeg as dI, type SmartRouteSettlementPlan as dJ, type SmartRouteSetupCostLine as dK, type SmartRouteSide as dL, type SmartRouteStatus as dM, type SmartRouteVenueFill as dN, type SportsGameStatus as dO, type SportsLiveParticipant as dP, type SportsLiveState as dQ, TERMINAL_EXECUTION_STATES as dR, TimeInForce as dS, type TradeExecutorOrder as dT, type TradeStep as dU, type UserActivityBridge as dV, type UserActivityDeposit as dW, type UserActivityRedeem as dX, type UserActivityRedeemLeg as dY, type UserActivityTrade as dZ, type UserActivityType as d_, type RecurringCryptoDurationInput as da, type RecurringCryptoMarketMetrics as db, type RecurringCryptoOrderbookDepthLevel as dc, type RecurringCryptoOrderbookDepthSide as dd, type RecurringCryptoOutcome as de, type RecurringCryptoOutcomeOrderbookDepth as df, type RecurringCryptoPriceComparison as dg, type RecurringCryptoReferencePrice as dh, type RecurringCryptoResolution as di, type RecurringCryptoSourceConfidence as dj, type RecurringCryptoVenueMarket as dk, type RecurringCryptoWindowComparisons as dl, type RecurringCryptoWindowMarket as dm, type RedeemLegResult as dn, type RedeemLegStatus as dp, type RequestedOrderbookMarket as dq, type ResolvedCorrelatedMarketsResponse as dr, SELF_CUSTODY_FILL_TIMEOUT_MS as ds, SELF_CUSTODY_POLL_INTERVAL_MS as dt, type ServerWallet as du, type SettlementDiff as dv, type SettlementDifference as dw, type SettlementSource as dx, type SetupDepositAddressStep as dy, type SetupVenueKeyStep as dz, type WsArbFeedBatch as e, applyOrderbookDelta as e$, type UserActivityWithdrawal as e0, VENUES as e1, VENUE_CHAIN_IDS as e2, type ValidateBalanceOnClientStep as e3, type ValidateManagedParams as e4, type ValidateManagedRequest as e5, type ValidateManagedResponse as e6, type ValidateTradeRequest as e7, type ValidateTradeResponse as e8, type VenueEventListItem as e9, type WsAttributedLevel as eA, type WsAuthenticated as eB, type WsBalanceUpdate as eC, type WsCandleInterval as eD, type WsClientMessage as eE, type WsConnected as eF, type WsError as eG, type WsHeartbeat as eH, type WsMarkSource as eI, type WsMarketResolved as eJ, type WsOrderEvent as eK, type WsOrderEventType as eL, type WsOrderSubmitted as eM, type WsOrderbookDelta as eN, type WsOrderbookSnapshot as eO, type WsRedeemEvent as eP, type WsServerMessage as eQ, type WsSubscribed as eR, type WsTrade as eS, type WsUnsubscribed as eT, type WsVenueBook as eU, type WsVenueInfo as eV, type WsVenueLevel as eW, type WsWithdrawalLegStatus as eX, type WsWithdrawalLifecycleEvent as eY, type WsWithdrawalLifecycleLeg as eZ, type WsWithdrawalLifecycleStatus as e_, type VenueEventWithMarkets as ea, type VenueGeoPolicyEntry as eb, type VenueMarketListItem as ec, type VenueMarketRef as ed, type VenueOrderbookEntry as ee, type VenueOrderbookLevel as ef, type VenuePositionBalance as eg, type VenuePriceInfo as eh, type VenueSoloQuote as ei, type VerifyBody as ej, type VerifyResponse as ek, type WalletChainBalance as el, type WalletTokenBalance as em, type WithdrawManagedRequest as en, type WithdrawManagedSourceItem as eo, type WithdrawTokenSymbol as ep, type WithdrawalExpected as eq, type WithdrawalLeg as er, type WithdrawalLegStatus as es, type WithdrawalLegType as et, type WithdrawalLifecycleStatus as eu, type WithdrawalSource as ev, type WithdrawalSourceItem as ew, type WithdrawalSourceStatus as ex, type WithdrawalSourceTokenSymbol as ey, type WsArbFeedEntry as ez, type AggWebSocketCallbacks as f, computeChecksum as f0, getEffectiveDisabledVenues as f1, isVenueActive as f2, isVenueDataVisible as f3, isVenueInactive as f4, snapshotToOrderbook as f5, type VenueMarket as g, type VenueMarketOutcome as h, type Orderbook as i, TradeSide$1 as j, type AggClientOptions as k, type AggClientSessionInput as l, type AuthStatus as m, type SiwsMessageParams as n, type AggAuthVerifyBody as o, type AggAuthStartBody as p, type AggAuthStartResult as q, type AggLinkAccountBody as r, type AggLinkAccountResult as s, type AggLinkAccountWalletConfirmBody as t, type AggLinkAccountConfirmResult as u, type UpdateUserBody as v, type UserHolding as w, type OrderListQuery as x, type TradeExecutorOrderListResponse as y, type ExecutionOrderItem as z };
|
package/dist/browser.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AggWebSocket, a as AggWebSocketOptions, C as ChartBarsResponse, b as ChartHistoryManifest, c as ChartCandle, d as AggWebSocketDiagnostics, M as MarketDataEngine, O as OrderbookState, W as WsArbMarketUpdate, e as WsArbFeedBatch, f as AggWebSocketCallbacks } from './agg-websocket-
|
|
1
|
+
import { A as AggWebSocket, a as AggWebSocketOptions, C as ChartBarsResponse, b as ChartHistoryManifest, c as ChartCandle, d as AggWebSocketDiagnostics, M as MarketDataEngine, O as OrderbookState, W as WsArbMarketUpdate, e as WsArbFeedBatch, f as AggWebSocketCallbacks } from './agg-websocket-Bxt9PzTz.mjs';
|
|
2
2
|
|
|
3
3
|
/** The application owns the native module Worker URL so its static bundler fingerprints it. */
|
|
4
4
|
type MarketDataWorkerFactory = () => Worker;
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AggWebSocket, a as AggWebSocketOptions, C as ChartBarsResponse, b as ChartHistoryManifest, c as ChartCandle, d as AggWebSocketDiagnostics, M as MarketDataEngine, O as OrderbookState, W as WsArbMarketUpdate, e as WsArbFeedBatch, f as AggWebSocketCallbacks } from './agg-websocket-
|
|
1
|
+
import { A as AggWebSocket, a as AggWebSocketOptions, C as ChartBarsResponse, b as ChartHistoryManifest, c as ChartCandle, d as AggWebSocketDiagnostics, M as MarketDataEngine, O as OrderbookState, W as WsArbMarketUpdate, e as WsArbFeedBatch, f as AggWebSocketCallbacks } from './agg-websocket-Bxt9PzTz.js';
|
|
2
2
|
|
|
3
3
|
/** The application owns the native module Worker URL so its static bundler fingerprints it. */
|
|
4
4
|
type MarketDataWorkerFactory = () => Worker;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as Venue, U as UserProfile, T as TradeSplit, g as VenueMarket, h as VenueMarketOutcome, i as Orderbook, j as TradeSide, k as AggClientOptions, l as AggClientSessionInput, m as AuthStatus, S as SiweMessageParams, n as SiwsMessageParams, o as AggAuthVerifyBody, p as AggAuthStartBody, q as AggAuthStartResult, r as AggLinkAccountBody, s as AggLinkAccountResult, t as AggLinkAccountWalletConfirmBody, u as AggLinkAccountConfirmResult, v as UpdateUserBody, P as PaginatedResponse, w as UserHolding, x as OrderListQuery, y as TradeExecutorOrderListResponse, E as ExecutionOrdersQuery, z as ExecutionOrderItem, B as ExecutionStatusQuery, D as ExecutionStatusResponse, F as UserActivityQuery, G as UserActivityItem, L as LeaderboardQuery, H as LeaderboardRow, I as
|
|
2
|
-
export {
|
|
1
|
+
import { V as Venue, U as UserProfile, T as TradeSplit, g as VenueMarket, h as VenueMarketOutcome, i as Orderbook, j as TradeSide, k as AggClientOptions, l as AggClientSessionInput, m as AuthStatus, S as SiweMessageParams, n as SiwsMessageParams, o as AggAuthVerifyBody, p as AggAuthStartBody, q as AggAuthStartResult, r as AggLinkAccountBody, s as AggLinkAccountResult, t as AggLinkAccountWalletConfirmBody, u as AggLinkAccountConfirmResult, v as UpdateUserBody, P as PaginatedResponse, w as UserHolding, x as OrderListQuery, y as TradeExecutorOrderListResponse, E as ExecutionOrdersQuery, z as ExecutionOrderItem, B as ExecutionStatusQuery, D as ExecutionStatusResponse, F as UserActivityQuery, G as UserActivityItem, L as LeaderboardQuery, H as LeaderboardRow, I as LeaderboardSeriesQuery, J as LeaderboardSeries, K as ExecutionPositionsQuery, N as ExecutionPositionGroup, Q as ManagedBalancesParams, R as UnifiedBalanceResponse, X as UpsertVenueKey, Y as VenueKeySummary, Z as VenueKeyStatus, _ as CreatePaperTradingAccountParams, $ as PaperTradingAppOptions, a0 as PaperTradingAccount, a1 as PaperTradingAccountListParams, a2 as PaperTradingAccountsPage, a3 as SetPaperTradingBalanceParams, a4 as PaperTradingBalanceResponse, a5 as ResetPaperTradingAccountParams, a6 as PlacePaperTradingOrderParams, a7 as PaperTradingOrder, a8 as PaperTradingListParams, a9 as PaperTradingPositionsPage, aa as PaperTradingOrdersPage, ab as PaperTradingPortfolio, ac as CancelOrderSignature, ad as CancelManagedExecutionResponse, ae as CancelVenueOrderParams, af as MatchStatus, ag as MarketStatus, ah as RecurrenceFilter, ai as VenueEvent, aj as EventBootstrapResponse, ak as SportsLiveResponse, al as ListRecurringCryptoMarketsOptions, am as RecurringCryptoMarketsResponse, an as GetCryptoReferencePricesOptions, ao as CryptoReferencePricesResponse, ap as Category, aq as AppClientConfigResponse, ar as VenueGeoPolicyResponse, as as RpcTokenResponse, at as NewsFeedListResponse, au as NewsFeedPageOptions, av as NewsFeedArticleFeedResponse, aw as NewsFeedMarketFeedResponse, ax as NewsFeedStatusResponse, ay as NewsFeedMarketNewsParams, az as NewsFeedMarketNewsResponse, aA as SearchParams, aB as SearchResponse, aC as CorrelatedMarketsStatus, aD as CorrelatedMarketSignalBatch, aE as CorrelatedMarketQueryResult, aF as CorrelatedMarketCascadeResponse, aG as ResolveCorrelatedMarketsParams, aH as ResolveCorrelatedMarketsResponse, aI as ChartResolution, C as ChartBarsResponse, b as ChartHistoryManifest, aJ as BatchOrderbooksResponse, aK as BatchMidpointsResponse, aL as OutcomeOrderbookResponse, aM as SmartRouteParams, aN as SmartRouteResponse, f as AggWebSocketCallbacks, A as AggWebSocket, aO as ExecuteManagedParams, aP as ExecuteManagedResponse, aQ as PlaceLimitOrderParams, aR as PlaceLimitOrderResponse, aS as PlaceOrderParams, aT as PlaceOrderResponse, aU as RedeemRequest, aV as RedeemResponse, aW as BalanceRefillPolicy, aX as CreateBalanceRefillPolicyParams, aY as UpdateBalanceRefillPolicyParams, aZ as BalanceRefillAttempt, a_ as WithdrawManagedParams, a$ as WithdrawManagedResponse, b0 as WithdrawPreviewParams, b1 as WithdrawPreviewResponse, b2 as WithdrawalQuoteParams, b3 as WithdrawalQuoteResponse, b4 as SyncBalancesResponse, b5 as DepositAddressesResponse, b6 as GetPositionsParams, b7 as PositionGroup, b8 as RampQuoteRequest, b9 as RampQuote, ba as RampSessionRequest, bb as RampWidgetSession, bc as Candle, c as ChartCandle } from './agg-websocket-Bxt9PzTz.mjs';
|
|
2
|
+
export { bd as ACTIVE_VENUES, be as Account, bf as AccountProvider, bg as AccountType, bh as AggAuthDeliveryMode, bi as AggAuthPrivyVerifyBody, bj as AggAuthProviderType, bk as AggAuthWalletVerifyBody, bl as AggClientAuthOptions, bm as AggSessionUser, d as AggWebSocketDiagnostics, a as AggWebSocketOptions, bn as AggregatedOrderbookLevel, bo as AggregatedOrderbookResponse, bp as App, bq as AppTradingMode, br as AttributedOrderbook, bs as AttributedOrderbookLevel, bt as AuthCodeResponse, bu as AuthTokenResponse, bv as AuthUser, bw as BalanceCustody, bx as BalanceRefillAttemptStatus, by as BalanceRefillPolicyStatus, bz as BookQuality, bA as CONFIRMED_MATCH_STATUSES, bB as CandleBuilder, bC as CandleInterval, bD as CandleTail, bE as Chain, bF as ChartBarsMeta, bG as ChartVenueCandles, bH as ComputeSplitsRequest, bI as ComputeSplitsResponse, bJ as ComputeSplitsSelection, bK as CorrelatedMarketCascadeItem, bL as CorrelatedMarketSide, bM as CorrelatedMarketSignal, bN as CorrelatedMarketSignalDirection, bO as CreateApp, bP as CryptoReferencePriceError, bQ as CryptoReferencePriceExternalMarketInput, bR as CryptoReferencePriceMarketInput, bS as CryptoReferencePriceResult, bT as CryptoReferencePriceSource, bU as CryptoReferencePriceTarget, bV as DepositAddressesPendingResponse, bW as DepositAddressesReadyResponse, bX as DepositAddressesSupportedChain, bY as DepositAddressesToken, bZ as DepositStep, b_ as DiagnosticCallback, b$ as DiagnosticEvent, c0 as ExecuteManagedRequest, c1 as ExecuteTradeRequest, c2 as ExecuteTradeResponse, c3 as ExecutionDagProgress, c4 as ExecutionDisplayGroupStatus, c5 as ExecutionDisplayStepKind, c6 as ExecutionMode, c7 as ExecutionOverallState, c8 as ExecutionStatusOrder, c9 as ExecutionStatusStep, ca as GetBalanceQuery, cb as GetBalanceResponse, cc as GetHoldingsQuery, cd as GetHoldingsResponse, ce as GetOrdersParams, cf as GetOrdersQuery, cg as GetPositionsQuery, ch as HelloResponse, ci as HistoryRangeRequest, cj as INACTIVE_VENUES, ck as LeaderboardMetric, cl as LeaderboardSeriesPoint, cm as LimitOrderTimeInForce, cn as MarkSource, co as MarketPriceHistory, cp as MarketView, cq as MarketViewBatch, cr as MatchType, cs as MatchedMidpoint, ct as MatchedMidpointOutcome, cu as MatchedOrderbookMarket, cv as MatchedVenueMarketOutcomeRef, cw as MidpointItem, cx as MidpointRow, cy as NewsFeedArticleFeedItem, cz as NewsFeedArticleWithSummary, cA as NewsFeedLinkedMarket, cB as NewsFeedMarketFeedArticle, cC as NewsFeedMarketFeedItem, cD as NewsFeedMarketNewsResult, cE as NonceResponse, cF as NovigExecutionMode, cG as OPTIONAL_SIGNATURE_TIMEOUT_MS, cH as OrderListItem, cI as OrderStatus, cJ as OrderType, cK as OrderbookBatchItemError, cL as OrderbookBatchItemErrorCode, cM as OrderbookBatchItemStatus, cN as OrderbookHistoryPoint, cO as OrderbookHistoryResponse, cP as OrderbookLevel, cQ as OrderbookQuoteFill, cR as OrderbookQuoteParams, cS as OrderbookQuoteResponse, cT as OrderbookServiceUnavailableError, O as OrderbookState, cU as OrderbooksOnlyError, cV as OutcomeMidpoint, cW as OutcomeMidpointRow, cX as PaperTradingBalanceAdjustment, cY as PaperTradingLiquidityStatus, cZ as PaperTradingMarkSource, c_ as PaperTradingPosition, c$ as PersistedAuthSnapshot, d0 as PositionRedeemStatus, d1 as PricePoint, d2 as PriceSource, d3 as PricesHistoryResponse, d4 as ProphetxExecutionMode, d5 as RECURRENCE_CADENCES, d6 as RecurrenceCadence, d7 as RecurringCryptoComparisonPoint, d8 as RecurringCryptoComparisonPriceSource, d9 as RecurringCryptoDuration, da as RecurringCryptoDurationInput, db as RecurringCryptoMarketMetrics, dc as RecurringCryptoOrderbookDepthLevel, dd as RecurringCryptoOrderbookDepthSide, de as RecurringCryptoOutcome, df as RecurringCryptoOutcomeOrderbookDepth, dg as RecurringCryptoPriceComparison, dh as RecurringCryptoReferencePrice, di as RecurringCryptoResolution, dj as RecurringCryptoSourceConfidence, dk as RecurringCryptoVenueMarket, dl as RecurringCryptoWindowComparisons, dm as RecurringCryptoWindowMarket, dn as RedeemLegResult, dp as RedeemLegStatus, dq as RequestedOrderbookMarket, dr as ResolvedCorrelatedMarketsResponse, ds as SELF_CUSTODY_FILL_TIMEOUT_MS, dt as SELF_CUSTODY_POLL_INTERVAL_MS, du as ServerWallet, dv as SettlementDiff, dw as SettlementDifference, dx as SettlementSource, dy as SetupDepositAddressStep, dz as SetupVenueKeyStep, dA as SignatureRequest, dB as SignatureRequestType, dC as SignerFn, dD as SimpleOrderbookLevel, dE as SmartRouteAllocation, dF as SmartRouteBridgeStep, dG as SmartRouteFeeBreakdown, dH as SmartRouteFill, dI as SmartRouteSettlementLeg, dJ as SmartRouteSettlementPlan, dK as SmartRouteSetupCostLine, dL as SmartRouteSide, dM as SmartRouteStatus, dN as SmartRouteVenueFill, dO as SportsGameStatus, dP as SportsLiveParticipant, dQ as SportsLiveState, dR as TERMINAL_EXECUTION_STATES, dS as TimeInForce, dT as TradeExecutorOrder, dU as TradeStep, dV as UserActivityBridge, dW as UserActivityDeposit, dX as UserActivityRedeem, dY as UserActivityRedeemLeg, dZ as UserActivityTrade, d_ as UserActivityType, d$ as UserActivityUserOp, e0 as UserActivityWithdrawal, e1 as VENUES, e2 as VENUE_CHAIN_IDS, e3 as ValidateBalanceOnClientStep, e4 as ValidateManagedParams, e5 as ValidateManagedRequest, e6 as ValidateManagedResponse, e7 as ValidateTradeRequest, e8 as ValidateTradeResponse, e9 as VenueEventListItem, ea as VenueEventWithMarkets, eb as VenueGeoPolicyEntry, ec as VenueMarketListItem, ed as VenueMarketRef, ee as VenueOrderbookEntry, ef as VenueOrderbookLevel, eg as VenuePositionBalance, eh as VenuePriceInfo, ei as VenueSoloQuote, ej as VerifyBody, ek as VerifyResponse, el as WalletChainBalance, em as WalletTokenBalance, en as WithdrawManagedRequest, eo as WithdrawManagedSourceItem, ep as WithdrawTokenSymbol, eq as WithdrawalExpected, er as WithdrawalLeg, es as WithdrawalLegStatus, et as WithdrawalLegType, eu as WithdrawalLifecycleStatus, ev as WithdrawalSource, ew as WithdrawalSourceItem, ex as WithdrawalSourceStatus, ey as WithdrawalSourceTokenSymbol, e as WsArbFeedBatch, ez as WsArbFeedEntry, W as WsArbMarketUpdate, eA as WsAttributedLevel, eB as WsAuthenticated, eC as WsBalanceUpdate, eD as WsCandleInterval, eE as WsClientMessage, eF as WsConnected, eG as WsError, eH as WsHeartbeat, eI as WsMarkSource, eJ as WsMarketResolved, eK as WsOrderEvent, eL as WsOrderEventType, eM as WsOrderSubmitted, eN as WsOrderbookDelta, eO as WsOrderbookSnapshot, eP as WsRedeemEvent, eQ as WsServerMessage, eR as WsSubscribed, eS as WsTrade, eT as WsUnsubscribed, eU as WsVenueBook, eV as WsVenueInfo, eW as WsVenueLevel, eX as WsWithdrawalLegStatus, eY as WsWithdrawalLifecycleEvent, eZ as WsWithdrawalLifecycleLeg, e_ as WsWithdrawalLifecycleStatus, e$ as applyOrderbookDelta, f0 as computeChecksum, f1 as getEffectiveDisabledVenues, f2 as isVenueActive, f3 as isVenueDataVisible, f4 as isVenueInactive, f5 as snapshotToOrderbook } from './agg-websocket-Bxt9PzTz.mjs';
|
|
3
3
|
|
|
4
4
|
declare enum ImageSize {
|
|
5
5
|
sm = 44,
|
|
@@ -773,6 +773,12 @@ declare class AggClient {
|
|
|
773
773
|
* inclusive UTC day range. `rank` is exact within the top 100.
|
|
774
774
|
*/
|
|
775
775
|
getLeaderboard(params?: LeaderboardQuery): Promise<PaginatedResponse<LeaderboardRow>>;
|
|
776
|
+
/**
|
|
777
|
+
* One user's leaderboard stats per UTC day (default the last 30 days, at
|
|
778
|
+
* most 366) with a running cumulative realized P&L. Gross of fees;
|
|
779
|
+
* unrealized P&L is not included.
|
|
780
|
+
*/
|
|
781
|
+
getLeaderboardSeries(params: LeaderboardSeriesQuery): Promise<LeaderboardSeries>;
|
|
776
782
|
/** List execution positions for the authenticated user (cursor pagination). */
|
|
777
783
|
getExecutionPositions(params?: ExecutionPositionsQuery): Promise<PaginatedResponse<ExecutionPositionGroup>>;
|
|
778
784
|
/**
|
|
@@ -859,6 +865,8 @@ declare class AggClient {
|
|
|
859
865
|
cursor?: string;
|
|
860
866
|
minYesPrice?: number;
|
|
861
867
|
maxYesPrice?: number;
|
|
868
|
+
/** Lifetime-volume floor (USD). Hides events/markets below it. Omit or 0 = no filter. */
|
|
869
|
+
minVolume?: number;
|
|
862
870
|
/** ISO-8601 timestamp. Hides events with endDate <= this value. NULL-endDate events are kept. */
|
|
863
871
|
endDateFrom?: string;
|
|
864
872
|
signal?: AbortSignal;
|
|
@@ -873,6 +881,7 @@ declare class AggClient {
|
|
|
873
881
|
/** Get a single venue event by ID. Requires appId or admin auth. */
|
|
874
882
|
getEventBootstrap(eventId: string, options?: {
|
|
875
883
|
limit?: number;
|
|
884
|
+
minVolume?: number;
|
|
876
885
|
signal?: AbortSignal;
|
|
877
886
|
}): Promise<EventBootstrapResponse>;
|
|
878
887
|
getVenueEventById(id: string, options?: {
|
|
@@ -884,6 +893,11 @@ declare class AggClient {
|
|
|
884
893
|
* market list you render.
|
|
885
894
|
*/
|
|
886
895
|
cluster?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Lifetime-volume floor (USD). Scopes `marketCount` to the markets
|
|
898
|
+
* {@link getVenueMarkets} returns with the same `minVolume`. Omit or 0 = no filter.
|
|
899
|
+
*/
|
|
900
|
+
minVolume?: number;
|
|
887
901
|
}): Promise<VenueEvent>;
|
|
888
902
|
/** Get normalized live score state for sports events. Requires appId or admin auth. */
|
|
889
903
|
getSportsLive(eventIds: string[], options?: {
|
|
@@ -921,6 +935,8 @@ declare class AggClient {
|
|
|
921
935
|
sortBy?: "volume" | "volume24hr" | "createdAt" | "updatedAt";
|
|
922
936
|
sortDir?: "asc" | "desc";
|
|
923
937
|
context?: "list" | "detail";
|
|
938
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
939
|
+
minVolume?: number;
|
|
924
940
|
}, requestOptions?: {
|
|
925
941
|
signal?: AbortSignal;
|
|
926
942
|
}): Promise<PaginatedResponse<VenueMarket>>;
|
|
@@ -1323,4 +1339,4 @@ declare function prepareHostedVenueRoute(client: FundingClient & Pick<AggClient,
|
|
|
1323
1339
|
|
|
1324
1340
|
declare function createAggClient(options: AggClientOptions): AggClient;
|
|
1325
1341
|
|
|
1326
|
-
export { AggApiError, type AggApiErrorInit, type AggApiFieldError, AggAuthStartBody, AggAuthStartResult, AggAuthVerifyBody, AggClient, AggClientOptions, AggClientSessionInput, AggLinkAccountBody, AggLinkAccountConfirmResult, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, type AggRateLimitResponse, AggWebSocket, AggWebSocketCallbacks, AppClientConfigResponse, AuthStatus, BalanceRefillAttempt, BalanceRefillPolicy, BatchMidpointsResponse, BatchOrderbooksResponse, type BuildVenueUrlOpts, CancelManagedExecutionResponse, CancelOrderSignature, CancelVenueOrderParams, Candle, Category, ChartBarsResponse, ChartCandle, ChartHistoryManifest, ChartResolution, CorrelatedMarketCascadeResponse, CorrelatedMarketQueryResult, CorrelatedMarketSignalBatch, CorrelatedMarketsStatus, CreateBalanceRefillPolicyParams, CreatePaperTradingAccountParams, CryptoReferencePricesResponse, DEFAULT_BALANCE_REFILL_DAILY_CAP_RAW, DEFAULT_BALANCE_REFILL_MAX_FEE_RAW, DepositAddressesResponse, EventBootstrapResponse, ExecuteManagedParams, ExecuteManagedResponse, ExecutionOrderItem, ExecutionOrdersQuery, ExecutionPositionGroup, ExecutionPositionsQuery, ExecutionStatusQuery, ExecutionStatusResponse, GetCryptoReferencePricesOptions, GetPositionsParams, type HostedVenueAccount, type HostedVenueActivity, type HostedVenueActivityCode, type HostedVenueActivityQuery, type HostedVenueBalance, type HostedVenueDepositAddress, type HostedVenueFundingIntent, type HostedVenueFundingOptions, type HostedVenueWithdrawal, type HostedVenueWithdrawalRequest, IMAGE_SIZES, ImageSize, LIMIT_PRICE_RAW_SCALE, LeaderboardQuery, LeaderboardRow, type LimitPriceSide, type LimitPriceTickAdjustment, ListRecurringCryptoMarketsOptions, type LoadImmutableHistoryOptions, ManagedBalancesParams, MarketStatus, MatchStatus, NewsFeedArticleFeedResponse, NewsFeedListResponse, NewsFeedMarketFeedResponse, NewsFeedMarketNewsParams, NewsFeedMarketNewsResponse, NewsFeedPageOptions, NewsFeedStatusResponse, OrderListQuery, Orderbook, OutcomeOrderbookResponse, PaginatedResponse, PaperTradingAccount, PaperTradingAccountsPage, PaperTradingAppOptions, PaperTradingBalanceResponse, PaperTradingListParams, PaperTradingOrder, PaperTradingOrdersPage, PaperTradingPortfolio, PaperTradingPositionsPage, PlaceLimitOrderParams, PlaceLimitOrderResponse, PlacePaperTradingOrderParams, PositionGroup, type ProvisionHostedVenueAccountBody, type QuoteError, type QuoteErrorCode, RETINA_IMAGE_SIZES, RampQuote, RampQuoteRequest, RampSessionRequest, RampWidgetSession, RecurrenceFilter, RecurringCryptoMarketsResponse, RedeemRequest, RedeemResponse, ResetPaperTradingAccountParams, ResolveCorrelatedMarketsParams, ResolveCorrelatedMarketsResponse, RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, SearchParams, SearchResponse, SetPaperTradingBalanceParams, SmartRouteParams, SmartRouteResponse, type SplitsByAmountResult, SportsLiveResponse, SyncBalancesResponse, TradeExecutorOrderListResponse, TradeSide, TradeSplit, TurnstileChallengeError, UnifiedBalanceResponse, UpdateBalanceRefillPolicyParams, UpdateUserBody, UpsertVenueKey, UserActivityItem, UserActivityQuery, UserHolding, UserProfile, Venue, VenueEvent, VenueGeoPolicyResponse, VenueKeyStatus, VenueKeySummary, VenueMarket, type VenueMarketClusterNode, VenueMarketOutcome, WithdrawManagedParams, WithdrawManagedResponse, WithdrawPreviewParams, WithdrawPreviewResponse, WithdrawalQuoteParams, WithdrawalQuoteResponse, adjustLimitPriceRawToTick, aggregateMidpoint, buildVenueUrl, computeBestSplitsByAmount, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getBalanceRefillMaximumRaw, getWalletAddressFromUserProfile, hasShape, isAggApiError, isBalanceRefillWithinDailyCap, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, loadImmutableHistory, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, orderbookCrc32, parse, parseEmail, parseEmailStrict, prepareHostedVenueFunding, prepareHostedVenueRoute, projectedOrderbookChecksum, retinaImageUrl, safeParse, sortVenues, toChecksumAddress };
|
|
1342
|
+
export { AggApiError, type AggApiErrorInit, type AggApiFieldError, AggAuthStartBody, AggAuthStartResult, AggAuthVerifyBody, AggClient, AggClientOptions, AggClientSessionInput, AggLinkAccountBody, AggLinkAccountConfirmResult, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, type AggRateLimitResponse, AggWebSocket, AggWebSocketCallbacks, AppClientConfigResponse, AuthStatus, BalanceRefillAttempt, BalanceRefillPolicy, BatchMidpointsResponse, BatchOrderbooksResponse, type BuildVenueUrlOpts, CancelManagedExecutionResponse, CancelOrderSignature, CancelVenueOrderParams, Candle, Category, ChartBarsResponse, ChartCandle, ChartHistoryManifest, ChartResolution, CorrelatedMarketCascadeResponse, CorrelatedMarketQueryResult, CorrelatedMarketSignalBatch, CorrelatedMarketsStatus, CreateBalanceRefillPolicyParams, CreatePaperTradingAccountParams, CryptoReferencePricesResponse, DEFAULT_BALANCE_REFILL_DAILY_CAP_RAW, DEFAULT_BALANCE_REFILL_MAX_FEE_RAW, DepositAddressesResponse, EventBootstrapResponse, ExecuteManagedParams, ExecuteManagedResponse, ExecutionOrderItem, ExecutionOrdersQuery, ExecutionPositionGroup, ExecutionPositionsQuery, ExecutionStatusQuery, ExecutionStatusResponse, GetCryptoReferencePricesOptions, GetPositionsParams, type HostedVenueAccount, type HostedVenueActivity, type HostedVenueActivityCode, type HostedVenueActivityQuery, type HostedVenueBalance, type HostedVenueDepositAddress, type HostedVenueFundingIntent, type HostedVenueFundingOptions, type HostedVenueWithdrawal, type HostedVenueWithdrawalRequest, IMAGE_SIZES, ImageSize, LIMIT_PRICE_RAW_SCALE, LeaderboardQuery, LeaderboardRow, LeaderboardSeries, LeaderboardSeriesQuery, type LimitPriceSide, type LimitPriceTickAdjustment, ListRecurringCryptoMarketsOptions, type LoadImmutableHistoryOptions, ManagedBalancesParams, MarketStatus, MatchStatus, NewsFeedArticleFeedResponse, NewsFeedListResponse, NewsFeedMarketFeedResponse, NewsFeedMarketNewsParams, NewsFeedMarketNewsResponse, NewsFeedPageOptions, NewsFeedStatusResponse, OrderListQuery, Orderbook, OutcomeOrderbookResponse, PaginatedResponse, PaperTradingAccount, PaperTradingAccountsPage, PaperTradingAppOptions, PaperTradingBalanceResponse, PaperTradingListParams, PaperTradingOrder, PaperTradingOrdersPage, PaperTradingPortfolio, PaperTradingPositionsPage, PlaceLimitOrderParams, PlaceLimitOrderResponse, PlacePaperTradingOrderParams, PositionGroup, type ProvisionHostedVenueAccountBody, type QuoteError, type QuoteErrorCode, RETINA_IMAGE_SIZES, RampQuote, RampQuoteRequest, RampSessionRequest, RampWidgetSession, RecurrenceFilter, RecurringCryptoMarketsResponse, RedeemRequest, RedeemResponse, ResetPaperTradingAccountParams, ResolveCorrelatedMarketsParams, ResolveCorrelatedMarketsResponse, RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, SearchParams, SearchResponse, SetPaperTradingBalanceParams, SmartRouteParams, SmartRouteResponse, type SplitsByAmountResult, SportsLiveResponse, SyncBalancesResponse, TradeExecutorOrderListResponse, TradeSide, TradeSplit, TurnstileChallengeError, UnifiedBalanceResponse, UpdateBalanceRefillPolicyParams, UpdateUserBody, UpsertVenueKey, UserActivityItem, UserActivityQuery, UserHolding, UserProfile, Venue, VenueEvent, VenueGeoPolicyResponse, VenueKeyStatus, VenueKeySummary, VenueMarket, type VenueMarketClusterNode, VenueMarketOutcome, WithdrawManagedParams, WithdrawManagedResponse, WithdrawPreviewParams, WithdrawPreviewResponse, WithdrawalQuoteParams, WithdrawalQuoteResponse, adjustLimitPriceRawToTick, aggregateMidpoint, buildVenueUrl, computeBestSplitsByAmount, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getBalanceRefillMaximumRaw, getWalletAddressFromUserProfile, hasShape, isAggApiError, isBalanceRefillWithinDailyCap, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, loadImmutableHistory, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, orderbookCrc32, parse, parseEmail, parseEmailStrict, prepareHostedVenueFunding, prepareHostedVenueRoute, projectedOrderbookChecksum, retinaImageUrl, safeParse, sortVenues, toChecksumAddress };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as Venue, U as UserProfile, T as TradeSplit, g as VenueMarket, h as VenueMarketOutcome, i as Orderbook, j as TradeSide, k as AggClientOptions, l as AggClientSessionInput, m as AuthStatus, S as SiweMessageParams, n as SiwsMessageParams, o as AggAuthVerifyBody, p as AggAuthStartBody, q as AggAuthStartResult, r as AggLinkAccountBody, s as AggLinkAccountResult, t as AggLinkAccountWalletConfirmBody, u as AggLinkAccountConfirmResult, v as UpdateUserBody, P as PaginatedResponse, w as UserHolding, x as OrderListQuery, y as TradeExecutorOrderListResponse, E as ExecutionOrdersQuery, z as ExecutionOrderItem, B as ExecutionStatusQuery, D as ExecutionStatusResponse, F as UserActivityQuery, G as UserActivityItem, L as LeaderboardQuery, H as LeaderboardRow, I as
|
|
2
|
-
export {
|
|
1
|
+
import { V as Venue, U as UserProfile, T as TradeSplit, g as VenueMarket, h as VenueMarketOutcome, i as Orderbook, j as TradeSide, k as AggClientOptions, l as AggClientSessionInput, m as AuthStatus, S as SiweMessageParams, n as SiwsMessageParams, o as AggAuthVerifyBody, p as AggAuthStartBody, q as AggAuthStartResult, r as AggLinkAccountBody, s as AggLinkAccountResult, t as AggLinkAccountWalletConfirmBody, u as AggLinkAccountConfirmResult, v as UpdateUserBody, P as PaginatedResponse, w as UserHolding, x as OrderListQuery, y as TradeExecutorOrderListResponse, E as ExecutionOrdersQuery, z as ExecutionOrderItem, B as ExecutionStatusQuery, D as ExecutionStatusResponse, F as UserActivityQuery, G as UserActivityItem, L as LeaderboardQuery, H as LeaderboardRow, I as LeaderboardSeriesQuery, J as LeaderboardSeries, K as ExecutionPositionsQuery, N as ExecutionPositionGroup, Q as ManagedBalancesParams, R as UnifiedBalanceResponse, X as UpsertVenueKey, Y as VenueKeySummary, Z as VenueKeyStatus, _ as CreatePaperTradingAccountParams, $ as PaperTradingAppOptions, a0 as PaperTradingAccount, a1 as PaperTradingAccountListParams, a2 as PaperTradingAccountsPage, a3 as SetPaperTradingBalanceParams, a4 as PaperTradingBalanceResponse, a5 as ResetPaperTradingAccountParams, a6 as PlacePaperTradingOrderParams, a7 as PaperTradingOrder, a8 as PaperTradingListParams, a9 as PaperTradingPositionsPage, aa as PaperTradingOrdersPage, ab as PaperTradingPortfolio, ac as CancelOrderSignature, ad as CancelManagedExecutionResponse, ae as CancelVenueOrderParams, af as MatchStatus, ag as MarketStatus, ah as RecurrenceFilter, ai as VenueEvent, aj as EventBootstrapResponse, ak as SportsLiveResponse, al as ListRecurringCryptoMarketsOptions, am as RecurringCryptoMarketsResponse, an as GetCryptoReferencePricesOptions, ao as CryptoReferencePricesResponse, ap as Category, aq as AppClientConfigResponse, ar as VenueGeoPolicyResponse, as as RpcTokenResponse, at as NewsFeedListResponse, au as NewsFeedPageOptions, av as NewsFeedArticleFeedResponse, aw as NewsFeedMarketFeedResponse, ax as NewsFeedStatusResponse, ay as NewsFeedMarketNewsParams, az as NewsFeedMarketNewsResponse, aA as SearchParams, aB as SearchResponse, aC as CorrelatedMarketsStatus, aD as CorrelatedMarketSignalBatch, aE as CorrelatedMarketQueryResult, aF as CorrelatedMarketCascadeResponse, aG as ResolveCorrelatedMarketsParams, aH as ResolveCorrelatedMarketsResponse, aI as ChartResolution, C as ChartBarsResponse, b as ChartHistoryManifest, aJ as BatchOrderbooksResponse, aK as BatchMidpointsResponse, aL as OutcomeOrderbookResponse, aM as SmartRouteParams, aN as SmartRouteResponse, f as AggWebSocketCallbacks, A as AggWebSocket, aO as ExecuteManagedParams, aP as ExecuteManagedResponse, aQ as PlaceLimitOrderParams, aR as PlaceLimitOrderResponse, aS as PlaceOrderParams, aT as PlaceOrderResponse, aU as RedeemRequest, aV as RedeemResponse, aW as BalanceRefillPolicy, aX as CreateBalanceRefillPolicyParams, aY as UpdateBalanceRefillPolicyParams, aZ as BalanceRefillAttempt, a_ as WithdrawManagedParams, a$ as WithdrawManagedResponse, b0 as WithdrawPreviewParams, b1 as WithdrawPreviewResponse, b2 as WithdrawalQuoteParams, b3 as WithdrawalQuoteResponse, b4 as SyncBalancesResponse, b5 as DepositAddressesResponse, b6 as GetPositionsParams, b7 as PositionGroup, b8 as RampQuoteRequest, b9 as RampQuote, ba as RampSessionRequest, bb as RampWidgetSession, bc as Candle, c as ChartCandle } from './agg-websocket-Bxt9PzTz.js';
|
|
2
|
+
export { bd as ACTIVE_VENUES, be as Account, bf as AccountProvider, bg as AccountType, bh as AggAuthDeliveryMode, bi as AggAuthPrivyVerifyBody, bj as AggAuthProviderType, bk as AggAuthWalletVerifyBody, bl as AggClientAuthOptions, bm as AggSessionUser, d as AggWebSocketDiagnostics, a as AggWebSocketOptions, bn as AggregatedOrderbookLevel, bo as AggregatedOrderbookResponse, bp as App, bq as AppTradingMode, br as AttributedOrderbook, bs as AttributedOrderbookLevel, bt as AuthCodeResponse, bu as AuthTokenResponse, bv as AuthUser, bw as BalanceCustody, bx as BalanceRefillAttemptStatus, by as BalanceRefillPolicyStatus, bz as BookQuality, bA as CONFIRMED_MATCH_STATUSES, bB as CandleBuilder, bC as CandleInterval, bD as CandleTail, bE as Chain, bF as ChartBarsMeta, bG as ChartVenueCandles, bH as ComputeSplitsRequest, bI as ComputeSplitsResponse, bJ as ComputeSplitsSelection, bK as CorrelatedMarketCascadeItem, bL as CorrelatedMarketSide, bM as CorrelatedMarketSignal, bN as CorrelatedMarketSignalDirection, bO as CreateApp, bP as CryptoReferencePriceError, bQ as CryptoReferencePriceExternalMarketInput, bR as CryptoReferencePriceMarketInput, bS as CryptoReferencePriceResult, bT as CryptoReferencePriceSource, bU as CryptoReferencePriceTarget, bV as DepositAddressesPendingResponse, bW as DepositAddressesReadyResponse, bX as DepositAddressesSupportedChain, bY as DepositAddressesToken, bZ as DepositStep, b_ as DiagnosticCallback, b$ as DiagnosticEvent, c0 as ExecuteManagedRequest, c1 as ExecuteTradeRequest, c2 as ExecuteTradeResponse, c3 as ExecutionDagProgress, c4 as ExecutionDisplayGroupStatus, c5 as ExecutionDisplayStepKind, c6 as ExecutionMode, c7 as ExecutionOverallState, c8 as ExecutionStatusOrder, c9 as ExecutionStatusStep, ca as GetBalanceQuery, cb as GetBalanceResponse, cc as GetHoldingsQuery, cd as GetHoldingsResponse, ce as GetOrdersParams, cf as GetOrdersQuery, cg as GetPositionsQuery, ch as HelloResponse, ci as HistoryRangeRequest, cj as INACTIVE_VENUES, ck as LeaderboardMetric, cl as LeaderboardSeriesPoint, cm as LimitOrderTimeInForce, cn as MarkSource, co as MarketPriceHistory, cp as MarketView, cq as MarketViewBatch, cr as MatchType, cs as MatchedMidpoint, ct as MatchedMidpointOutcome, cu as MatchedOrderbookMarket, cv as MatchedVenueMarketOutcomeRef, cw as MidpointItem, cx as MidpointRow, cy as NewsFeedArticleFeedItem, cz as NewsFeedArticleWithSummary, cA as NewsFeedLinkedMarket, cB as NewsFeedMarketFeedArticle, cC as NewsFeedMarketFeedItem, cD as NewsFeedMarketNewsResult, cE as NonceResponse, cF as NovigExecutionMode, cG as OPTIONAL_SIGNATURE_TIMEOUT_MS, cH as OrderListItem, cI as OrderStatus, cJ as OrderType, cK as OrderbookBatchItemError, cL as OrderbookBatchItemErrorCode, cM as OrderbookBatchItemStatus, cN as OrderbookHistoryPoint, cO as OrderbookHistoryResponse, cP as OrderbookLevel, cQ as OrderbookQuoteFill, cR as OrderbookQuoteParams, cS as OrderbookQuoteResponse, cT as OrderbookServiceUnavailableError, O as OrderbookState, cU as OrderbooksOnlyError, cV as OutcomeMidpoint, cW as OutcomeMidpointRow, cX as PaperTradingBalanceAdjustment, cY as PaperTradingLiquidityStatus, cZ as PaperTradingMarkSource, c_ as PaperTradingPosition, c$ as PersistedAuthSnapshot, d0 as PositionRedeemStatus, d1 as PricePoint, d2 as PriceSource, d3 as PricesHistoryResponse, d4 as ProphetxExecutionMode, d5 as RECURRENCE_CADENCES, d6 as RecurrenceCadence, d7 as RecurringCryptoComparisonPoint, d8 as RecurringCryptoComparisonPriceSource, d9 as RecurringCryptoDuration, da as RecurringCryptoDurationInput, db as RecurringCryptoMarketMetrics, dc as RecurringCryptoOrderbookDepthLevel, dd as RecurringCryptoOrderbookDepthSide, de as RecurringCryptoOutcome, df as RecurringCryptoOutcomeOrderbookDepth, dg as RecurringCryptoPriceComparison, dh as RecurringCryptoReferencePrice, di as RecurringCryptoResolution, dj as RecurringCryptoSourceConfidence, dk as RecurringCryptoVenueMarket, dl as RecurringCryptoWindowComparisons, dm as RecurringCryptoWindowMarket, dn as RedeemLegResult, dp as RedeemLegStatus, dq as RequestedOrderbookMarket, dr as ResolvedCorrelatedMarketsResponse, ds as SELF_CUSTODY_FILL_TIMEOUT_MS, dt as SELF_CUSTODY_POLL_INTERVAL_MS, du as ServerWallet, dv as SettlementDiff, dw as SettlementDifference, dx as SettlementSource, dy as SetupDepositAddressStep, dz as SetupVenueKeyStep, dA as SignatureRequest, dB as SignatureRequestType, dC as SignerFn, dD as SimpleOrderbookLevel, dE as SmartRouteAllocation, dF as SmartRouteBridgeStep, dG as SmartRouteFeeBreakdown, dH as SmartRouteFill, dI as SmartRouteSettlementLeg, dJ as SmartRouteSettlementPlan, dK as SmartRouteSetupCostLine, dL as SmartRouteSide, dM as SmartRouteStatus, dN as SmartRouteVenueFill, dO as SportsGameStatus, dP as SportsLiveParticipant, dQ as SportsLiveState, dR as TERMINAL_EXECUTION_STATES, dS as TimeInForce, dT as TradeExecutorOrder, dU as TradeStep, dV as UserActivityBridge, dW as UserActivityDeposit, dX as UserActivityRedeem, dY as UserActivityRedeemLeg, dZ as UserActivityTrade, d_ as UserActivityType, d$ as UserActivityUserOp, e0 as UserActivityWithdrawal, e1 as VENUES, e2 as VENUE_CHAIN_IDS, e3 as ValidateBalanceOnClientStep, e4 as ValidateManagedParams, e5 as ValidateManagedRequest, e6 as ValidateManagedResponse, e7 as ValidateTradeRequest, e8 as ValidateTradeResponse, e9 as VenueEventListItem, ea as VenueEventWithMarkets, eb as VenueGeoPolicyEntry, ec as VenueMarketListItem, ed as VenueMarketRef, ee as VenueOrderbookEntry, ef as VenueOrderbookLevel, eg as VenuePositionBalance, eh as VenuePriceInfo, ei as VenueSoloQuote, ej as VerifyBody, ek as VerifyResponse, el as WalletChainBalance, em as WalletTokenBalance, en as WithdrawManagedRequest, eo as WithdrawManagedSourceItem, ep as WithdrawTokenSymbol, eq as WithdrawalExpected, er as WithdrawalLeg, es as WithdrawalLegStatus, et as WithdrawalLegType, eu as WithdrawalLifecycleStatus, ev as WithdrawalSource, ew as WithdrawalSourceItem, ex as WithdrawalSourceStatus, ey as WithdrawalSourceTokenSymbol, e as WsArbFeedBatch, ez as WsArbFeedEntry, W as WsArbMarketUpdate, eA as WsAttributedLevel, eB as WsAuthenticated, eC as WsBalanceUpdate, eD as WsCandleInterval, eE as WsClientMessage, eF as WsConnected, eG as WsError, eH as WsHeartbeat, eI as WsMarkSource, eJ as WsMarketResolved, eK as WsOrderEvent, eL as WsOrderEventType, eM as WsOrderSubmitted, eN as WsOrderbookDelta, eO as WsOrderbookSnapshot, eP as WsRedeemEvent, eQ as WsServerMessage, eR as WsSubscribed, eS as WsTrade, eT as WsUnsubscribed, eU as WsVenueBook, eV as WsVenueInfo, eW as WsVenueLevel, eX as WsWithdrawalLegStatus, eY as WsWithdrawalLifecycleEvent, eZ as WsWithdrawalLifecycleLeg, e_ as WsWithdrawalLifecycleStatus, e$ as applyOrderbookDelta, f0 as computeChecksum, f1 as getEffectiveDisabledVenues, f2 as isVenueActive, f3 as isVenueDataVisible, f4 as isVenueInactive, f5 as snapshotToOrderbook } from './agg-websocket-Bxt9PzTz.js';
|
|
3
3
|
|
|
4
4
|
declare enum ImageSize {
|
|
5
5
|
sm = 44,
|
|
@@ -773,6 +773,12 @@ declare class AggClient {
|
|
|
773
773
|
* inclusive UTC day range. `rank` is exact within the top 100.
|
|
774
774
|
*/
|
|
775
775
|
getLeaderboard(params?: LeaderboardQuery): Promise<PaginatedResponse<LeaderboardRow>>;
|
|
776
|
+
/**
|
|
777
|
+
* One user's leaderboard stats per UTC day (default the last 30 days, at
|
|
778
|
+
* most 366) with a running cumulative realized P&L. Gross of fees;
|
|
779
|
+
* unrealized P&L is not included.
|
|
780
|
+
*/
|
|
781
|
+
getLeaderboardSeries(params: LeaderboardSeriesQuery): Promise<LeaderboardSeries>;
|
|
776
782
|
/** List execution positions for the authenticated user (cursor pagination). */
|
|
777
783
|
getExecutionPositions(params?: ExecutionPositionsQuery): Promise<PaginatedResponse<ExecutionPositionGroup>>;
|
|
778
784
|
/**
|
|
@@ -859,6 +865,8 @@ declare class AggClient {
|
|
|
859
865
|
cursor?: string;
|
|
860
866
|
minYesPrice?: number;
|
|
861
867
|
maxYesPrice?: number;
|
|
868
|
+
/** Lifetime-volume floor (USD). Hides events/markets below it. Omit or 0 = no filter. */
|
|
869
|
+
minVolume?: number;
|
|
862
870
|
/** ISO-8601 timestamp. Hides events with endDate <= this value. NULL-endDate events are kept. */
|
|
863
871
|
endDateFrom?: string;
|
|
864
872
|
signal?: AbortSignal;
|
|
@@ -873,6 +881,7 @@ declare class AggClient {
|
|
|
873
881
|
/** Get a single venue event by ID. Requires appId or admin auth. */
|
|
874
882
|
getEventBootstrap(eventId: string, options?: {
|
|
875
883
|
limit?: number;
|
|
884
|
+
minVolume?: number;
|
|
876
885
|
signal?: AbortSignal;
|
|
877
886
|
}): Promise<EventBootstrapResponse>;
|
|
878
887
|
getVenueEventById(id: string, options?: {
|
|
@@ -884,6 +893,11 @@ declare class AggClient {
|
|
|
884
893
|
* market list you render.
|
|
885
894
|
*/
|
|
886
895
|
cluster?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Lifetime-volume floor (USD). Scopes `marketCount` to the markets
|
|
898
|
+
* {@link getVenueMarkets} returns with the same `minVolume`. Omit or 0 = no filter.
|
|
899
|
+
*/
|
|
900
|
+
minVolume?: number;
|
|
887
901
|
}): Promise<VenueEvent>;
|
|
888
902
|
/** Get normalized live score state for sports events. Requires appId or admin auth. */
|
|
889
903
|
getSportsLive(eventIds: string[], options?: {
|
|
@@ -921,6 +935,8 @@ declare class AggClient {
|
|
|
921
935
|
sortBy?: "volume" | "volume24hr" | "createdAt" | "updatedAt";
|
|
922
936
|
sortDir?: "asc" | "desc";
|
|
923
937
|
context?: "list" | "detail";
|
|
938
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
939
|
+
minVolume?: number;
|
|
924
940
|
}, requestOptions?: {
|
|
925
941
|
signal?: AbortSignal;
|
|
926
942
|
}): Promise<PaginatedResponse<VenueMarket>>;
|
|
@@ -1323,4 +1339,4 @@ declare function prepareHostedVenueRoute(client: FundingClient & Pick<AggClient,
|
|
|
1323
1339
|
|
|
1324
1340
|
declare function createAggClient(options: AggClientOptions): AggClient;
|
|
1325
1341
|
|
|
1326
|
-
export { AggApiError, type AggApiErrorInit, type AggApiFieldError, AggAuthStartBody, AggAuthStartResult, AggAuthVerifyBody, AggClient, AggClientOptions, AggClientSessionInput, AggLinkAccountBody, AggLinkAccountConfirmResult, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, type AggRateLimitResponse, AggWebSocket, AggWebSocketCallbacks, AppClientConfigResponse, AuthStatus, BalanceRefillAttempt, BalanceRefillPolicy, BatchMidpointsResponse, BatchOrderbooksResponse, type BuildVenueUrlOpts, CancelManagedExecutionResponse, CancelOrderSignature, CancelVenueOrderParams, Candle, Category, ChartBarsResponse, ChartCandle, ChartHistoryManifest, ChartResolution, CorrelatedMarketCascadeResponse, CorrelatedMarketQueryResult, CorrelatedMarketSignalBatch, CorrelatedMarketsStatus, CreateBalanceRefillPolicyParams, CreatePaperTradingAccountParams, CryptoReferencePricesResponse, DEFAULT_BALANCE_REFILL_DAILY_CAP_RAW, DEFAULT_BALANCE_REFILL_MAX_FEE_RAW, DepositAddressesResponse, EventBootstrapResponse, ExecuteManagedParams, ExecuteManagedResponse, ExecutionOrderItem, ExecutionOrdersQuery, ExecutionPositionGroup, ExecutionPositionsQuery, ExecutionStatusQuery, ExecutionStatusResponse, GetCryptoReferencePricesOptions, GetPositionsParams, type HostedVenueAccount, type HostedVenueActivity, type HostedVenueActivityCode, type HostedVenueActivityQuery, type HostedVenueBalance, type HostedVenueDepositAddress, type HostedVenueFundingIntent, type HostedVenueFundingOptions, type HostedVenueWithdrawal, type HostedVenueWithdrawalRequest, IMAGE_SIZES, ImageSize, LIMIT_PRICE_RAW_SCALE, LeaderboardQuery, LeaderboardRow, type LimitPriceSide, type LimitPriceTickAdjustment, ListRecurringCryptoMarketsOptions, type LoadImmutableHistoryOptions, ManagedBalancesParams, MarketStatus, MatchStatus, NewsFeedArticleFeedResponse, NewsFeedListResponse, NewsFeedMarketFeedResponse, NewsFeedMarketNewsParams, NewsFeedMarketNewsResponse, NewsFeedPageOptions, NewsFeedStatusResponse, OrderListQuery, Orderbook, OutcomeOrderbookResponse, PaginatedResponse, PaperTradingAccount, PaperTradingAccountsPage, PaperTradingAppOptions, PaperTradingBalanceResponse, PaperTradingListParams, PaperTradingOrder, PaperTradingOrdersPage, PaperTradingPortfolio, PaperTradingPositionsPage, PlaceLimitOrderParams, PlaceLimitOrderResponse, PlacePaperTradingOrderParams, PositionGroup, type ProvisionHostedVenueAccountBody, type QuoteError, type QuoteErrorCode, RETINA_IMAGE_SIZES, RampQuote, RampQuoteRequest, RampSessionRequest, RampWidgetSession, RecurrenceFilter, RecurringCryptoMarketsResponse, RedeemRequest, RedeemResponse, ResetPaperTradingAccountParams, ResolveCorrelatedMarketsParams, ResolveCorrelatedMarketsResponse, RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, SearchParams, SearchResponse, SetPaperTradingBalanceParams, SmartRouteParams, SmartRouteResponse, type SplitsByAmountResult, SportsLiveResponse, SyncBalancesResponse, TradeExecutorOrderListResponse, TradeSide, TradeSplit, TurnstileChallengeError, UnifiedBalanceResponse, UpdateBalanceRefillPolicyParams, UpdateUserBody, UpsertVenueKey, UserActivityItem, UserActivityQuery, UserHolding, UserProfile, Venue, VenueEvent, VenueGeoPolicyResponse, VenueKeyStatus, VenueKeySummary, VenueMarket, type VenueMarketClusterNode, VenueMarketOutcome, WithdrawManagedParams, WithdrawManagedResponse, WithdrawPreviewParams, WithdrawPreviewResponse, WithdrawalQuoteParams, WithdrawalQuoteResponse, adjustLimitPriceRawToTick, aggregateMidpoint, buildVenueUrl, computeBestSplitsByAmount, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getBalanceRefillMaximumRaw, getWalletAddressFromUserProfile, hasShape, isAggApiError, isBalanceRefillWithinDailyCap, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, loadImmutableHistory, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, orderbookCrc32, parse, parseEmail, parseEmailStrict, prepareHostedVenueFunding, prepareHostedVenueRoute, projectedOrderbookChecksum, retinaImageUrl, safeParse, sortVenues, toChecksumAddress };
|
|
1342
|
+
export { AggApiError, type AggApiErrorInit, type AggApiFieldError, AggAuthStartBody, AggAuthStartResult, AggAuthVerifyBody, AggClient, AggClientOptions, AggClientSessionInput, AggLinkAccountBody, AggLinkAccountConfirmResult, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, type AggRateLimitResponse, AggWebSocket, AggWebSocketCallbacks, AppClientConfigResponse, AuthStatus, BalanceRefillAttempt, BalanceRefillPolicy, BatchMidpointsResponse, BatchOrderbooksResponse, type BuildVenueUrlOpts, CancelManagedExecutionResponse, CancelOrderSignature, CancelVenueOrderParams, Candle, Category, ChartBarsResponse, ChartCandle, ChartHistoryManifest, ChartResolution, CorrelatedMarketCascadeResponse, CorrelatedMarketQueryResult, CorrelatedMarketSignalBatch, CorrelatedMarketsStatus, CreateBalanceRefillPolicyParams, CreatePaperTradingAccountParams, CryptoReferencePricesResponse, DEFAULT_BALANCE_REFILL_DAILY_CAP_RAW, DEFAULT_BALANCE_REFILL_MAX_FEE_RAW, DepositAddressesResponse, EventBootstrapResponse, ExecuteManagedParams, ExecuteManagedResponse, ExecutionOrderItem, ExecutionOrdersQuery, ExecutionPositionGroup, ExecutionPositionsQuery, ExecutionStatusQuery, ExecutionStatusResponse, GetCryptoReferencePricesOptions, GetPositionsParams, type HostedVenueAccount, type HostedVenueActivity, type HostedVenueActivityCode, type HostedVenueActivityQuery, type HostedVenueBalance, type HostedVenueDepositAddress, type HostedVenueFundingIntent, type HostedVenueFundingOptions, type HostedVenueWithdrawal, type HostedVenueWithdrawalRequest, IMAGE_SIZES, ImageSize, LIMIT_PRICE_RAW_SCALE, LeaderboardQuery, LeaderboardRow, LeaderboardSeries, LeaderboardSeriesQuery, type LimitPriceSide, type LimitPriceTickAdjustment, ListRecurringCryptoMarketsOptions, type LoadImmutableHistoryOptions, ManagedBalancesParams, MarketStatus, MatchStatus, NewsFeedArticleFeedResponse, NewsFeedListResponse, NewsFeedMarketFeedResponse, NewsFeedMarketNewsParams, NewsFeedMarketNewsResponse, NewsFeedPageOptions, NewsFeedStatusResponse, OrderListQuery, Orderbook, OutcomeOrderbookResponse, PaginatedResponse, PaperTradingAccount, PaperTradingAccountsPage, PaperTradingAppOptions, PaperTradingBalanceResponse, PaperTradingListParams, PaperTradingOrder, PaperTradingOrdersPage, PaperTradingPortfolio, PaperTradingPositionsPage, PlaceLimitOrderParams, PlaceLimitOrderResponse, PlacePaperTradingOrderParams, PositionGroup, type ProvisionHostedVenueAccountBody, type QuoteError, type QuoteErrorCode, RETINA_IMAGE_SIZES, RampQuote, RampQuoteRequest, RampSessionRequest, RampWidgetSession, RecurrenceFilter, RecurringCryptoMarketsResponse, RedeemRequest, RedeemResponse, ResetPaperTradingAccountParams, ResolveCorrelatedMarketsParams, ResolveCorrelatedMarketsResponse, RpcTokenResponse, type SafeParseFailure, type SafeParseResult, type SafeParseSuccess, SearchParams, SearchResponse, SetPaperTradingBalanceParams, SmartRouteParams, SmartRouteResponse, type SplitsByAmountResult, SportsLiveResponse, SyncBalancesResponse, TradeExecutorOrderListResponse, TradeSide, TradeSplit, TurnstileChallengeError, UnifiedBalanceResponse, UpdateBalanceRefillPolicyParams, UpdateUserBody, UpsertVenueKey, UserActivityItem, UserActivityQuery, UserHolding, UserProfile, Venue, VenueEvent, VenueGeoPolicyResponse, VenueKeyStatus, VenueKeySummary, VenueMarket, type VenueMarketClusterNode, VenueMarketOutcome, WithdrawManagedParams, WithdrawManagedResponse, WithdrawPreviewParams, WithdrawPreviewResponse, WithdrawalQuoteParams, WithdrawalQuoteResponse, adjustLimitPriceRawToTick, aggregateMidpoint, buildVenueUrl, computeBestSplitsByAmount, createAggClient, enumGuard, formatMarketQuestion, formatOutcomeLabel, formatOutcomeTitle, getBalanceRefillMaximumRaw, getWalletAddressFromUserProfile, hasShape, isAggApiError, isBalanceRefillWithinDailyCap, isEmail, isEnum, isFiniteNonNeg, isNonEmptyString, loadImmutableHistory, mergeCandles, mergeClosedCandles, normalizeVenueMarketCluster, optimizedImageUrl, orderbookCrc32, parse, parseEmail, parseEmailStrict, prepareHostedVenueFunding, prepareHostedVenueRoute, projectedOrderbookChecksum, retinaImageUrl, safeParse, sortVenues, toChecksumAddress };
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,7 @@ __export(index_exports, {
|
|
|
87
87
|
MarketStatus: () => MarketStatus,
|
|
88
88
|
MatchStatus: () => MatchStatus,
|
|
89
89
|
MatchType: () => MatchType,
|
|
90
|
+
OPTIONAL_SIGNATURE_TIMEOUT_MS: () => OPTIONAL_SIGNATURE_TIMEOUT_MS,
|
|
90
91
|
OrderStatus: () => OrderStatus,
|
|
91
92
|
OrderType: () => OrderType,
|
|
92
93
|
RECURRENCE_CADENCES: () => RECURRENCE_CADENCES,
|
|
@@ -1101,6 +1102,7 @@ function toChecksumAddress(address) {
|
|
|
1101
1102
|
// src/types.ts
|
|
1102
1103
|
var SELF_CUSTODY_FILL_TIMEOUT_MS = 5 * 6e4;
|
|
1103
1104
|
var SELF_CUSTODY_POLL_INTERVAL_MS = 2e3;
|
|
1105
|
+
var OPTIONAL_SIGNATURE_TIMEOUT_MS = 15e3;
|
|
1104
1106
|
var TERMINAL_EXECUTION_STATES = /* @__PURE__ */ new Set(["filled", "partially_filled", "failed", "cancelled", "expired"]);
|
|
1105
1107
|
var RECURRENCE_CADENCES = [
|
|
1106
1108
|
"PT5M",
|
|
@@ -2424,6 +2426,21 @@ var AUTH_PATHS = /* @__PURE__ */ new Set([
|
|
|
2424
2426
|
"/auth/token/exchange",
|
|
2425
2427
|
"/auth/sign-out"
|
|
2426
2428
|
]);
|
|
2429
|
+
function withTimeout(p, ms) {
|
|
2430
|
+
return new Promise((resolve, reject) => {
|
|
2431
|
+
const timer = setTimeout(() => reject(new Error(`timed out after ${ms}ms`)), ms);
|
|
2432
|
+
p.then(
|
|
2433
|
+
(v) => {
|
|
2434
|
+
clearTimeout(timer);
|
|
2435
|
+
resolve(v);
|
|
2436
|
+
},
|
|
2437
|
+
(e) => {
|
|
2438
|
+
clearTimeout(timer);
|
|
2439
|
+
reject(e);
|
|
2440
|
+
}
|
|
2441
|
+
);
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2427
2444
|
var AggClient = class {
|
|
2428
2445
|
constructor(options) {
|
|
2429
2446
|
this.listeners = /* @__PURE__ */ new Set();
|
|
@@ -3151,6 +3168,28 @@ Issued At: ${issuedAt}`;
|
|
|
3151
3168
|
});
|
|
3152
3169
|
});
|
|
3153
3170
|
}
|
|
3171
|
+
/**
|
|
3172
|
+
* One user's leaderboard stats per UTC day (default the last 30 days, at
|
|
3173
|
+
* most 366) with a running cumulative realized P&L. Gross of fees;
|
|
3174
|
+
* unrealized P&L is not included.
|
|
3175
|
+
*/
|
|
3176
|
+
getLeaderboardSeries(params) {
|
|
3177
|
+
return __async(this, null, function* () {
|
|
3178
|
+
const query = {};
|
|
3179
|
+
for (const key of [
|
|
3180
|
+
"from",
|
|
3181
|
+
"to",
|
|
3182
|
+
"userId",
|
|
3183
|
+
"externalId",
|
|
3184
|
+
"username",
|
|
3185
|
+
"walletAddress"
|
|
3186
|
+
]) {
|
|
3187
|
+
const value = params[key];
|
|
3188
|
+
if (value) query[key] = value;
|
|
3189
|
+
}
|
|
3190
|
+
return this.request("/leaderboard/series", { query });
|
|
3191
|
+
});
|
|
3192
|
+
}
|
|
3154
3193
|
/** List execution positions for the authenticated user (cursor pagination). */
|
|
3155
3194
|
getExecutionPositions() {
|
|
3156
3195
|
return __async(this, arguments, function* (params = {}) {
|
|
@@ -3421,6 +3460,8 @@ Issued At: ${issuedAt}`;
|
|
|
3421
3460
|
if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
|
|
3422
3461
|
if ((options == null ? void 0 : options.minYesPrice) != null) query.minYesPrice = String(options.minYesPrice);
|
|
3423
3462
|
if ((options == null ? void 0 : options.maxYesPrice) != null) query.maxYesPrice = String(options.maxYesPrice);
|
|
3463
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
3464
|
+
query.minVolume = String(options.minVolume);
|
|
3424
3465
|
if (options == null ? void 0 : options.endDateFrom) query.endDateFrom = options.endDateFrom;
|
|
3425
3466
|
if (options == null ? void 0 : options.grouped) query.grouped = "true";
|
|
3426
3467
|
return this.request("/venue-events", {
|
|
@@ -3432,10 +3473,14 @@ Issued At: ${issuedAt}`;
|
|
|
3432
3473
|
/** Get a single venue event by ID. Requires appId or admin auth. */
|
|
3433
3474
|
getEventBootstrap(eventId, options) {
|
|
3434
3475
|
return __async(this, null, function* () {
|
|
3476
|
+
const query = {};
|
|
3477
|
+
if (options == null ? void 0 : options.limit) query.limit = String(options.limit);
|
|
3478
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
3479
|
+
query.minVolume = String(options.minVolume);
|
|
3435
3480
|
return this.request(
|
|
3436
3481
|
`/venue-events/${encodeURIComponent(eventId)}/bootstrap`,
|
|
3437
3482
|
{
|
|
3438
|
-
query: (
|
|
3483
|
+
query: Object.keys(query).length > 0 ? query : void 0,
|
|
3439
3484
|
signal: options == null ? void 0 : options.signal
|
|
3440
3485
|
}
|
|
3441
3486
|
);
|
|
@@ -3447,7 +3492,9 @@ Issued At: ${issuedAt}`;
|
|
|
3447
3492
|
// Opt into the lean response (no embedded `venueMarkets`) — markets are
|
|
3448
3493
|
// fetched separately via GET /venue-markets. Empty `expand` (no `markets`
|
|
3449
3494
|
// token) tells the API to omit the deprecated embedded array.
|
|
3450
|
-
query: __spreadValues(
|
|
3495
|
+
query: __spreadValues(__spreadValues({
|
|
3496
|
+
expand: ""
|
|
3497
|
+
}, (options == null ? void 0 : options.cluster) === false ? { cluster: "false" } : {}), (options == null ? void 0 : options.minVolume) != null && options.minVolume > 0 ? { minVolume: String(options.minVolume) } : {}),
|
|
3451
3498
|
signal: options == null ? void 0 : options.signal
|
|
3452
3499
|
});
|
|
3453
3500
|
});
|
|
@@ -3596,6 +3643,8 @@ Issued At: ${issuedAt}`;
|
|
|
3596
3643
|
if (options == null ? void 0 : options.sortBy) query.sortBy = options.sortBy;
|
|
3597
3644
|
if (options == null ? void 0 : options.sortDir) query.sortDir = options.sortDir;
|
|
3598
3645
|
if (options == null ? void 0 : options.context) query.context = options.context;
|
|
3646
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
3647
|
+
query.minVolume = String(options.minVolume);
|
|
3599
3648
|
return this.request("/venue-markets", {
|
|
3600
3649
|
query: Object.keys(query).length > 0 ? query : void 0,
|
|
3601
3650
|
signal: requestOptions == null ? void 0 : requestOptions.signal
|
|
@@ -3904,8 +3953,16 @@ Issued At: ${issuedAt}`;
|
|
|
3904
3953
|
if (params.appFeeBips != null) query.appFeeBips = String(params.appFeeBips);
|
|
3905
3954
|
if (params.referrer) query.referrer = params.referrer;
|
|
3906
3955
|
if (params.referrerFeeBips != null) query.referrerFeeBips = String(params.referrerFeeBips);
|
|
3956
|
+
if (params.appFeeBipsByVenue)
|
|
3957
|
+
query.appFeeBipsByVenue = JSON.stringify(params.appFeeBipsByVenue);
|
|
3958
|
+
if (params.referrerFeeBipsByVenue) {
|
|
3959
|
+
query.referrerFeeBipsByVenue = JSON.stringify(params.referrerFeeBipsByVenue);
|
|
3960
|
+
}
|
|
3907
3961
|
if (params.referralPayer) query.referralPayer = params.referralPayer;
|
|
3908
3962
|
if (params.referralPayerAddress) query.referralPayerAddress = params.referralPayerAddress;
|
|
3963
|
+
if (params.referralActivationSponsorAddress) {
|
|
3964
|
+
query.referralActivationSponsorAddress = params.referralActivationSponsorAddress;
|
|
3965
|
+
}
|
|
3909
3966
|
const response = yield this.request(
|
|
3910
3967
|
`/orderbook/${encodeURIComponent(venueMarketOutcomeId)}/route`,
|
|
3911
3968
|
{ query, signal: options == null ? void 0 : options.signal }
|
|
@@ -3975,7 +4032,7 @@ Issued At: ${issuedAt}`;
|
|
|
3975
4032
|
*/
|
|
3976
4033
|
fillSelfCustody(params) {
|
|
3977
4034
|
return __async(this, null, function* () {
|
|
3978
|
-
var _a, _b, _c;
|
|
4035
|
+
var _a, _b, _c, _d;
|
|
3979
4036
|
if (this.signer && !params.signingAddress) {
|
|
3980
4037
|
throw new Error(
|
|
3981
4038
|
"fillSelfCustody requires `signingAddress` \u2014 the wallet that will sign this fill."
|
|
@@ -4024,7 +4081,11 @@ Issued At: ${issuedAt}`;
|
|
|
4024
4081
|
}
|
|
4025
4082
|
lastKey = key;
|
|
4026
4083
|
const signatures = [];
|
|
4027
|
-
|
|
4084
|
+
const ordered = [...pending].sort((a, b) => Number(!!a.optional) - Number(!!b.optional));
|
|
4085
|
+
const userSigners = new Set(
|
|
4086
|
+
[params.signingAddress, ...pending.filter((p) => !p.optional).map((p) => p.signerAddress)].filter((a) => !!a).map((a) => a.toLowerCase())
|
|
4087
|
+
);
|
|
4088
|
+
for (const req of ordered) {
|
|
4028
4089
|
if (Date.now() > new Date(req.expiresAt).getTime()) {
|
|
4029
4090
|
if (req.optional) {
|
|
4030
4091
|
declinedOptional.add(req.stepId);
|
|
@@ -4036,7 +4097,7 @@ Issued At: ${issuedAt}`;
|
|
|
4036
4097
|
}
|
|
4037
4098
|
let signed;
|
|
4038
4099
|
try {
|
|
4039
|
-
signed = yield signer(req);
|
|
4100
|
+
signed = req.optional && !userSigners.has((_c = req.signerAddress) == null ? void 0 : _c.toLowerCase()) ? yield withTimeout(signer(req), OPTIONAL_SIGNATURE_TIMEOUT_MS) : yield signer(req);
|
|
4040
4101
|
} catch (err) {
|
|
4041
4102
|
if (!req.optional) throw err;
|
|
4042
4103
|
declinedOptional.add(req.stepId);
|
|
@@ -4051,7 +4112,7 @@ Issued At: ${issuedAt}`;
|
|
|
4051
4112
|
continue;
|
|
4052
4113
|
}
|
|
4053
4114
|
const next = yield this.submitFillSignatures(quoteId, signatures);
|
|
4054
|
-
pending = (
|
|
4115
|
+
pending = (_d = next.pendingSignatures) != null ? _d : [];
|
|
4055
4116
|
}
|
|
4056
4117
|
});
|
|
4057
4118
|
}
|
|
@@ -4646,6 +4707,7 @@ function createAggClient(options) {
|
|
|
4646
4707
|
MarketStatus,
|
|
4647
4708
|
MatchStatus,
|
|
4648
4709
|
MatchType,
|
|
4710
|
+
OPTIONAL_SIGNATURE_TIMEOUT_MS,
|
|
4649
4711
|
OrderStatus,
|
|
4650
4712
|
OrderType,
|
|
4651
4713
|
RECURRENCE_CADENCES,
|
package/dist/index.mjs
CHANGED
|
@@ -244,6 +244,7 @@ function toChecksumAddress(address) {
|
|
|
244
244
|
// src/types.ts
|
|
245
245
|
var SELF_CUSTODY_FILL_TIMEOUT_MS = 5 * 6e4;
|
|
246
246
|
var SELF_CUSTODY_POLL_INTERVAL_MS = 2e3;
|
|
247
|
+
var OPTIONAL_SIGNATURE_TIMEOUT_MS = 15e3;
|
|
247
248
|
var TERMINAL_EXECUTION_STATES = /* @__PURE__ */ new Set(["filled", "partially_filled", "failed", "cancelled", "expired"]);
|
|
248
249
|
var RECURRENCE_CADENCES = [
|
|
249
250
|
"PT5M",
|
|
@@ -341,6 +342,21 @@ var AUTH_PATHS = /* @__PURE__ */ new Set([
|
|
|
341
342
|
"/auth/token/exchange",
|
|
342
343
|
"/auth/sign-out"
|
|
343
344
|
]);
|
|
345
|
+
function withTimeout(p, ms) {
|
|
346
|
+
return new Promise((resolve, reject) => {
|
|
347
|
+
const timer = setTimeout(() => reject(new Error(`timed out after ${ms}ms`)), ms);
|
|
348
|
+
p.then(
|
|
349
|
+
(v) => {
|
|
350
|
+
clearTimeout(timer);
|
|
351
|
+
resolve(v);
|
|
352
|
+
},
|
|
353
|
+
(e) => {
|
|
354
|
+
clearTimeout(timer);
|
|
355
|
+
reject(e);
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
});
|
|
359
|
+
}
|
|
344
360
|
var AggClient = class {
|
|
345
361
|
constructor(options) {
|
|
346
362
|
this.listeners = /* @__PURE__ */ new Set();
|
|
@@ -1068,6 +1084,28 @@ Issued At: ${issuedAt}`;
|
|
|
1068
1084
|
});
|
|
1069
1085
|
});
|
|
1070
1086
|
}
|
|
1087
|
+
/**
|
|
1088
|
+
* One user's leaderboard stats per UTC day (default the last 30 days, at
|
|
1089
|
+
* most 366) with a running cumulative realized P&L. Gross of fees;
|
|
1090
|
+
* unrealized P&L is not included.
|
|
1091
|
+
*/
|
|
1092
|
+
getLeaderboardSeries(params) {
|
|
1093
|
+
return __async(this, null, function* () {
|
|
1094
|
+
const query = {};
|
|
1095
|
+
for (const key of [
|
|
1096
|
+
"from",
|
|
1097
|
+
"to",
|
|
1098
|
+
"userId",
|
|
1099
|
+
"externalId",
|
|
1100
|
+
"username",
|
|
1101
|
+
"walletAddress"
|
|
1102
|
+
]) {
|
|
1103
|
+
const value = params[key];
|
|
1104
|
+
if (value) query[key] = value;
|
|
1105
|
+
}
|
|
1106
|
+
return this.request("/leaderboard/series", { query });
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1071
1109
|
/** List execution positions for the authenticated user (cursor pagination). */
|
|
1072
1110
|
getExecutionPositions() {
|
|
1073
1111
|
return __async(this, arguments, function* (params = {}) {
|
|
@@ -1338,6 +1376,8 @@ Issued At: ${issuedAt}`;
|
|
|
1338
1376
|
if (options == null ? void 0 : options.cursor) query.cursor = options.cursor;
|
|
1339
1377
|
if ((options == null ? void 0 : options.minYesPrice) != null) query.minYesPrice = String(options.minYesPrice);
|
|
1340
1378
|
if ((options == null ? void 0 : options.maxYesPrice) != null) query.maxYesPrice = String(options.maxYesPrice);
|
|
1379
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
1380
|
+
query.minVolume = String(options.minVolume);
|
|
1341
1381
|
if (options == null ? void 0 : options.endDateFrom) query.endDateFrom = options.endDateFrom;
|
|
1342
1382
|
if (options == null ? void 0 : options.grouped) query.grouped = "true";
|
|
1343
1383
|
return this.request("/venue-events", {
|
|
@@ -1349,10 +1389,14 @@ Issued At: ${issuedAt}`;
|
|
|
1349
1389
|
/** Get a single venue event by ID. Requires appId or admin auth. */
|
|
1350
1390
|
getEventBootstrap(eventId, options) {
|
|
1351
1391
|
return __async(this, null, function* () {
|
|
1392
|
+
const query = {};
|
|
1393
|
+
if (options == null ? void 0 : options.limit) query.limit = String(options.limit);
|
|
1394
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
1395
|
+
query.minVolume = String(options.minVolume);
|
|
1352
1396
|
return this.request(
|
|
1353
1397
|
`/venue-events/${encodeURIComponent(eventId)}/bootstrap`,
|
|
1354
1398
|
{
|
|
1355
|
-
query: (
|
|
1399
|
+
query: Object.keys(query).length > 0 ? query : void 0,
|
|
1356
1400
|
signal: options == null ? void 0 : options.signal
|
|
1357
1401
|
}
|
|
1358
1402
|
);
|
|
@@ -1364,7 +1408,9 @@ Issued At: ${issuedAt}`;
|
|
|
1364
1408
|
// Opt into the lean response (no embedded `venueMarkets`) — markets are
|
|
1365
1409
|
// fetched separately via GET /venue-markets. Empty `expand` (no `markets`
|
|
1366
1410
|
// token) tells the API to omit the deprecated embedded array.
|
|
1367
|
-
query: __spreadValues(
|
|
1411
|
+
query: __spreadValues(__spreadValues({
|
|
1412
|
+
expand: ""
|
|
1413
|
+
}, (options == null ? void 0 : options.cluster) === false ? { cluster: "false" } : {}), (options == null ? void 0 : options.minVolume) != null && options.minVolume > 0 ? { minVolume: String(options.minVolume) } : {}),
|
|
1368
1414
|
signal: options == null ? void 0 : options.signal
|
|
1369
1415
|
});
|
|
1370
1416
|
});
|
|
@@ -1513,6 +1559,8 @@ Issued At: ${issuedAt}`;
|
|
|
1513
1559
|
if (options == null ? void 0 : options.sortBy) query.sortBy = options.sortBy;
|
|
1514
1560
|
if (options == null ? void 0 : options.sortDir) query.sortDir = options.sortDir;
|
|
1515
1561
|
if (options == null ? void 0 : options.context) query.context = options.context;
|
|
1562
|
+
if ((options == null ? void 0 : options.minVolume) != null && options.minVolume > 0)
|
|
1563
|
+
query.minVolume = String(options.minVolume);
|
|
1516
1564
|
return this.request("/venue-markets", {
|
|
1517
1565
|
query: Object.keys(query).length > 0 ? query : void 0,
|
|
1518
1566
|
signal: requestOptions == null ? void 0 : requestOptions.signal
|
|
@@ -1821,8 +1869,16 @@ Issued At: ${issuedAt}`;
|
|
|
1821
1869
|
if (params.appFeeBips != null) query.appFeeBips = String(params.appFeeBips);
|
|
1822
1870
|
if (params.referrer) query.referrer = params.referrer;
|
|
1823
1871
|
if (params.referrerFeeBips != null) query.referrerFeeBips = String(params.referrerFeeBips);
|
|
1872
|
+
if (params.appFeeBipsByVenue)
|
|
1873
|
+
query.appFeeBipsByVenue = JSON.stringify(params.appFeeBipsByVenue);
|
|
1874
|
+
if (params.referrerFeeBipsByVenue) {
|
|
1875
|
+
query.referrerFeeBipsByVenue = JSON.stringify(params.referrerFeeBipsByVenue);
|
|
1876
|
+
}
|
|
1824
1877
|
if (params.referralPayer) query.referralPayer = params.referralPayer;
|
|
1825
1878
|
if (params.referralPayerAddress) query.referralPayerAddress = params.referralPayerAddress;
|
|
1879
|
+
if (params.referralActivationSponsorAddress) {
|
|
1880
|
+
query.referralActivationSponsorAddress = params.referralActivationSponsorAddress;
|
|
1881
|
+
}
|
|
1826
1882
|
const response = yield this.request(
|
|
1827
1883
|
`/orderbook/${encodeURIComponent(venueMarketOutcomeId)}/route`,
|
|
1828
1884
|
{ query, signal: options == null ? void 0 : options.signal }
|
|
@@ -1892,7 +1948,7 @@ Issued At: ${issuedAt}`;
|
|
|
1892
1948
|
*/
|
|
1893
1949
|
fillSelfCustody(params) {
|
|
1894
1950
|
return __async(this, null, function* () {
|
|
1895
|
-
var _a, _b, _c;
|
|
1951
|
+
var _a, _b, _c, _d;
|
|
1896
1952
|
if (this.signer && !params.signingAddress) {
|
|
1897
1953
|
throw new Error(
|
|
1898
1954
|
"fillSelfCustody requires `signingAddress` \u2014 the wallet that will sign this fill."
|
|
@@ -1941,7 +1997,11 @@ Issued At: ${issuedAt}`;
|
|
|
1941
1997
|
}
|
|
1942
1998
|
lastKey = key;
|
|
1943
1999
|
const signatures = [];
|
|
1944
|
-
|
|
2000
|
+
const ordered = [...pending].sort((a, b) => Number(!!a.optional) - Number(!!b.optional));
|
|
2001
|
+
const userSigners = new Set(
|
|
2002
|
+
[params.signingAddress, ...pending.filter((p) => !p.optional).map((p) => p.signerAddress)].filter((a) => !!a).map((a) => a.toLowerCase())
|
|
2003
|
+
);
|
|
2004
|
+
for (const req of ordered) {
|
|
1945
2005
|
if (Date.now() > new Date(req.expiresAt).getTime()) {
|
|
1946
2006
|
if (req.optional) {
|
|
1947
2007
|
declinedOptional.add(req.stepId);
|
|
@@ -1953,7 +2013,7 @@ Issued At: ${issuedAt}`;
|
|
|
1953
2013
|
}
|
|
1954
2014
|
let signed;
|
|
1955
2015
|
try {
|
|
1956
|
-
signed = yield signer(req);
|
|
2016
|
+
signed = req.optional && !userSigners.has((_c = req.signerAddress) == null ? void 0 : _c.toLowerCase()) ? yield withTimeout(signer(req), OPTIONAL_SIGNATURE_TIMEOUT_MS) : yield signer(req);
|
|
1957
2017
|
} catch (err) {
|
|
1958
2018
|
if (!req.optional) throw err;
|
|
1959
2019
|
declinedOptional.add(req.stepId);
|
|
@@ -1968,7 +2028,7 @@ Issued At: ${issuedAt}`;
|
|
|
1968
2028
|
continue;
|
|
1969
2029
|
}
|
|
1970
2030
|
const next = yield this.submitFillSignatures(quoteId, signatures);
|
|
1971
|
-
pending = (
|
|
2031
|
+
pending = (_d = next.pendingSignatures) != null ? _d : [];
|
|
1972
2032
|
}
|
|
1973
2033
|
});
|
|
1974
2034
|
}
|
|
@@ -2412,6 +2472,7 @@ export {
|
|
|
2412
2472
|
MarketStatus,
|
|
2413
2473
|
MatchStatus,
|
|
2414
2474
|
MatchType,
|
|
2475
|
+
OPTIONAL_SIGNATURE_TIMEOUT_MS,
|
|
2415
2476
|
OrderStatus,
|
|
2416
2477
|
OrderType,
|
|
2417
2478
|
RECURRENCE_CADENCES,
|
package/dist/market-data.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChartBarsResponse } from './agg-websocket-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChartBarsResponse } from './agg-websocket-Bxt9PzTz.mjs';
|
|
2
|
+
export { bD as CandleTail, ci as HistoryRangeRequest, M as MarketDataEngine, cp as MarketView, cq as MarketViewBatch } from './agg-websocket-Bxt9PzTz.mjs';
|
|
3
3
|
|
|
4
4
|
/** Decode bounded dynamic history where processing lives; retain milliseconds and optional mean. */
|
|
5
5
|
declare function decodeChartHistory(payload: string): ChartBarsResponse;
|
package/dist/market-data.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChartBarsResponse } from './agg-websocket-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChartBarsResponse } from './agg-websocket-Bxt9PzTz.js';
|
|
2
|
+
export { bD as CandleTail, ci as HistoryRangeRequest, M as MarketDataEngine, cp as MarketView, cq as MarketViewBatch } from './agg-websocket-Bxt9PzTz.js';
|
|
3
3
|
|
|
4
4
|
/** Decode bounded dynamic history where processing lives; retain milliseconds and optional mean. */
|
|
5
5
|
declare function decodeChartHistory(payload: string): ChartBarsResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.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",
|