@nadohq/nuanze-client 0.46.0 → 0.48.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/README.md +47 -7
- package/dist/{NuanzeClient-DK1Y8O_6.cjs → NuanzeClient-Tl_Dke8Z.cjs} +59 -2
- package/dist/NuanzeClient-Tl_Dke8Z.cjs.map +1 -0
- package/dist/NuanzeClient.cjs +1 -1
- package/dist/NuanzeClient.d.cts +50 -2
- package/dist/NuanzeClient.d.cts.map +1 -1
- package/dist/NuanzeClient.d.ts +50 -2
- package/dist/NuanzeClient.d.ts.map +1 -1
- package/dist/NuanzeClient.js +59 -2
- package/dist/NuanzeClient.js.map +1 -1
- package/dist/{NuanzeServerFailureError-DNZobL5e.d.ts → NuanzeServerFailureError-DpJbwqx9.d.ts} +2 -2
- package/dist/{NuanzeServerFailureError-DNZobL5e.d.ts.map → NuanzeServerFailureError-DpJbwqx9.d.ts.map} +1 -1
- package/dist/{NuanzeServerFailureError-BhwISexo.d.cts → NuanzeServerFailureError-Du6XnrqA.d.cts} +2 -2
- package/dist/{NuanzeServerFailureError-BhwISexo.d.cts.map → NuanzeServerFailureError-Du6XnrqA.d.cts.map} +1 -1
- package/dist/{clientTypes-Dn_aEMkq.d.cts → clientTypes-CX6Rpkyf.d.cts} +126 -2
- package/dist/clientTypes-CX6Rpkyf.d.cts.map +1 -0
- package/dist/{clientTypes-o_pl9igJ.d.ts → clientTypes-Dm5-t7pz.d.ts} +126 -2
- package/dist/clientTypes-Dm5-t7pz.d.ts.map +1 -0
- package/dist/dataMappers.cjs +49 -2
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +24 -4
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +24 -4
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +46 -2
- package/dist/dataMappers.js.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/{serverQueryTypes-CumC-LaJ.d.cts → serverQueryTypes-0DJc4-Oo.d.cts} +32 -2
- package/dist/serverQueryTypes-0DJc4-Oo.d.cts.map +1 -0
- package/dist/{serverQueryTypes-BZPjG_2U.d.ts → serverQueryTypes-qJw753VN.d.ts} +32 -2
- package/dist/serverQueryTypes-qJw753VN.d.ts.map +1 -0
- package/dist/types/NuanzeServerFailureError.d.cts +1 -1
- package/dist/types/NuanzeServerFailureError.d.ts +1 -1
- package/dist/types/clientTypes.d.cts +2 -2
- package/dist/types/clientTypes.d.ts +2 -2
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -2
- package/dist/types/serverQueryTypes.d.ts +2 -2
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/package.json +3 -3
- package/src/NuanzeClient.ts +94 -1
- package/src/dataMappers.ts +72 -1
- package/src/types/clientTypes.ts +132 -0
- package/src/types/serverQueryTypes.ts +33 -0
- package/dist/NuanzeClient-DK1Y8O_6.cjs.map +0 -1
- package/dist/clientTypes-Dn_aEMkq.d.cts.map +0 -1
- package/dist/clientTypes-o_pl9igJ.d.ts.map +0 -1
- package/dist/serverQueryTypes-BZPjG_2U.d.ts.map +0 -1
- package/dist/serverQueryTypes-CumC-LaJ.d.cts.map +0 -1
package/dist/types/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as NuanzeMarket, A as NuanzeCandleInterval, At as NuanzePositioningTotals, B as NuanzeFlowTimeframe, C as NUANZE_PNL_WINDOWS, Ct as NuanzeOpenPositionSortDirection, D as NUANZE_SOURCE_INTERVALS, Dt as NuanzePositionSide, E as NUANZE_SERIES_METRICS, Et as NuanzePnlWindow, F as NuanzeCoverage, Ft as NuanzeStockFundamentals, G as NuanzeFundamentalsSource, H as NuanzeFundamentalsKeyData, I as NuanzeFlowBucket, It as NuanzeSubaccountLeaderboardItem, J as NuanzeFundingRate, K as NuanzeFundamentalsValuation, L as NuanzeFlowEventType, Lt as NuanzeTradeSide, M as NuanzeCohortPositioningCell, Mt as NuanzeSeriesPoint, N as NuanzeCollateralFlow, Nt as NuanzeSidePositioningCell, O as NUANZE_TRADE_SIDES, Ot as NuanzePositioningCellBase, P as NuanzeCollateralFlowPoint, Pt as NuanzeSourceInterval, Q as NuanzeMarginKind, R as NuanzeFlowEventTypeFilter, Rt as NuanzeWalletPosition, S as NUANZE_PLATFORM_WINDOWS, St as NuanzeOpenPosition, T as NUANZE_POSITION_SIDES, Tt as NuanzePlatformWindow, U as NuanzeFundamentalsPerformance, V as NuanzeFollowedLeaderboardItem, W as NuanzeFundamentalsSocial, X as NuanzeLeaderboardItem, Y as NuanzeLatestTicker, Z as NuanzeLeaderboardTimeframe, _ as NUANZE_NEWS_EVENT_TYPES, _t as NuanzeNewsSentiment, a as NUANZE_FLOW_EVENT_TYPES, at as NuanzeMarketPositionSortDirection, b as NUANZE_NOTIONAL_BUCKETS, bt as NuanzeNotionalBucket, c as NUANZE_FUNDAMENTALS_SOURCES, ct as NuanzeMarketPositioningNotionalBucketResponse, d as NUANZE_MARKET_POSITION_SORT_BYS, dt as NuanzeMarketTradingStatus, et as NuanzeMarketComponentUpdatedAt, f as NUANZE_MARKET_POSITION_SORT_DIRECTIONS, ft as NuanzeMarketVenue, g as NUANZE_NEWS_ENTITY_ROLES, gt as NuanzeNewsEventType, h as NUANZE_MIN_POSITION_USDS, ht as NuanzeNewsEntityRole, i as NUANZE_FLOW_BUCKETS, it as NuanzeMarketPositionSortBy, j as NuanzeCohortKey, jt as NuanzeSeriesMetric, k as NuanzeCandle, kt as NuanzePositioningGroupBy, l as NUANZE_LEADERBOARD_TIMEFRAMES, lt as NuanzeMarketPositioningSideResponse, m as NUANZE_MARKET_VENUES, mt as NuanzeNewsEntity, n as NUANZE_COHORT_KEYS, nt as NuanzeMarketIdentity, o as NUANZE_FLOW_EVENT_TYPE_FILTERS, ot as NuanzeMarketPositioningBase, p as NUANZE_MARKET_TRADING_STATUSES, pt as NuanzeMinPositionUsd, q as NuanzeFundingObservation, r as NUANZE_COVERAGES, rt as NuanzeMarketPosition, s as NUANZE_FLOW_TIMEFRAMES, st as NuanzeMarketPositioningCohortResponse, t as NUANZE_CANDLE_INTERVALS, tt as NuanzeMarketDetail, u as NUANZE_MARGIN_KINDS, ut as NuanzeMarketTrade, v as NUANZE_NEWS_SENTIMENTS, vt as NuanzeNewsStory, w as NUANZE_POSITIONING_GROUP_BYS, wt as NuanzePlatformDeltas, x as NUANZE_OPEN_POSITION_SORT_DIRECTIONS, xt as NuanzeNotionalBucketPositioningCell, y as NUANZE_NEWS_TIERS, yt as NuanzeNewsTier, z as NuanzeFlowTags, zt as NuanzeWalletTrade } from "../clientModelTypes-0e6V-2qK.cjs";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as GetNuanzeOpenPositionsResponse, B as GetNuanzeWalletPnlResponse, C as GetNuanzeMarketTradesParams, D as GetNuanzeNewsParams, E as GetNuanzeMarketsResponse, F as GetNuanzeSubaccountLeaderboardPositionResponse, G as GetNuanzeWalletSummaryParams, H as GetNuanzeWalletPnlSeriesResponse, I as GetNuanzeSubaccountLeaderboardResponse, J as GetNuanzeWalletTradesResponse, K as GetNuanzeWalletSummaryResponse, L as GetNuanzeWalletLeaderboardPositionParams, M as GetNuanzePlatformSummaryResponse, N as GetNuanzeSubaccountLeaderboardParams, O as GetNuanzeNewsResponse, P as GetNuanzeSubaccountLeaderboardPositionParams, R as GetNuanzeWalletLeaderboardPositionResponse, S as GetNuanzeMarketPositionsResponse, T as GetNuanzeMarketsParams, U as GetNuanzeWalletPositionsParams, V as GetNuanzeWalletPnlSeriesParams, W as GetNuanzeWalletPositionsResponse, Y as NuanzeMarketSelector, _ as GetNuanzeMarketCandlesParams, a as GetNuanzeCollateralFlowsParams, b as GetNuanzeMarketPositioningResponse, c as GetNuanzeFollowedLeaderboardPositionParams, d as GetNuanzeFundingRatesParams, f as GetNuanzeFundingRatesResponse, g as GetNuanzeMarketByTickerResponse, h as GetNuanzeMarketByTickerParams, i as GetNuanzeCollateralFlowSummaryResponse, j as GetNuanzePlatformSummaryParams, k as GetNuanzeOpenPositionsParams, l as GetNuanzeFollowedLeaderboardPositionResponse, m as GetNuanzeLeaderboardResponse, n as GetNuanzeCollateralFlowSeriesResponse, o as GetNuanzeCollateralFlowsResponse, p as GetNuanzeLeaderboardParams, q as GetNuanzeWalletTradesParams, r as GetNuanzeCollateralFlowSummaryParams, s as GetNuanzeFollowedLeaderboardParams, t as GetNuanzeCollateralFlowSeriesParams, u as GetNuanzeFollowedLeaderboardResponse, v as GetNuanzeMarketCandlesResponse, w as GetNuanzeMarketTradesResponse, x as GetNuanzeMarketPositionsParams, y as GetNuanzeMarketPositioningParams, z as GetNuanzeWalletPnlParams } from "../clientTypes-CX6Rpkyf.cjs";
|
|
3
3
|
import { A as NuanzeServerStockFundamentals, C as NuanzeServerNotionalBucketPositioningCell, D as NuanzeServerPositioningTotals, E as NuanzeServerPositioningCellBase, M as NuanzeServerWalletPosition, N as NuanzeServerWalletTrade, O as NuanzeServerSeriesPoint, S as NuanzeServerMarketTrade, T as NuanzeServerPlatformDeltas, _ as NuanzeServerMarketPositioningBase, a as NuanzeServerFollowedLeaderboardItem, b as NuanzeServerMarketPositioningResponse, c as NuanzeServerFundamentalsSocial, d as NuanzeServerFundingRate, f as NuanzeServerLatestTicker, g as NuanzeServerMarketPosition, h as NuanzeServerMarketDetail, i as NuanzeServerCollateralFlowPoint, j as NuanzeServerSubaccountLeaderboardItem, k as NuanzeServerSidePositioningCell, l as NuanzeServerFundamentalsValuation, m as NuanzeServerMarket, n as NuanzeServerCohortPositioningCell, o as NuanzeServerFundamentalsKeyData, p as NuanzeServerLeaderboardItem, r as NuanzeServerCollateralFlow, s as NuanzeServerFundamentalsPerformance, t as NuanzeServerCandle, u as NuanzeServerFundingObservation, v as NuanzeServerMarketPositioningCohortResponse, w as NuanzeServerOpenPosition, x as NuanzeServerMarketPositioningSideResponse, y as NuanzeServerMarketPositioningNotionalBucketResponse } from "../serverModelTypes-CwgwD-Ig.cjs";
|
|
4
4
|
import { n as NuanzeErrorCode, t as NUANZE_ERROR_CODES } from "../nuanzeErrorCodes-BJA7C7xg.cjs";
|
|
5
|
-
import { S as isNuanzeServerFailureResponse, _ as
|
|
6
|
-
import { t as NuanzeServerFailureError } from "../NuanzeServerFailureError-
|
|
7
|
-
export { GetNuanzeCollateralFlowSeriesParams, GetNuanzeCollateralFlowSeriesResponse, GetNuanzeCollateralFlowSummaryParams, GetNuanzeCollateralFlowSummaryResponse, GetNuanzeCollateralFlowsParams, GetNuanzeCollateralFlowsResponse, GetNuanzeFollowedLeaderboardParams, GetNuanzeFollowedLeaderboardResponse, GetNuanzeFundingRatesParams, GetNuanzeFundingRatesResponse, GetNuanzeLeaderboardParams, GetNuanzeLeaderboardResponse, GetNuanzeMarketByTickerParams, GetNuanzeMarketByTickerResponse, GetNuanzeMarketCandlesParams, GetNuanzeMarketCandlesResponse, GetNuanzeMarketPositioningParams, GetNuanzeMarketPositioningResponse, GetNuanzeMarketPositionsParams, GetNuanzeMarketPositionsResponse, GetNuanzeMarketTradesParams, GetNuanzeMarketTradesResponse, GetNuanzeMarketsParams, GetNuanzeMarketsResponse, GetNuanzeNewsParams, GetNuanzeNewsResponse, GetNuanzeOpenPositionsParams, GetNuanzeOpenPositionsResponse, GetNuanzePlatformSummaryParams, GetNuanzePlatformSummaryResponse, GetNuanzeSubaccountLeaderboardParams, GetNuanzeSubaccountLeaderboardResponse, GetNuanzeWalletPnlParams, GetNuanzeWalletPnlResponse, GetNuanzeWalletPnlSeriesParams, GetNuanzeWalletPnlSeriesResponse, GetNuanzeWalletPositionsParams, GetNuanzeWalletPositionsResponse, GetNuanzeWalletSummaryParams, GetNuanzeWalletSummaryResponse, GetNuanzeWalletTradesParams, GetNuanzeWalletTradesResponse, NUANZE_CANDLE_INTERVALS, NUANZE_COHORT_KEYS, NUANZE_COVERAGES, NUANZE_ERROR_CODES, NUANZE_FLOW_BUCKETS, NUANZE_FLOW_EVENT_TYPES, NUANZE_FLOW_EVENT_TYPE_FILTERS, NUANZE_FLOW_TIMEFRAMES, NUANZE_FUNDAMENTALS_SOURCES, NUANZE_LEADERBOARD_TIMEFRAMES, NUANZE_MARGIN_KINDS, NUANZE_MARKET_POSITION_SORT_BYS, NUANZE_MARKET_POSITION_SORT_DIRECTIONS, NUANZE_MARKET_TRADING_STATUSES, NUANZE_MARKET_VENUES, NUANZE_MIN_POSITION_USDS, NUANZE_NEWS_ENTITY_ROLES, NUANZE_NEWS_EVENT_TYPES, NUANZE_NEWS_SENTIMENTS, NUANZE_NEWS_TIERS, NUANZE_NOTIONAL_BUCKETS, NUANZE_OPEN_POSITION_SORT_DIRECTIONS, NUANZE_PLATFORM_WINDOWS, NUANZE_PNL_WINDOWS, NUANZE_POSITIONING_GROUP_BYS, NUANZE_POSITION_SIDES, NUANZE_SERIES_METRICS, NUANZE_SOURCE_INTERVALS, NUANZE_TRADE_SIDES, NuanzeCandle, NuanzeCandleInterval, NuanzeCohortKey, NuanzeCohortPositioningCell, NuanzeCollateralFlow, NuanzeCollateralFlowPoint, NuanzeCoverage, NuanzeErrorCode, NuanzeFlowBucket, NuanzeFlowEventType, NuanzeFlowEventTypeFilter, NuanzeFlowTags, NuanzeFlowTimeframe, NuanzeFollowedLeaderboardItem, NuanzeFundamentalsKeyData, NuanzeFundamentalsPerformance, NuanzeFundamentalsSocial, NuanzeFundamentalsSource, NuanzeFundamentalsValuation, NuanzeFundingObservation, NuanzeFundingRate, NuanzeLatestTicker, NuanzeLeaderboardItem, NuanzeLeaderboardTimeframe, NuanzeMarginKind, NuanzeMarket, NuanzeMarketComponentUpdatedAt, NuanzeMarketDetail, NuanzeMarketIdentity, NuanzeMarketPosition, NuanzeMarketPositionSortBy, NuanzeMarketPositionSortDirection, NuanzeMarketPositioningBase, NuanzeMarketPositioningCohortResponse, NuanzeMarketPositioningNotionalBucketResponse, NuanzeMarketPositioningSideResponse, NuanzeMarketSelector, NuanzeMarketTrade, NuanzeMarketTradingStatus, NuanzeMarketVenue, NuanzeMinPositionUsd, NuanzeNewsEntity, NuanzeNewsEntityRole, NuanzeNewsEventType, NuanzeNewsSentiment, NuanzeNewsStory, NuanzeNewsTier, NuanzeNotionalBucket, NuanzeNotionalBucketPositioningCell, NuanzeOpenPosition, NuanzeOpenPositionSortDirection, NuanzePlatformDeltas, NuanzePlatformWindow, NuanzePnlWindow, NuanzePositionSide, NuanzePositioningCellBase, NuanzePositioningGroupBy, NuanzePositioningTotals, NuanzeSeriesMetric, NuanzeSeriesPoint, NuanzeServerCandle, NuanzeServerCohortPositioningCell, NuanzeServerCollateralFlow, NuanzeServerCollateralFlowPoint, NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureError, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardItem, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundamentalsKeyData, NuanzeServerFundamentalsPerformance, NuanzeServerFundamentalsSocial, NuanzeServerFundamentalsValuation, NuanzeServerFundingObservation, NuanzeServerFundingRate, NuanzeServerFundingRatesResponse, NuanzeServerLatestTicker, NuanzeServerLeaderboardItem, NuanzeServerLeaderboardResponse, NuanzeServerMarket, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketDetail, NuanzeServerMarketPosition, NuanzeServerMarketPositioningBase, NuanzeServerMarketPositioningCohortResponse, NuanzeServerMarketPositioningNotionalBucketResponse, NuanzeServerMarketPositioningResponse, NuanzeServerMarketPositioningSideResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTrade, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerNotionalBucketPositioningCell, NuanzeServerOpenPosition, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformDeltas, NuanzeServerPlatformSummaryResponse, NuanzeServerPositioningCellBase, NuanzeServerPositioningTotals, NuanzeServerSeriesPoint, NuanzeServerSidePositioningCell, NuanzeServerStockFundamentals, NuanzeServerSubaccountLeaderboardItem, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPosition, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTrade, NuanzeServerWalletTradesResponse, NuanzeSidePositioningCell, NuanzeSourceInterval, NuanzeStockFundamentals, NuanzeSubaccountLeaderboardItem, NuanzeTradeSide, NuanzeWalletPosition, NuanzeWalletTrade, isNuanzeServerFailureResponse };
|
|
5
|
+
import { C as NuanzeServerWalletSummaryResponse, S as NuanzeServerWalletPositionsResponse, T as isNuanzeServerFailureResponse, _ as NuanzeServerSubaccountLeaderboardPositionResponse, a as NuanzeServerFollowedLeaderboardPositionResponse, b as NuanzeServerWalletPnlResponse, c as NuanzeServerLeaderboardResponse, d as NuanzeServerMarketPositionsResponse, f as NuanzeServerMarketTradesResponse, g as NuanzeServerPlatformSummaryResponse, h as NuanzeServerOpenPositionsResponse, i as NuanzeServerFailureResponse, l as NuanzeServerMarketByTickerResponse, m as NuanzeServerNewsResponse, n as NuanzeServerCollateralFlowSummaryResponse, o as NuanzeServerFollowedLeaderboardResponse, p as NuanzeServerMarketsResponse, r as NuanzeServerCollateralFlowsResponse, s as NuanzeServerFundingRatesResponse, t as NuanzeServerCollateralFlowSeriesResponse, u as NuanzeServerMarketCandlesResponse, v as NuanzeServerSubaccountLeaderboardResponse, w as NuanzeServerWalletTradesResponse, x as NuanzeServerWalletPnlSeriesResponse, y as NuanzeServerWalletLeaderboardPositionResponse } from "../serverQueryTypes-0DJc4-Oo.cjs";
|
|
6
|
+
import { t as NuanzeServerFailureError } from "../NuanzeServerFailureError-Du6XnrqA.cjs";
|
|
7
|
+
export { GetNuanzeCollateralFlowSeriesParams, GetNuanzeCollateralFlowSeriesResponse, GetNuanzeCollateralFlowSummaryParams, GetNuanzeCollateralFlowSummaryResponse, GetNuanzeCollateralFlowsParams, GetNuanzeCollateralFlowsResponse, GetNuanzeFollowedLeaderboardParams, GetNuanzeFollowedLeaderboardPositionParams, GetNuanzeFollowedLeaderboardPositionResponse, GetNuanzeFollowedLeaderboardResponse, GetNuanzeFundingRatesParams, GetNuanzeFundingRatesResponse, GetNuanzeLeaderboardParams, GetNuanzeLeaderboardResponse, GetNuanzeMarketByTickerParams, GetNuanzeMarketByTickerResponse, GetNuanzeMarketCandlesParams, GetNuanzeMarketCandlesResponse, GetNuanzeMarketPositioningParams, GetNuanzeMarketPositioningResponse, GetNuanzeMarketPositionsParams, GetNuanzeMarketPositionsResponse, GetNuanzeMarketTradesParams, GetNuanzeMarketTradesResponse, GetNuanzeMarketsParams, GetNuanzeMarketsResponse, GetNuanzeNewsParams, GetNuanzeNewsResponse, GetNuanzeOpenPositionsParams, GetNuanzeOpenPositionsResponse, GetNuanzePlatformSummaryParams, GetNuanzePlatformSummaryResponse, GetNuanzeSubaccountLeaderboardParams, GetNuanzeSubaccountLeaderboardPositionParams, GetNuanzeSubaccountLeaderboardPositionResponse, GetNuanzeSubaccountLeaderboardResponse, GetNuanzeWalletLeaderboardPositionParams, GetNuanzeWalletLeaderboardPositionResponse, GetNuanzeWalletPnlParams, GetNuanzeWalletPnlResponse, GetNuanzeWalletPnlSeriesParams, GetNuanzeWalletPnlSeriesResponse, GetNuanzeWalletPositionsParams, GetNuanzeWalletPositionsResponse, GetNuanzeWalletSummaryParams, GetNuanzeWalletSummaryResponse, GetNuanzeWalletTradesParams, GetNuanzeWalletTradesResponse, NUANZE_CANDLE_INTERVALS, NUANZE_COHORT_KEYS, NUANZE_COVERAGES, NUANZE_ERROR_CODES, NUANZE_FLOW_BUCKETS, NUANZE_FLOW_EVENT_TYPES, NUANZE_FLOW_EVENT_TYPE_FILTERS, NUANZE_FLOW_TIMEFRAMES, NUANZE_FUNDAMENTALS_SOURCES, NUANZE_LEADERBOARD_TIMEFRAMES, NUANZE_MARGIN_KINDS, NUANZE_MARKET_POSITION_SORT_BYS, NUANZE_MARKET_POSITION_SORT_DIRECTIONS, NUANZE_MARKET_TRADING_STATUSES, NUANZE_MARKET_VENUES, NUANZE_MIN_POSITION_USDS, NUANZE_NEWS_ENTITY_ROLES, NUANZE_NEWS_EVENT_TYPES, NUANZE_NEWS_SENTIMENTS, NUANZE_NEWS_TIERS, NUANZE_NOTIONAL_BUCKETS, NUANZE_OPEN_POSITION_SORT_DIRECTIONS, NUANZE_PLATFORM_WINDOWS, NUANZE_PNL_WINDOWS, NUANZE_POSITIONING_GROUP_BYS, NUANZE_POSITION_SIDES, NUANZE_SERIES_METRICS, NUANZE_SOURCE_INTERVALS, NUANZE_TRADE_SIDES, NuanzeCandle, NuanzeCandleInterval, NuanzeCohortKey, NuanzeCohortPositioningCell, NuanzeCollateralFlow, NuanzeCollateralFlowPoint, NuanzeCoverage, NuanzeErrorCode, NuanzeFlowBucket, NuanzeFlowEventType, NuanzeFlowEventTypeFilter, NuanzeFlowTags, NuanzeFlowTimeframe, NuanzeFollowedLeaderboardItem, NuanzeFundamentalsKeyData, NuanzeFundamentalsPerformance, NuanzeFundamentalsSocial, NuanzeFundamentalsSource, NuanzeFundamentalsValuation, NuanzeFundingObservation, NuanzeFundingRate, NuanzeLatestTicker, NuanzeLeaderboardItem, NuanzeLeaderboardTimeframe, NuanzeMarginKind, NuanzeMarket, NuanzeMarketComponentUpdatedAt, NuanzeMarketDetail, NuanzeMarketIdentity, NuanzeMarketPosition, NuanzeMarketPositionSortBy, NuanzeMarketPositionSortDirection, NuanzeMarketPositioningBase, NuanzeMarketPositioningCohortResponse, NuanzeMarketPositioningNotionalBucketResponse, NuanzeMarketPositioningSideResponse, NuanzeMarketSelector, NuanzeMarketTrade, NuanzeMarketTradingStatus, NuanzeMarketVenue, NuanzeMinPositionUsd, NuanzeNewsEntity, NuanzeNewsEntityRole, NuanzeNewsEventType, NuanzeNewsSentiment, NuanzeNewsStory, NuanzeNewsTier, NuanzeNotionalBucket, NuanzeNotionalBucketPositioningCell, NuanzeOpenPosition, NuanzeOpenPositionSortDirection, NuanzePlatformDeltas, NuanzePlatformWindow, NuanzePnlWindow, NuanzePositionSide, NuanzePositioningCellBase, NuanzePositioningGroupBy, NuanzePositioningTotals, NuanzeSeriesMetric, NuanzeSeriesPoint, NuanzeServerCandle, NuanzeServerCohortPositioningCell, NuanzeServerCollateralFlow, NuanzeServerCollateralFlowPoint, NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureError, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardItem, NuanzeServerFollowedLeaderboardPositionResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundamentalsKeyData, NuanzeServerFundamentalsPerformance, NuanzeServerFundamentalsSocial, NuanzeServerFundamentalsValuation, NuanzeServerFundingObservation, NuanzeServerFundingRate, NuanzeServerFundingRatesResponse, NuanzeServerLatestTicker, NuanzeServerLeaderboardItem, NuanzeServerLeaderboardResponse, NuanzeServerMarket, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketDetail, NuanzeServerMarketPosition, NuanzeServerMarketPositioningBase, NuanzeServerMarketPositioningCohortResponse, NuanzeServerMarketPositioningNotionalBucketResponse, NuanzeServerMarketPositioningResponse, NuanzeServerMarketPositioningSideResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTrade, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerNotionalBucketPositioningCell, NuanzeServerOpenPosition, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformDeltas, NuanzeServerPlatformSummaryResponse, NuanzeServerPositioningCellBase, NuanzeServerPositioningTotals, NuanzeServerSeriesPoint, NuanzeServerSidePositioningCell, NuanzeServerStockFundamentals, NuanzeServerSubaccountLeaderboardItem, NuanzeServerSubaccountLeaderboardPositionResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletLeaderboardPositionResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPosition, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTrade, NuanzeServerWalletTradesResponse, NuanzeSidePositioningCell, NuanzeSourceInterval, NuanzeStockFundamentals, NuanzeSubaccountLeaderboardItem, NuanzeTradeSide, NuanzeWalletPosition, NuanzeWalletTrade, isNuanzeServerFailureResponse };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as NuanzeMarket, A as NuanzeCandleInterval, At as NuanzePositioningTotals, B as NuanzeFlowTimeframe, C as NUANZE_PNL_WINDOWS, Ct as NuanzeOpenPositionSortDirection, D as NUANZE_SOURCE_INTERVALS, Dt as NuanzePositionSide, E as NUANZE_SERIES_METRICS, Et as NuanzePnlWindow, F as NuanzeCoverage, Ft as NuanzeStockFundamentals, G as NuanzeFundamentalsSource, H as NuanzeFundamentalsKeyData, I as NuanzeFlowBucket, It as NuanzeSubaccountLeaderboardItem, J as NuanzeFundingRate, K as NuanzeFundamentalsValuation, L as NuanzeFlowEventType, Lt as NuanzeTradeSide, M as NuanzeCohortPositioningCell, Mt as NuanzeSeriesPoint, N as NuanzeCollateralFlow, Nt as NuanzeSidePositioningCell, O as NUANZE_TRADE_SIDES, Ot as NuanzePositioningCellBase, P as NuanzeCollateralFlowPoint, Pt as NuanzeSourceInterval, Q as NuanzeMarginKind, R as NuanzeFlowEventTypeFilter, Rt as NuanzeWalletPosition, S as NUANZE_PLATFORM_WINDOWS, St as NuanzeOpenPosition, T as NUANZE_POSITION_SIDES, Tt as NuanzePlatformWindow, U as NuanzeFundamentalsPerformance, V as NuanzeFollowedLeaderboardItem, W as NuanzeFundamentalsSocial, X as NuanzeLeaderboardItem, Y as NuanzeLatestTicker, Z as NuanzeLeaderboardTimeframe, _ as NUANZE_NEWS_EVENT_TYPES, _t as NuanzeNewsSentiment, a as NUANZE_FLOW_EVENT_TYPES, at as NuanzeMarketPositionSortDirection, b as NUANZE_NOTIONAL_BUCKETS, bt as NuanzeNotionalBucket, c as NUANZE_FUNDAMENTALS_SOURCES, ct as NuanzeMarketPositioningNotionalBucketResponse, d as NUANZE_MARKET_POSITION_SORT_BYS, dt as NuanzeMarketTradingStatus, et as NuanzeMarketComponentUpdatedAt, f as NUANZE_MARKET_POSITION_SORT_DIRECTIONS, ft as NuanzeMarketVenue, g as NUANZE_NEWS_ENTITY_ROLES, gt as NuanzeNewsEventType, h as NUANZE_MIN_POSITION_USDS, ht as NuanzeNewsEntityRole, i as NUANZE_FLOW_BUCKETS, it as NuanzeMarketPositionSortBy, j as NuanzeCohortKey, jt as NuanzeSeriesMetric, k as NuanzeCandle, kt as NuanzePositioningGroupBy, l as NUANZE_LEADERBOARD_TIMEFRAMES, lt as NuanzeMarketPositioningSideResponse, m as NUANZE_MARKET_VENUES, mt as NuanzeNewsEntity, n as NUANZE_COHORT_KEYS, nt as NuanzeMarketIdentity, o as NUANZE_FLOW_EVENT_TYPE_FILTERS, ot as NuanzeMarketPositioningBase, p as NUANZE_MARKET_TRADING_STATUSES, pt as NuanzeMinPositionUsd, q as NuanzeFundingObservation, r as NUANZE_COVERAGES, rt as NuanzeMarketPosition, s as NUANZE_FLOW_TIMEFRAMES, st as NuanzeMarketPositioningCohortResponse, t as NUANZE_CANDLE_INTERVALS, tt as NuanzeMarketDetail, u as NUANZE_MARGIN_KINDS, ut as NuanzeMarketTrade, v as NUANZE_NEWS_SENTIMENTS, vt as NuanzeNewsStory, w as NUANZE_POSITIONING_GROUP_BYS, wt as NuanzePlatformDeltas, x as NUANZE_OPEN_POSITION_SORT_DIRECTIONS, xt as NuanzeNotionalBucketPositioningCell, y as NUANZE_NEWS_TIERS, yt as NuanzeNewsTier, z as NuanzeFlowTags, zt as NuanzeWalletTrade } from "../clientModelTypes-Ck_xwS0G.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as GetNuanzeOpenPositionsResponse, B as GetNuanzeWalletPnlResponse, C as GetNuanzeMarketTradesParams, D as GetNuanzeNewsParams, E as GetNuanzeMarketsResponse, F as GetNuanzeSubaccountLeaderboardPositionResponse, G as GetNuanzeWalletSummaryParams, H as GetNuanzeWalletPnlSeriesResponse, I as GetNuanzeSubaccountLeaderboardResponse, J as GetNuanzeWalletTradesResponse, K as GetNuanzeWalletSummaryResponse, L as GetNuanzeWalletLeaderboardPositionParams, M as GetNuanzePlatformSummaryResponse, N as GetNuanzeSubaccountLeaderboardParams, O as GetNuanzeNewsResponse, P as GetNuanzeSubaccountLeaderboardPositionParams, R as GetNuanzeWalletLeaderboardPositionResponse, S as GetNuanzeMarketPositionsResponse, T as GetNuanzeMarketsParams, U as GetNuanzeWalletPositionsParams, V as GetNuanzeWalletPnlSeriesParams, W as GetNuanzeWalletPositionsResponse, Y as NuanzeMarketSelector, _ as GetNuanzeMarketCandlesParams, a as GetNuanzeCollateralFlowsParams, b as GetNuanzeMarketPositioningResponse, c as GetNuanzeFollowedLeaderboardPositionParams, d as GetNuanzeFundingRatesParams, f as GetNuanzeFundingRatesResponse, g as GetNuanzeMarketByTickerResponse, h as GetNuanzeMarketByTickerParams, i as GetNuanzeCollateralFlowSummaryResponse, j as GetNuanzePlatformSummaryParams, k as GetNuanzeOpenPositionsParams, l as GetNuanzeFollowedLeaderboardPositionResponse, m as GetNuanzeLeaderboardResponse, n as GetNuanzeCollateralFlowSeriesResponse, o as GetNuanzeCollateralFlowsResponse, p as GetNuanzeLeaderboardParams, q as GetNuanzeWalletTradesParams, r as GetNuanzeCollateralFlowSummaryParams, s as GetNuanzeFollowedLeaderboardParams, t as GetNuanzeCollateralFlowSeriesParams, u as GetNuanzeFollowedLeaderboardResponse, v as GetNuanzeMarketCandlesResponse, w as GetNuanzeMarketTradesResponse, x as GetNuanzeMarketPositionsParams, y as GetNuanzeMarketPositioningParams, z as GetNuanzeWalletPnlParams } from "../clientTypes-Dm5-t7pz.js";
|
|
3
3
|
import { A as NuanzeServerStockFundamentals, C as NuanzeServerNotionalBucketPositioningCell, D as NuanzeServerPositioningTotals, E as NuanzeServerPositioningCellBase, M as NuanzeServerWalletPosition, N as NuanzeServerWalletTrade, O as NuanzeServerSeriesPoint, S as NuanzeServerMarketTrade, T as NuanzeServerPlatformDeltas, _ as NuanzeServerMarketPositioningBase, a as NuanzeServerFollowedLeaderboardItem, b as NuanzeServerMarketPositioningResponse, c as NuanzeServerFundamentalsSocial, d as NuanzeServerFundingRate, f as NuanzeServerLatestTicker, g as NuanzeServerMarketPosition, h as NuanzeServerMarketDetail, i as NuanzeServerCollateralFlowPoint, j as NuanzeServerSubaccountLeaderboardItem, k as NuanzeServerSidePositioningCell, l as NuanzeServerFundamentalsValuation, m as NuanzeServerMarket, n as NuanzeServerCohortPositioningCell, o as NuanzeServerFundamentalsKeyData, p as NuanzeServerLeaderboardItem, r as NuanzeServerCollateralFlow, s as NuanzeServerFundamentalsPerformance, t as NuanzeServerCandle, u as NuanzeServerFundingObservation, v as NuanzeServerMarketPositioningCohortResponse, w as NuanzeServerOpenPosition, x as NuanzeServerMarketPositioningSideResponse, y as NuanzeServerMarketPositioningNotionalBucketResponse } from "../serverModelTypes-zBIYazFf.js";
|
|
4
4
|
import { n as NuanzeErrorCode, t as NUANZE_ERROR_CODES } from "../nuanzeErrorCodes-BXfbZV_p.js";
|
|
5
|
-
import { S as isNuanzeServerFailureResponse, _ as
|
|
6
|
-
import { t as NuanzeServerFailureError } from "../NuanzeServerFailureError-
|
|
7
|
-
export { GetNuanzeCollateralFlowSeriesParams, GetNuanzeCollateralFlowSeriesResponse, GetNuanzeCollateralFlowSummaryParams, GetNuanzeCollateralFlowSummaryResponse, GetNuanzeCollateralFlowsParams, GetNuanzeCollateralFlowsResponse, GetNuanzeFollowedLeaderboardParams, GetNuanzeFollowedLeaderboardResponse, GetNuanzeFundingRatesParams, GetNuanzeFundingRatesResponse, GetNuanzeLeaderboardParams, GetNuanzeLeaderboardResponse, GetNuanzeMarketByTickerParams, GetNuanzeMarketByTickerResponse, GetNuanzeMarketCandlesParams, GetNuanzeMarketCandlesResponse, GetNuanzeMarketPositioningParams, GetNuanzeMarketPositioningResponse, GetNuanzeMarketPositionsParams, GetNuanzeMarketPositionsResponse, GetNuanzeMarketTradesParams, GetNuanzeMarketTradesResponse, GetNuanzeMarketsParams, GetNuanzeMarketsResponse, GetNuanzeNewsParams, GetNuanzeNewsResponse, GetNuanzeOpenPositionsParams, GetNuanzeOpenPositionsResponse, GetNuanzePlatformSummaryParams, GetNuanzePlatformSummaryResponse, GetNuanzeSubaccountLeaderboardParams, GetNuanzeSubaccountLeaderboardResponse, GetNuanzeWalletPnlParams, GetNuanzeWalletPnlResponse, GetNuanzeWalletPnlSeriesParams, GetNuanzeWalletPnlSeriesResponse, GetNuanzeWalletPositionsParams, GetNuanzeWalletPositionsResponse, GetNuanzeWalletSummaryParams, GetNuanzeWalletSummaryResponse, GetNuanzeWalletTradesParams, GetNuanzeWalletTradesResponse, NUANZE_CANDLE_INTERVALS, NUANZE_COHORT_KEYS, NUANZE_COVERAGES, NUANZE_ERROR_CODES, NUANZE_FLOW_BUCKETS, NUANZE_FLOW_EVENT_TYPES, NUANZE_FLOW_EVENT_TYPE_FILTERS, NUANZE_FLOW_TIMEFRAMES, NUANZE_FUNDAMENTALS_SOURCES, NUANZE_LEADERBOARD_TIMEFRAMES, NUANZE_MARGIN_KINDS, NUANZE_MARKET_POSITION_SORT_BYS, NUANZE_MARKET_POSITION_SORT_DIRECTIONS, NUANZE_MARKET_TRADING_STATUSES, NUANZE_MARKET_VENUES, NUANZE_MIN_POSITION_USDS, NUANZE_NEWS_ENTITY_ROLES, NUANZE_NEWS_EVENT_TYPES, NUANZE_NEWS_SENTIMENTS, NUANZE_NEWS_TIERS, NUANZE_NOTIONAL_BUCKETS, NUANZE_OPEN_POSITION_SORT_DIRECTIONS, NUANZE_PLATFORM_WINDOWS, NUANZE_PNL_WINDOWS, NUANZE_POSITIONING_GROUP_BYS, NUANZE_POSITION_SIDES, NUANZE_SERIES_METRICS, NUANZE_SOURCE_INTERVALS, NUANZE_TRADE_SIDES, NuanzeCandle, NuanzeCandleInterval, NuanzeCohortKey, NuanzeCohortPositioningCell, NuanzeCollateralFlow, NuanzeCollateralFlowPoint, NuanzeCoverage, NuanzeErrorCode, NuanzeFlowBucket, NuanzeFlowEventType, NuanzeFlowEventTypeFilter, NuanzeFlowTags, NuanzeFlowTimeframe, NuanzeFollowedLeaderboardItem, NuanzeFundamentalsKeyData, NuanzeFundamentalsPerformance, NuanzeFundamentalsSocial, NuanzeFundamentalsSource, NuanzeFundamentalsValuation, NuanzeFundingObservation, NuanzeFundingRate, NuanzeLatestTicker, NuanzeLeaderboardItem, NuanzeLeaderboardTimeframe, NuanzeMarginKind, NuanzeMarket, NuanzeMarketComponentUpdatedAt, NuanzeMarketDetail, NuanzeMarketIdentity, NuanzeMarketPosition, NuanzeMarketPositionSortBy, NuanzeMarketPositionSortDirection, NuanzeMarketPositioningBase, NuanzeMarketPositioningCohortResponse, NuanzeMarketPositioningNotionalBucketResponse, NuanzeMarketPositioningSideResponse, NuanzeMarketSelector, NuanzeMarketTrade, NuanzeMarketTradingStatus, NuanzeMarketVenue, NuanzeMinPositionUsd, NuanzeNewsEntity, NuanzeNewsEntityRole, NuanzeNewsEventType, NuanzeNewsSentiment, NuanzeNewsStory, NuanzeNewsTier, NuanzeNotionalBucket, NuanzeNotionalBucketPositioningCell, NuanzeOpenPosition, NuanzeOpenPositionSortDirection, NuanzePlatformDeltas, NuanzePlatformWindow, NuanzePnlWindow, NuanzePositionSide, NuanzePositioningCellBase, NuanzePositioningGroupBy, NuanzePositioningTotals, NuanzeSeriesMetric, NuanzeSeriesPoint, NuanzeServerCandle, NuanzeServerCohortPositioningCell, NuanzeServerCollateralFlow, NuanzeServerCollateralFlowPoint, NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureError, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardItem, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundamentalsKeyData, NuanzeServerFundamentalsPerformance, NuanzeServerFundamentalsSocial, NuanzeServerFundamentalsValuation, NuanzeServerFundingObservation, NuanzeServerFundingRate, NuanzeServerFundingRatesResponse, NuanzeServerLatestTicker, NuanzeServerLeaderboardItem, NuanzeServerLeaderboardResponse, NuanzeServerMarket, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketDetail, NuanzeServerMarketPosition, NuanzeServerMarketPositioningBase, NuanzeServerMarketPositioningCohortResponse, NuanzeServerMarketPositioningNotionalBucketResponse, NuanzeServerMarketPositioningResponse, NuanzeServerMarketPositioningSideResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTrade, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerNotionalBucketPositioningCell, NuanzeServerOpenPosition, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformDeltas, NuanzeServerPlatformSummaryResponse, NuanzeServerPositioningCellBase, NuanzeServerPositioningTotals, NuanzeServerSeriesPoint, NuanzeServerSidePositioningCell, NuanzeServerStockFundamentals, NuanzeServerSubaccountLeaderboardItem, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPosition, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTrade, NuanzeServerWalletTradesResponse, NuanzeSidePositioningCell, NuanzeSourceInterval, NuanzeStockFundamentals, NuanzeSubaccountLeaderboardItem, NuanzeTradeSide, NuanzeWalletPosition, NuanzeWalletTrade, isNuanzeServerFailureResponse };
|
|
5
|
+
import { C as NuanzeServerWalletSummaryResponse, S as NuanzeServerWalletPositionsResponse, T as isNuanzeServerFailureResponse, _ as NuanzeServerSubaccountLeaderboardPositionResponse, a as NuanzeServerFollowedLeaderboardPositionResponse, b as NuanzeServerWalletPnlResponse, c as NuanzeServerLeaderboardResponse, d as NuanzeServerMarketPositionsResponse, f as NuanzeServerMarketTradesResponse, g as NuanzeServerPlatformSummaryResponse, h as NuanzeServerOpenPositionsResponse, i as NuanzeServerFailureResponse, l as NuanzeServerMarketByTickerResponse, m as NuanzeServerNewsResponse, n as NuanzeServerCollateralFlowSummaryResponse, o as NuanzeServerFollowedLeaderboardResponse, p as NuanzeServerMarketsResponse, r as NuanzeServerCollateralFlowsResponse, s as NuanzeServerFundingRatesResponse, t as NuanzeServerCollateralFlowSeriesResponse, u as NuanzeServerMarketCandlesResponse, v as NuanzeServerSubaccountLeaderboardResponse, w as NuanzeServerWalletTradesResponse, x as NuanzeServerWalletPnlSeriesResponse, y as NuanzeServerWalletLeaderboardPositionResponse } from "../serverQueryTypes-qJw753VN.js";
|
|
6
|
+
import { t as NuanzeServerFailureError } from "../NuanzeServerFailureError-DpJbwqx9.js";
|
|
7
|
+
export { GetNuanzeCollateralFlowSeriesParams, GetNuanzeCollateralFlowSeriesResponse, GetNuanzeCollateralFlowSummaryParams, GetNuanzeCollateralFlowSummaryResponse, GetNuanzeCollateralFlowsParams, GetNuanzeCollateralFlowsResponse, GetNuanzeFollowedLeaderboardParams, GetNuanzeFollowedLeaderboardPositionParams, GetNuanzeFollowedLeaderboardPositionResponse, GetNuanzeFollowedLeaderboardResponse, GetNuanzeFundingRatesParams, GetNuanzeFundingRatesResponse, GetNuanzeLeaderboardParams, GetNuanzeLeaderboardResponse, GetNuanzeMarketByTickerParams, GetNuanzeMarketByTickerResponse, GetNuanzeMarketCandlesParams, GetNuanzeMarketCandlesResponse, GetNuanzeMarketPositioningParams, GetNuanzeMarketPositioningResponse, GetNuanzeMarketPositionsParams, GetNuanzeMarketPositionsResponse, GetNuanzeMarketTradesParams, GetNuanzeMarketTradesResponse, GetNuanzeMarketsParams, GetNuanzeMarketsResponse, GetNuanzeNewsParams, GetNuanzeNewsResponse, GetNuanzeOpenPositionsParams, GetNuanzeOpenPositionsResponse, GetNuanzePlatformSummaryParams, GetNuanzePlatformSummaryResponse, GetNuanzeSubaccountLeaderboardParams, GetNuanzeSubaccountLeaderboardPositionParams, GetNuanzeSubaccountLeaderboardPositionResponse, GetNuanzeSubaccountLeaderboardResponse, GetNuanzeWalletLeaderboardPositionParams, GetNuanzeWalletLeaderboardPositionResponse, GetNuanzeWalletPnlParams, GetNuanzeWalletPnlResponse, GetNuanzeWalletPnlSeriesParams, GetNuanzeWalletPnlSeriesResponse, GetNuanzeWalletPositionsParams, GetNuanzeWalletPositionsResponse, GetNuanzeWalletSummaryParams, GetNuanzeWalletSummaryResponse, GetNuanzeWalletTradesParams, GetNuanzeWalletTradesResponse, NUANZE_CANDLE_INTERVALS, NUANZE_COHORT_KEYS, NUANZE_COVERAGES, NUANZE_ERROR_CODES, NUANZE_FLOW_BUCKETS, NUANZE_FLOW_EVENT_TYPES, NUANZE_FLOW_EVENT_TYPE_FILTERS, NUANZE_FLOW_TIMEFRAMES, NUANZE_FUNDAMENTALS_SOURCES, NUANZE_LEADERBOARD_TIMEFRAMES, NUANZE_MARGIN_KINDS, NUANZE_MARKET_POSITION_SORT_BYS, NUANZE_MARKET_POSITION_SORT_DIRECTIONS, NUANZE_MARKET_TRADING_STATUSES, NUANZE_MARKET_VENUES, NUANZE_MIN_POSITION_USDS, NUANZE_NEWS_ENTITY_ROLES, NUANZE_NEWS_EVENT_TYPES, NUANZE_NEWS_SENTIMENTS, NUANZE_NEWS_TIERS, NUANZE_NOTIONAL_BUCKETS, NUANZE_OPEN_POSITION_SORT_DIRECTIONS, NUANZE_PLATFORM_WINDOWS, NUANZE_PNL_WINDOWS, NUANZE_POSITIONING_GROUP_BYS, NUANZE_POSITION_SIDES, NUANZE_SERIES_METRICS, NUANZE_SOURCE_INTERVALS, NUANZE_TRADE_SIDES, NuanzeCandle, NuanzeCandleInterval, NuanzeCohortKey, NuanzeCohortPositioningCell, NuanzeCollateralFlow, NuanzeCollateralFlowPoint, NuanzeCoverage, NuanzeErrorCode, NuanzeFlowBucket, NuanzeFlowEventType, NuanzeFlowEventTypeFilter, NuanzeFlowTags, NuanzeFlowTimeframe, NuanzeFollowedLeaderboardItem, NuanzeFundamentalsKeyData, NuanzeFundamentalsPerformance, NuanzeFundamentalsSocial, NuanzeFundamentalsSource, NuanzeFundamentalsValuation, NuanzeFundingObservation, NuanzeFundingRate, NuanzeLatestTicker, NuanzeLeaderboardItem, NuanzeLeaderboardTimeframe, NuanzeMarginKind, NuanzeMarket, NuanzeMarketComponentUpdatedAt, NuanzeMarketDetail, NuanzeMarketIdentity, NuanzeMarketPosition, NuanzeMarketPositionSortBy, NuanzeMarketPositionSortDirection, NuanzeMarketPositioningBase, NuanzeMarketPositioningCohortResponse, NuanzeMarketPositioningNotionalBucketResponse, NuanzeMarketPositioningSideResponse, NuanzeMarketSelector, NuanzeMarketTrade, NuanzeMarketTradingStatus, NuanzeMarketVenue, NuanzeMinPositionUsd, NuanzeNewsEntity, NuanzeNewsEntityRole, NuanzeNewsEventType, NuanzeNewsSentiment, NuanzeNewsStory, NuanzeNewsTier, NuanzeNotionalBucket, NuanzeNotionalBucketPositioningCell, NuanzeOpenPosition, NuanzeOpenPositionSortDirection, NuanzePlatformDeltas, NuanzePlatformWindow, NuanzePnlWindow, NuanzePositionSide, NuanzePositioningCellBase, NuanzePositioningGroupBy, NuanzePositioningTotals, NuanzeSeriesMetric, NuanzeSeriesPoint, NuanzeServerCandle, NuanzeServerCohortPositioningCell, NuanzeServerCollateralFlow, NuanzeServerCollateralFlowPoint, NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureError, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardItem, NuanzeServerFollowedLeaderboardPositionResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundamentalsKeyData, NuanzeServerFundamentalsPerformance, NuanzeServerFundamentalsSocial, NuanzeServerFundamentalsValuation, NuanzeServerFundingObservation, NuanzeServerFundingRate, NuanzeServerFundingRatesResponse, NuanzeServerLatestTicker, NuanzeServerLeaderboardItem, NuanzeServerLeaderboardResponse, NuanzeServerMarket, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketDetail, NuanzeServerMarketPosition, NuanzeServerMarketPositioningBase, NuanzeServerMarketPositioningCohortResponse, NuanzeServerMarketPositioningNotionalBucketResponse, NuanzeServerMarketPositioningResponse, NuanzeServerMarketPositioningSideResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTrade, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerNotionalBucketPositioningCell, NuanzeServerOpenPosition, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformDeltas, NuanzeServerPlatformSummaryResponse, NuanzeServerPositioningCellBase, NuanzeServerPositioningTotals, NuanzeServerSeriesPoint, NuanzeServerSidePositioningCell, NuanzeServerStockFundamentals, NuanzeServerSubaccountLeaderboardItem, NuanzeServerSubaccountLeaderboardPositionResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletLeaderboardPositionResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPosition, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTrade, NuanzeServerWalletTradesResponse, NuanzeSidePositioningCell, NuanzeSourceInterval, NuanzeStockFundamentals, NuanzeSubaccountLeaderboardItem, NuanzeTradeSide, NuanzeWalletPosition, NuanzeWalletTrade, isNuanzeServerFailureResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverQueryTypes.cjs","names":[],"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import type {\n NuanzeCandleInterval,\n NuanzeCoverage,\n NuanzeFlowBucket,\n NuanzeFlowTimeframe,\n NuanzeLeaderboardTimeframe,\n NuanzeMarketVenue,\n NuanzePlatformWindow,\n NuanzePnlWindow,\n NuanzeSeriesMetric,\n NuanzeSourceInterval,\n} from './clientModelTypes';\nimport { NuanzeNewsStory } from './clientModelTypes';\nimport { NuanzeErrorCode } from './nuanzeErrorCodes';\nimport {\n NuanzeServerCandle,\n NuanzeServerCollateralFlow,\n NuanzeServerCollateralFlowPoint,\n NuanzeServerFollowedLeaderboardItem,\n NuanzeServerFundingRate,\n NuanzeServerLeaderboardItem,\n NuanzeServerMarket,\n NuanzeServerMarketDetail,\n NuanzeServerMarketPosition,\n NuanzeServerMarketTrade,\n NuanzeServerOpenPosition,\n NuanzeServerPlatformDeltas,\n NuanzeServerSeriesPoint,\n NuanzeServerSubaccountLeaderboardItem,\n NuanzeServerWalletPosition,\n NuanzeServerWalletTrade,\n} from './serverModelTypes';\n\n/**\n * Failure envelope returned with every non-2xx response.\n *\n * Structurally unrelated to `BaseServerFailureResponse`: Nuanze nests a string `code` under `error`\n * instead of carrying a top-level numeric `error_code` and `status: 'failure'`.\n */\nexport interface NuanzeServerFailureResponse {\n error: {\n code: NuanzeErrorCode;\n message: string;\n requestId: string;\n };\n}\n\n/**\n * `GET /markets` response as returned on the wire.\n */\nexport interface NuanzeServerMarketsResponse {\n markets: NuanzeServerMarket[];\n count: number;\n asOf: string;\n}\n\n/**\n * `GET /news` response as returned on the wire. Stories have no decimals.\n */\nexport interface NuanzeServerNewsResponse {\n stories: NuanzeNewsStory[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}` response as returned on the wire. The `{ticker}` path segment accepts a\n * canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport type NuanzeServerMarketByTickerResponse = NuanzeServerMarketDetail;\n\n/**\n * `GET /funding/rates` response as returned on the wire.\n */\nexport interface NuanzeServerFundingRatesResponse {\n rates: NuanzeServerFundingRate[];\n asOf: string;\n}\n\n/**\n * `GET /leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerLeaderboardItem[];\n limit: number;\n offset: number;\n total: number;\n viewer: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n totalCount: number;\n items: NuanzeServerSubaccountLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerFollowedLeaderboardItem[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /platform/summary` response as returned on the wire.\n */\nexport interface NuanzeServerPlatformSummaryResponse {\n window: NuanzePlatformWindow;\n volume24h: string;\n trades24h: number;\n traders24h: number;\n windowVolume: string;\n windowTrades: number;\n windowTraders: number;\n deltas: NuanzeServerPlatformDeltas;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletSummaryResponse {\n address: string;\n subaccountName: string | null;\n subaccountCount: number;\n pnlWindow: NuanzePnlWindow;\n accountPnl: string;\n windowPnl: string;\n equity: string | null;\n cumulativeVolume: string;\n windowVolume: string;\n totalTrades: number;\n wins: number;\n losses: number;\n winRate: string | null;\n snapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/positions` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPositionsResponse {\n address: string;\n positions: NuanzeServerWalletPosition[];\n count: number;\n newestSnapshotAt: string | null;\n oldestSnapshotAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/trades` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketTradesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n trades: NuanzeServerMarketTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/candles` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketCandlesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n interval: NuanzeCandleInterval;\n candles: NuanzeServerCandle[];\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/trades` response as returned on the wire.\n */\nexport interface NuanzeServerWalletTradesResponse {\n address: string;\n trades: NuanzeServerWalletTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlResponse {\n address: string;\n subaccountName: string | null;\n window: NuanzePnlWindow;\n windowStart: string;\n windowEnd: string;\n openingAccountPnl: string;\n latestAccountPnl: string;\n windowPnl: string;\n openingEquity: string | null;\n latestEquity: string | null;\n volumeDelta: string;\n sourceInterval: NuanzeSourceInterval;\n latestSnapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl/series` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlSeriesResponse {\n address: string;\n subaccountName: string | null;\n metric: NuanzeSeriesMetric;\n window: NuanzePnlWindow;\n points: NuanzeServerSeriesPoint[];\n sourceInterval: NuanzeSourceInterval;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /flows` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowsResponse {\n events: NuanzeServerCollateralFlow[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/summary` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSummaryResponse {\n timeframe: NuanzeFlowTimeframe;\n deposited: string;\n withdrawn: string;\n net: string;\n gross: string;\n depositCount: number;\n withdrawalCount: number;\n valuedCount: number;\n unvaluedCount: number;\n priorNet: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/series` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSeriesResponse {\n timeframe: NuanzeFlowTimeframe;\n bucket: NuanzeFlowBucket;\n points: NuanzeServerCollateralFlowPoint[];\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/positions` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketPositionsResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n positions: NuanzeServerMarketPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /positions` response as returned on the wire.\n */\nexport interface NuanzeServerOpenPositionsResponse {\n positions: NuanzeServerOpenPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * Checks whether a response body is a Nuanze failure envelope. The `code` is not compared against\n * {@link NUANZE_ERROR_CODES}, so a code added by a newer API release still reaches the caller.\n */\nexport function isNuanzeServerFailureResponse(\n data: unknown,\n): data is NuanzeServerFailureResponse {\n if (typeof data !== 'object' || data === null || !('error' in data)) {\n return false;\n }\n\n const { error } = data;\n return (\n typeof error === 'object' &&\n error !== null &&\n typeof (error as { code?: unknown }).code === 'string' &&\n typeof (error as { message?: unknown }).message === 'string'\n );\n}\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"serverQueryTypes.cjs","names":[],"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import type {\n NuanzeCandleInterval,\n NuanzeCoverage,\n NuanzeFlowBucket,\n NuanzeFlowTimeframe,\n NuanzeLeaderboardTimeframe,\n NuanzeMarketVenue,\n NuanzePlatformWindow,\n NuanzePnlWindow,\n NuanzeSeriesMetric,\n NuanzeSourceInterval,\n} from './clientModelTypes';\nimport { NuanzeNewsStory } from './clientModelTypes';\nimport { NuanzeErrorCode } from './nuanzeErrorCodes';\nimport {\n NuanzeServerCandle,\n NuanzeServerCollateralFlow,\n NuanzeServerCollateralFlowPoint,\n NuanzeServerFollowedLeaderboardItem,\n NuanzeServerFundingRate,\n NuanzeServerLeaderboardItem,\n NuanzeServerMarket,\n NuanzeServerMarketDetail,\n NuanzeServerMarketPosition,\n NuanzeServerMarketTrade,\n NuanzeServerOpenPosition,\n NuanzeServerPlatformDeltas,\n NuanzeServerSeriesPoint,\n NuanzeServerSubaccountLeaderboardItem,\n NuanzeServerWalletPosition,\n NuanzeServerWalletTrade,\n} from './serverModelTypes';\n\n/**\n * Failure envelope returned with every non-2xx response.\n *\n * Structurally unrelated to `BaseServerFailureResponse`: Nuanze nests a string `code` under `error`\n * instead of carrying a top-level numeric `error_code` and `status: 'failure'`.\n */\nexport interface NuanzeServerFailureResponse {\n error: {\n code: NuanzeErrorCode;\n message: string;\n requestId: string;\n };\n}\n\n/**\n * `GET /markets` response as returned on the wire.\n */\nexport interface NuanzeServerMarketsResponse {\n markets: NuanzeServerMarket[];\n count: number;\n asOf: string;\n}\n\n/**\n * `GET /news` response as returned on the wire. Stories have no decimals.\n */\nexport interface NuanzeServerNewsResponse {\n stories: NuanzeNewsStory[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}` response as returned on the wire. The `{ticker}` path segment accepts a\n * canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport type NuanzeServerMarketByTickerResponse = NuanzeServerMarketDetail;\n\n/**\n * `GET /funding/rates` response as returned on the wire.\n */\nexport interface NuanzeServerFundingRatesResponse {\n rates: NuanzeServerFundingRate[];\n asOf: string;\n}\n\n/**\n * `GET /leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerLeaderboardItem[];\n limit: number;\n offset: number;\n total: number;\n viewer: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n item: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n totalCount: number;\n items: NuanzeServerSubaccountLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts/{subaccountHex}` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerFollowedLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerFollowedLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard/followed/{viewAs}` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n filteredRank: number | null;\n item: NuanzeServerFollowedLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /platform/summary` response as returned on the wire.\n */\nexport interface NuanzeServerPlatformSummaryResponse {\n window: NuanzePlatformWindow;\n volume24h: string;\n trades24h: number;\n traders24h: number;\n windowVolume: string;\n windowTrades: number;\n windowTraders: number;\n deltas: NuanzeServerPlatformDeltas;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletSummaryResponse {\n address: string;\n subaccountName: string | null;\n subaccountCount: number;\n pnlWindow: NuanzePnlWindow;\n accountPnl: string;\n windowPnl: string;\n equity: string | null;\n cumulativeVolume: string;\n windowVolume: string;\n totalTrades: number;\n wins: number;\n losses: number;\n winRate: string | null;\n snapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/positions` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPositionsResponse {\n address: string;\n positions: NuanzeServerWalletPosition[];\n count: number;\n newestSnapshotAt: string | null;\n oldestSnapshotAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/trades` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketTradesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n trades: NuanzeServerMarketTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/candles` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketCandlesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n interval: NuanzeCandleInterval;\n candles: NuanzeServerCandle[];\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/trades` response as returned on the wire.\n */\nexport interface NuanzeServerWalletTradesResponse {\n address: string;\n trades: NuanzeServerWalletTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlResponse {\n address: string;\n subaccountName: string | null;\n window: NuanzePnlWindow;\n windowStart: string;\n windowEnd: string;\n openingAccountPnl: string;\n latestAccountPnl: string;\n windowPnl: string;\n openingEquity: string | null;\n latestEquity: string | null;\n volumeDelta: string;\n sourceInterval: NuanzeSourceInterval;\n latestSnapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl/series` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlSeriesResponse {\n address: string;\n subaccountName: string | null;\n metric: NuanzeSeriesMetric;\n window: NuanzePnlWindow;\n points: NuanzeServerSeriesPoint[];\n sourceInterval: NuanzeSourceInterval;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /flows` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowsResponse {\n events: NuanzeServerCollateralFlow[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/summary` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSummaryResponse {\n timeframe: NuanzeFlowTimeframe;\n deposited: string;\n withdrawn: string;\n net: string;\n gross: string;\n depositCount: number;\n withdrawalCount: number;\n valuedCount: number;\n unvaluedCount: number;\n priorNet: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/series` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSeriesResponse {\n timeframe: NuanzeFlowTimeframe;\n bucket: NuanzeFlowBucket;\n points: NuanzeServerCollateralFlowPoint[];\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/positions` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketPositionsResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n positions: NuanzeServerMarketPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /positions` response as returned on the wire.\n */\nexport interface NuanzeServerOpenPositionsResponse {\n positions: NuanzeServerOpenPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * Checks whether a response body is a Nuanze failure envelope. The `code` is not compared against\n * {@link NUANZE_ERROR_CODES}, so a code added by a newer API release still reaches the caller.\n */\nexport function isNuanzeServerFailureResponse(\n data: unknown,\n): data is NuanzeServerFailureResponse {\n if (typeof data !== 'object' || data === null || !('error' in data)) {\n return false;\n }\n\n const { error } = data;\n return (\n typeof error === 'object' &&\n error !== null &&\n typeof (error as { code?: unknown }).code === 'string' &&\n typeof (error as { message?: unknown }).message === 'string'\n );\n}\n"],"mappings":";;;;;;AAiVA,SAAgB,8BACd,MACqC;CACrC,IAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,EAAE,WAAW,OAC5D,OAAO;CAGT,MAAM,EAAE,UAAU;CAClB,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS,YAC9C,OAAQ,MAAgC,YAAY;AAExD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as isNuanzeServerFailureResponse, _ as
|
|
2
|
-
export { NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundingRatesResponse, NuanzeServerLeaderboardResponse, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformSummaryResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTradesResponse, isNuanzeServerFailureResponse };
|
|
1
|
+
import { C as NuanzeServerWalletSummaryResponse, S as NuanzeServerWalletPositionsResponse, T as isNuanzeServerFailureResponse, _ as NuanzeServerSubaccountLeaderboardPositionResponse, a as NuanzeServerFollowedLeaderboardPositionResponse, b as NuanzeServerWalletPnlResponse, c as NuanzeServerLeaderboardResponse, d as NuanzeServerMarketPositionsResponse, f as NuanzeServerMarketTradesResponse, g as NuanzeServerPlatformSummaryResponse, h as NuanzeServerOpenPositionsResponse, i as NuanzeServerFailureResponse, l as NuanzeServerMarketByTickerResponse, m as NuanzeServerNewsResponse, n as NuanzeServerCollateralFlowSummaryResponse, o as NuanzeServerFollowedLeaderboardResponse, p as NuanzeServerMarketsResponse, r as NuanzeServerCollateralFlowsResponse, s as NuanzeServerFundingRatesResponse, t as NuanzeServerCollateralFlowSeriesResponse, u as NuanzeServerMarketCandlesResponse, v as NuanzeServerSubaccountLeaderboardResponse, w as NuanzeServerWalletTradesResponse, x as NuanzeServerWalletPnlSeriesResponse, y as NuanzeServerWalletLeaderboardPositionResponse } from "../serverQueryTypes-0DJc4-Oo.cjs";
|
|
2
|
+
export { NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardPositionResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundingRatesResponse, NuanzeServerLeaderboardResponse, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformSummaryResponse, NuanzeServerSubaccountLeaderboardPositionResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletLeaderboardPositionResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTradesResponse, isNuanzeServerFailureResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as isNuanzeServerFailureResponse, _ as
|
|
2
|
-
export { NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundingRatesResponse, NuanzeServerLeaderboardResponse, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformSummaryResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTradesResponse, isNuanzeServerFailureResponse };
|
|
1
|
+
import { C as NuanzeServerWalletSummaryResponse, S as NuanzeServerWalletPositionsResponse, T as isNuanzeServerFailureResponse, _ as NuanzeServerSubaccountLeaderboardPositionResponse, a as NuanzeServerFollowedLeaderboardPositionResponse, b as NuanzeServerWalletPnlResponse, c as NuanzeServerLeaderboardResponse, d as NuanzeServerMarketPositionsResponse, f as NuanzeServerMarketTradesResponse, g as NuanzeServerPlatformSummaryResponse, h as NuanzeServerOpenPositionsResponse, i as NuanzeServerFailureResponse, l as NuanzeServerMarketByTickerResponse, m as NuanzeServerNewsResponse, n as NuanzeServerCollateralFlowSummaryResponse, o as NuanzeServerFollowedLeaderboardResponse, p as NuanzeServerMarketsResponse, r as NuanzeServerCollateralFlowsResponse, s as NuanzeServerFundingRatesResponse, t as NuanzeServerCollateralFlowSeriesResponse, u as NuanzeServerMarketCandlesResponse, v as NuanzeServerSubaccountLeaderboardResponse, w as NuanzeServerWalletTradesResponse, x as NuanzeServerWalletPnlSeriesResponse, y as NuanzeServerWalletLeaderboardPositionResponse } from "../serverQueryTypes-qJw753VN.js";
|
|
2
|
+
export { NuanzeServerCollateralFlowSeriesResponse, NuanzeServerCollateralFlowSummaryResponse, NuanzeServerCollateralFlowsResponse, NuanzeServerFailureResponse, NuanzeServerFollowedLeaderboardPositionResponse, NuanzeServerFollowedLeaderboardResponse, NuanzeServerFundingRatesResponse, NuanzeServerLeaderboardResponse, NuanzeServerMarketByTickerResponse, NuanzeServerMarketCandlesResponse, NuanzeServerMarketPositionsResponse, NuanzeServerMarketTradesResponse, NuanzeServerMarketsResponse, NuanzeServerNewsResponse, NuanzeServerOpenPositionsResponse, NuanzeServerPlatformSummaryResponse, NuanzeServerSubaccountLeaderboardPositionResponse, NuanzeServerSubaccountLeaderboardResponse, NuanzeServerWalletLeaderboardPositionResponse, NuanzeServerWalletPnlResponse, NuanzeServerWalletPnlSeriesResponse, NuanzeServerWalletPositionsResponse, NuanzeServerWalletSummaryResponse, NuanzeServerWalletTradesResponse, isNuanzeServerFailureResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverQueryTypes.js","names":[],"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import type {\n NuanzeCandleInterval,\n NuanzeCoverage,\n NuanzeFlowBucket,\n NuanzeFlowTimeframe,\n NuanzeLeaderboardTimeframe,\n NuanzeMarketVenue,\n NuanzePlatformWindow,\n NuanzePnlWindow,\n NuanzeSeriesMetric,\n NuanzeSourceInterval,\n} from './clientModelTypes';\nimport { NuanzeNewsStory } from './clientModelTypes';\nimport { NuanzeErrorCode } from './nuanzeErrorCodes';\nimport {\n NuanzeServerCandle,\n NuanzeServerCollateralFlow,\n NuanzeServerCollateralFlowPoint,\n NuanzeServerFollowedLeaderboardItem,\n NuanzeServerFundingRate,\n NuanzeServerLeaderboardItem,\n NuanzeServerMarket,\n NuanzeServerMarketDetail,\n NuanzeServerMarketPosition,\n NuanzeServerMarketTrade,\n NuanzeServerOpenPosition,\n NuanzeServerPlatformDeltas,\n NuanzeServerSeriesPoint,\n NuanzeServerSubaccountLeaderboardItem,\n NuanzeServerWalletPosition,\n NuanzeServerWalletTrade,\n} from './serverModelTypes';\n\n/**\n * Failure envelope returned with every non-2xx response.\n *\n * Structurally unrelated to `BaseServerFailureResponse`: Nuanze nests a string `code` under `error`\n * instead of carrying a top-level numeric `error_code` and `status: 'failure'`.\n */\nexport interface NuanzeServerFailureResponse {\n error: {\n code: NuanzeErrorCode;\n message: string;\n requestId: string;\n };\n}\n\n/**\n * `GET /markets` response as returned on the wire.\n */\nexport interface NuanzeServerMarketsResponse {\n markets: NuanzeServerMarket[];\n count: number;\n asOf: string;\n}\n\n/**\n * `GET /news` response as returned on the wire. Stories have no decimals.\n */\nexport interface NuanzeServerNewsResponse {\n stories: NuanzeNewsStory[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}` response as returned on the wire. The `{ticker}` path segment accepts a\n * canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport type NuanzeServerMarketByTickerResponse = NuanzeServerMarketDetail;\n\n/**\n * `GET /funding/rates` response as returned on the wire.\n */\nexport interface NuanzeServerFundingRatesResponse {\n rates: NuanzeServerFundingRate[];\n asOf: string;\n}\n\n/**\n * `GET /leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerLeaderboardItem[];\n limit: number;\n offset: number;\n total: number;\n viewer: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n totalCount: number;\n items: NuanzeServerSubaccountLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerFollowedLeaderboardItem[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /platform/summary` response as returned on the wire.\n */\nexport interface NuanzeServerPlatformSummaryResponse {\n window: NuanzePlatformWindow;\n volume24h: string;\n trades24h: number;\n traders24h: number;\n windowVolume: string;\n windowTrades: number;\n windowTraders: number;\n deltas: NuanzeServerPlatformDeltas;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletSummaryResponse {\n address: string;\n subaccountName: string | null;\n subaccountCount: number;\n pnlWindow: NuanzePnlWindow;\n accountPnl: string;\n windowPnl: string;\n equity: string | null;\n cumulativeVolume: string;\n windowVolume: string;\n totalTrades: number;\n wins: number;\n losses: number;\n winRate: string | null;\n snapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/positions` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPositionsResponse {\n address: string;\n positions: NuanzeServerWalletPosition[];\n count: number;\n newestSnapshotAt: string | null;\n oldestSnapshotAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/trades` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketTradesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n trades: NuanzeServerMarketTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/candles` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketCandlesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n interval: NuanzeCandleInterval;\n candles: NuanzeServerCandle[];\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/trades` response as returned on the wire.\n */\nexport interface NuanzeServerWalletTradesResponse {\n address: string;\n trades: NuanzeServerWalletTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlResponse {\n address: string;\n subaccountName: string | null;\n window: NuanzePnlWindow;\n windowStart: string;\n windowEnd: string;\n openingAccountPnl: string;\n latestAccountPnl: string;\n windowPnl: string;\n openingEquity: string | null;\n latestEquity: string | null;\n volumeDelta: string;\n sourceInterval: NuanzeSourceInterval;\n latestSnapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl/series` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlSeriesResponse {\n address: string;\n subaccountName: string | null;\n metric: NuanzeSeriesMetric;\n window: NuanzePnlWindow;\n points: NuanzeServerSeriesPoint[];\n sourceInterval: NuanzeSourceInterval;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /flows` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowsResponse {\n events: NuanzeServerCollateralFlow[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/summary` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSummaryResponse {\n timeframe: NuanzeFlowTimeframe;\n deposited: string;\n withdrawn: string;\n net: string;\n gross: string;\n depositCount: number;\n withdrawalCount: number;\n valuedCount: number;\n unvaluedCount: number;\n priorNet: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/series` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSeriesResponse {\n timeframe: NuanzeFlowTimeframe;\n bucket: NuanzeFlowBucket;\n points: NuanzeServerCollateralFlowPoint[];\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/positions` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketPositionsResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n positions: NuanzeServerMarketPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /positions` response as returned on the wire.\n */\nexport interface NuanzeServerOpenPositionsResponse {\n positions: NuanzeServerOpenPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * Checks whether a response body is a Nuanze failure envelope. The `code` is not compared against\n * {@link NUANZE_ERROR_CODES}, so a code added by a newer API release still reaches the caller.\n */\nexport function isNuanzeServerFailureResponse(\n data: unknown,\n): data is NuanzeServerFailureResponse {\n if (typeof data !== 'object' || data === null || !('error' in data)) {\n return false;\n }\n\n const { error } = data;\n return (\n typeof error === 'object' &&\n error !== null &&\n typeof (error as { code?: unknown }).code === 'string' &&\n typeof (error as { message?: unknown }).message === 'string'\n );\n}\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"serverQueryTypes.js","names":[],"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import type {\n NuanzeCandleInterval,\n NuanzeCoverage,\n NuanzeFlowBucket,\n NuanzeFlowTimeframe,\n NuanzeLeaderboardTimeframe,\n NuanzeMarketVenue,\n NuanzePlatformWindow,\n NuanzePnlWindow,\n NuanzeSeriesMetric,\n NuanzeSourceInterval,\n} from './clientModelTypes';\nimport { NuanzeNewsStory } from './clientModelTypes';\nimport { NuanzeErrorCode } from './nuanzeErrorCodes';\nimport {\n NuanzeServerCandle,\n NuanzeServerCollateralFlow,\n NuanzeServerCollateralFlowPoint,\n NuanzeServerFollowedLeaderboardItem,\n NuanzeServerFundingRate,\n NuanzeServerLeaderboardItem,\n NuanzeServerMarket,\n NuanzeServerMarketDetail,\n NuanzeServerMarketPosition,\n NuanzeServerMarketTrade,\n NuanzeServerOpenPosition,\n NuanzeServerPlatformDeltas,\n NuanzeServerSeriesPoint,\n NuanzeServerSubaccountLeaderboardItem,\n NuanzeServerWalletPosition,\n NuanzeServerWalletTrade,\n} from './serverModelTypes';\n\n/**\n * Failure envelope returned with every non-2xx response.\n *\n * Structurally unrelated to `BaseServerFailureResponse`: Nuanze nests a string `code` under `error`\n * instead of carrying a top-level numeric `error_code` and `status: 'failure'`.\n */\nexport interface NuanzeServerFailureResponse {\n error: {\n code: NuanzeErrorCode;\n message: string;\n requestId: string;\n };\n}\n\n/**\n * `GET /markets` response as returned on the wire.\n */\nexport interface NuanzeServerMarketsResponse {\n markets: NuanzeServerMarket[];\n count: number;\n asOf: string;\n}\n\n/**\n * `GET /news` response as returned on the wire. Stories have no decimals.\n */\nexport interface NuanzeServerNewsResponse {\n stories: NuanzeNewsStory[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}` response as returned on the wire. The `{ticker}` path segment accepts a\n * canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport type NuanzeServerMarketByTickerResponse = NuanzeServerMarketDetail;\n\n/**\n * `GET /funding/rates` response as returned on the wire.\n */\nexport interface NuanzeServerFundingRatesResponse {\n rates: NuanzeServerFundingRate[];\n asOf: string;\n}\n\n/**\n * `GET /leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerLeaderboardItem[];\n limit: number;\n offset: number;\n total: number;\n viewer: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n item: NuanzeServerLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n totalCount: number;\n items: NuanzeServerSubaccountLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /leaderboard/subaccounts/{subaccountHex}` response as returned on the wire.\n */\nexport interface NuanzeServerSubaccountLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n filteredRank: number | null;\n item: NuanzeServerSubaccountLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n items: NuanzeServerFollowedLeaderboardItem[];\n nextCursor: string | null;\n viewer: {\n filteredRank: number | null;\n item: NuanzeServerFollowedLeaderboardItem | null;\n } | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/leaderboard/followed/{viewAs}` response as returned on the wire.\n */\nexport interface NuanzeServerFollowedLeaderboardPositionResponse {\n timeframe: NuanzeLeaderboardTimeframe;\n filteredRank: number | null;\n item: NuanzeServerFollowedLeaderboardItem | null;\n asOf: string;\n}\n\n/**\n * `GET /platform/summary` response as returned on the wire.\n */\nexport interface NuanzeServerPlatformSummaryResponse {\n window: NuanzePlatformWindow;\n volume24h: string;\n trades24h: number;\n traders24h: number;\n windowVolume: string;\n windowTrades: number;\n windowTraders: number;\n deltas: NuanzeServerPlatformDeltas;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}` response as returned on the wire.\n */\nexport interface NuanzeServerWalletSummaryResponse {\n address: string;\n subaccountName: string | null;\n subaccountCount: number;\n pnlWindow: NuanzePnlWindow;\n accountPnl: string;\n windowPnl: string;\n equity: string | null;\n cumulativeVolume: string;\n windowVolume: string;\n totalTrades: number;\n wins: number;\n losses: number;\n winRate: string | null;\n snapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/positions` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPositionsResponse {\n address: string;\n positions: NuanzeServerWalletPosition[];\n count: number;\n newestSnapshotAt: string | null;\n oldestSnapshotAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/trades` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketTradesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n trades: NuanzeServerMarketTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/candles` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketCandlesResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n interval: NuanzeCandleInterval;\n candles: NuanzeServerCandle[];\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/trades` response as returned on the wire.\n */\nexport interface NuanzeServerWalletTradesResponse {\n address: string;\n trades: NuanzeServerWalletTrade[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlResponse {\n address: string;\n subaccountName: string | null;\n window: NuanzePnlWindow;\n windowStart: string;\n windowEnd: string;\n openingAccountPnl: string;\n latestAccountPnl: string;\n windowPnl: string;\n openingEquity: string | null;\n latestEquity: string | null;\n volumeDelta: string;\n sourceInterval: NuanzeSourceInterval;\n latestSnapshotAt: string;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /wallets/{address}/pnl/series` response as returned on the wire.\n */\nexport interface NuanzeServerWalletPnlSeriesResponse {\n address: string;\n subaccountName: string | null;\n metric: NuanzeSeriesMetric;\n window: NuanzePnlWindow;\n points: NuanzeServerSeriesPoint[];\n sourceInterval: NuanzeSourceInterval;\n coverage: NuanzeCoverage;\n asOf: string;\n}\n\n/**\n * `GET /flows` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowsResponse {\n events: NuanzeServerCollateralFlow[];\n nextCursor: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/summary` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSummaryResponse {\n timeframe: NuanzeFlowTimeframe;\n deposited: string;\n withdrawn: string;\n net: string;\n gross: string;\n depositCount: number;\n withdrawalCount: number;\n valuedCount: number;\n unvaluedCount: number;\n priorNet: string | null;\n asOf: string;\n}\n\n/**\n * `GET /flows/series` response as returned on the wire.\n */\nexport interface NuanzeServerCollateralFlowSeriesResponse {\n timeframe: NuanzeFlowTimeframe;\n bucket: NuanzeFlowBucket;\n points: NuanzeServerCollateralFlowPoint[];\n asOf: string;\n}\n\n/**\n * `GET /markets/{ticker}/positions` response as returned on the wire. The `{ticker}` path segment\n * accepts a canonical ticker, legacy source symbol, or numeric product ID.\n */\nexport interface NuanzeServerMarketPositionsResponse {\n productId: number;\n symbol: string;\n ticker: string;\n venue: NuanzeMarketVenue;\n positions: NuanzeServerMarketPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * `GET /positions` response as returned on the wire.\n */\nexport interface NuanzeServerOpenPositionsResponse {\n positions: NuanzeServerOpenPosition[];\n nextCursor: string | null;\n dataUpdatedAt: string | null;\n asOf: string;\n}\n\n/**\n * Checks whether a response body is a Nuanze failure envelope. The `code` is not compared against\n * {@link NUANZE_ERROR_CODES}, so a code added by a newer API release still reaches the caller.\n */\nexport function isNuanzeServerFailureResponse(\n data: unknown,\n): data is NuanzeServerFailureResponse {\n if (typeof data !== 'object' || data === null || !('error' in data)) {\n return false;\n }\n\n const { error } = data;\n return (\n typeof error === 'object' &&\n error !== null &&\n typeof (error as { code?: unknown }).code === 'string' &&\n typeof (error as { message?: unknown }).message === 'string'\n );\n}\n"],"mappings":";;;;;AAiVA,SAAgB,8BACd,MACqC;CACrC,IAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,EAAE,WAAW,OAC5D,OAAO;CAGT,MAAM,EAAE,UAAU;CAClB,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS,YAC9C,OAAQ,MAAgC,YAAY;AAExD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/nuanze-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "HTTP client for the Nuanze public analytics API - markets, wallets, trades, candles, flows, positioning, and open positions",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"module": "./dist/index.js",
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nadohq/shared": "^0.
|
|
44
|
+
"@nadohq/shared": "^0.48.0",
|
|
45
45
|
"axios": "1.16.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"bignumber.js": "11.1.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "24163f30a460fe13e39bf288a4f7d7e7bf18e478"
|
|
54
54
|
}
|
package/src/NuanzeClient.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
mapNuanzeCollateralFlowSeriesResponse,
|
|
4
4
|
mapNuanzeCollateralFlowSummaryResponse,
|
|
5
5
|
mapNuanzeCollateralFlowsResponse,
|
|
6
|
+
mapNuanzeFollowedLeaderboardPositionResponse,
|
|
6
7
|
mapNuanzeFollowedLeaderboardResponse,
|
|
7
8
|
mapNuanzeFundingRatesResponse,
|
|
8
9
|
mapNuanzeLeaderboardResponse,
|
|
@@ -15,7 +16,9 @@ import {
|
|
|
15
16
|
mapNuanzeNewsResponse,
|
|
16
17
|
mapNuanzeOpenPositionsResponse,
|
|
17
18
|
mapNuanzePlatformSummaryResponse,
|
|
19
|
+
mapNuanzeSubaccountLeaderboardPositionResponse,
|
|
18
20
|
mapNuanzeSubaccountLeaderboardResponse,
|
|
21
|
+
mapNuanzeWalletLeaderboardPositionResponse,
|
|
19
22
|
mapNuanzeWalletPnlResponse,
|
|
20
23
|
mapNuanzeWalletPnlSeriesResponse,
|
|
21
24
|
mapNuanzeWalletPositionsResponse,
|
|
@@ -30,6 +33,8 @@ import {
|
|
|
30
33
|
GetNuanzeCollateralFlowsParams,
|
|
31
34
|
GetNuanzeCollateralFlowsResponse,
|
|
32
35
|
GetNuanzeFollowedLeaderboardParams,
|
|
36
|
+
GetNuanzeFollowedLeaderboardPositionParams,
|
|
37
|
+
GetNuanzeFollowedLeaderboardPositionResponse,
|
|
33
38
|
GetNuanzeFollowedLeaderboardResponse,
|
|
34
39
|
GetNuanzeFundingRatesParams,
|
|
35
40
|
GetNuanzeFundingRatesResponse,
|
|
@@ -54,7 +59,11 @@ import {
|
|
|
54
59
|
GetNuanzePlatformSummaryParams,
|
|
55
60
|
GetNuanzePlatformSummaryResponse,
|
|
56
61
|
GetNuanzeSubaccountLeaderboardParams,
|
|
62
|
+
GetNuanzeSubaccountLeaderboardPositionParams,
|
|
63
|
+
GetNuanzeSubaccountLeaderboardPositionResponse,
|
|
57
64
|
GetNuanzeSubaccountLeaderboardResponse,
|
|
65
|
+
GetNuanzeWalletLeaderboardPositionParams,
|
|
66
|
+
GetNuanzeWalletLeaderboardPositionResponse,
|
|
58
67
|
GetNuanzeWalletPnlParams,
|
|
59
68
|
GetNuanzeWalletPnlResponse,
|
|
60
69
|
GetNuanzeWalletPnlSeriesParams,
|
|
@@ -73,6 +82,7 @@ import {
|
|
|
73
82
|
NuanzeServerCollateralFlowSeriesResponse,
|
|
74
83
|
NuanzeServerCollateralFlowSummaryResponse,
|
|
75
84
|
NuanzeServerCollateralFlowsResponse,
|
|
85
|
+
NuanzeServerFollowedLeaderboardPositionResponse,
|
|
76
86
|
NuanzeServerFollowedLeaderboardResponse,
|
|
77
87
|
NuanzeServerFundingRatesResponse,
|
|
78
88
|
NuanzeServerLeaderboardResponse,
|
|
@@ -84,7 +94,9 @@ import {
|
|
|
84
94
|
NuanzeServerNewsResponse,
|
|
85
95
|
NuanzeServerOpenPositionsResponse,
|
|
86
96
|
NuanzeServerPlatformSummaryResponse,
|
|
97
|
+
NuanzeServerSubaccountLeaderboardPositionResponse,
|
|
87
98
|
NuanzeServerSubaccountLeaderboardResponse,
|
|
99
|
+
NuanzeServerWalletLeaderboardPositionResponse,
|
|
88
100
|
NuanzeServerWalletPnlResponse,
|
|
89
101
|
NuanzeServerWalletPnlSeriesResponse,
|
|
90
102
|
NuanzeServerWalletPositionsResponse,
|
|
@@ -218,6 +230,28 @@ export class NuanzeClient {
|
|
|
218
230
|
);
|
|
219
231
|
}
|
|
220
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Gets one wallet's leaderboard position by explicit EVM address. Equity-basis account PnL
|
|
235
|
+
* includes realized and unrealized movement plus funding and is not realized PnL. `item` is
|
|
236
|
+
* null only when the wallet leaderboard source row is absent; `rank` is the global rank in
|
|
237
|
+
* the unfiltered leaderboard, independent of collection `limit` and `offset`. For an inline
|
|
238
|
+
* lookup scoped to a ranked page, `getLeaderboard` accepts `viewAs` instead.
|
|
239
|
+
*
|
|
240
|
+
* @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or
|
|
241
|
+
* `INVALID_ADDRESS` when the address is malformed.
|
|
242
|
+
*/
|
|
243
|
+
async getWalletLeaderboardPosition(
|
|
244
|
+
params: GetNuanzeWalletLeaderboardPositionParams,
|
|
245
|
+
): Promise<GetNuanzeWalletLeaderboardPositionResponse> {
|
|
246
|
+
const { address, ...query } = params;
|
|
247
|
+
return mapNuanzeWalletLeaderboardPositionResponse(
|
|
248
|
+
await this.getJson<NuanzeServerWalletLeaderboardPositionResponse>(
|
|
249
|
+
`/leaderboard/wallets/${encodeURIComponent(address)}`,
|
|
250
|
+
query,
|
|
251
|
+
),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
221
255
|
/**
|
|
222
256
|
* Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account
|
|
223
257
|
* PnL descending with nulls last. Username and display name are null when unavailable.
|
|
@@ -242,6 +276,31 @@ export class NuanzeClient {
|
|
|
242
276
|
);
|
|
243
277
|
}
|
|
244
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Gets one subaccount's leaderboard position by explicit bytes32 subaccount hex
|
|
281
|
+
* (the SDK `subaccountToHex` form). `item.globalRank` reflects the subaccount's true position
|
|
282
|
+
* across the full leaderboard, independent of the `includePrivate`, `includeUntraded`, and
|
|
283
|
+
* `includeUnclaimed` filters, while `filteredRank` uses the request's active filters: an
|
|
284
|
+
* absent source row yields `filteredRank` null with `item` null, an existing but
|
|
285
|
+
* filter-excluded row keeps its full item with `filteredRank` null, and an included row
|
|
286
|
+
* carries both ranks. For an inline lookup scoped to a ranked page,
|
|
287
|
+
* `getSubaccountLeaderboard` accepts `viewAs` instead.
|
|
288
|
+
*
|
|
289
|
+
* @throws {NuanzeServerFailureError} With `BAD_REQUEST` when filters are invalid, or
|
|
290
|
+
* `INVALID_SUBACCOUNT` when the subaccount hex is malformed.
|
|
291
|
+
*/
|
|
292
|
+
async getSubaccountLeaderboardPosition(
|
|
293
|
+
params: GetNuanzeSubaccountLeaderboardPositionParams,
|
|
294
|
+
): Promise<GetNuanzeSubaccountLeaderboardPositionResponse> {
|
|
295
|
+
const { subaccountHex, ...query } = params;
|
|
296
|
+
return mapNuanzeSubaccountLeaderboardPositionResponse(
|
|
297
|
+
await this.getJson<NuanzeServerSubaccountLeaderboardPositionResponse>(
|
|
298
|
+
`/leaderboard/subaccounts/${encodeURIComponent(subaccountHex)}`,
|
|
299
|
+
query,
|
|
300
|
+
),
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
245
304
|
/**
|
|
246
305
|
* Gets platform activity summary from five-minute aggregates.
|
|
247
306
|
*
|
|
@@ -263,8 +322,15 @@ export class NuanzeClient {
|
|
|
263
322
|
* follows, sorted by PnL descending with nulls last. The follower does not need a claimed
|
|
264
323
|
* username. Subaccounts with no PnL in the window are included by default with null PnL/rank,
|
|
265
324
|
* zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.
|
|
325
|
+
* Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's
|
|
326
|
+
* `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full
|
|
327
|
+
* item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or
|
|
328
|
+
* the follower does not actively follow that subaccount, and a filter-excluded followed row
|
|
329
|
+
* keeps its item with `filteredRank` null.
|
|
266
330
|
*
|
|
267
|
-
* @throws {NuanzeServerFailureError} With `BAD_REQUEST`
|
|
331
|
+
* @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,
|
|
332
|
+
* `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when params, the cursor, the follower
|
|
333
|
+
* hex, or `viewAs` are invalid.
|
|
268
334
|
*/
|
|
269
335
|
async getFollowedLeaderboard(
|
|
270
336
|
params: GetNuanzeFollowedLeaderboardParams,
|
|
@@ -277,6 +343,33 @@ export class NuanzeClient {
|
|
|
277
343
|
);
|
|
278
344
|
}
|
|
279
345
|
|
|
346
|
+
/**
|
|
347
|
+
* Gets one followed subaccount's position within a follower's leaderboard. `subaccountHex`
|
|
348
|
+
* identifies the follower whose active follow graph is ranked and `viewAs` the followed
|
|
349
|
+
* subaccount to position, both as bytes32 subaccount hex (the SDK `subaccountToHex` form).
|
|
350
|
+
* `item.globalRank` reflects the subaccount's true position across the full global subaccount
|
|
351
|
+
* leaderboard, independent of the follow graph and of the `includeUntraded`, `includePrivate`,
|
|
352
|
+
* and `includeUnclaimed` filters, while `filteredRank` counts only the follower's followed
|
|
353
|
+
* subaccounts passing the request's active filters: a subaccount the follower does not follow
|
|
354
|
+
* yields `filteredRank` null with `item` null, an existing but filter-excluded followed row
|
|
355
|
+
* keeps its full item with `filteredRank` null, and an included row carries both ranks. For an
|
|
356
|
+
* inline lookup scoped to a ranked page, `getFollowedLeaderboard` accepts `viewAs` instead.
|
|
357
|
+
*
|
|
358
|
+
* @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe or filters are
|
|
359
|
+
* invalid, or `INVALID_SUBACCOUNT` when either subaccount hex is malformed.
|
|
360
|
+
*/
|
|
361
|
+
async getFollowedLeaderboardPosition(
|
|
362
|
+
params: GetNuanzeFollowedLeaderboardPositionParams,
|
|
363
|
+
): Promise<GetNuanzeFollowedLeaderboardPositionResponse> {
|
|
364
|
+
const { viewAs, ...query } = params;
|
|
365
|
+
return mapNuanzeFollowedLeaderboardPositionResponse(
|
|
366
|
+
await this.getJson<NuanzeServerFollowedLeaderboardPositionResponse>(
|
|
367
|
+
`/wallets/leaderboard/followed/${encodeURIComponent(viewAs)}`,
|
|
368
|
+
query,
|
|
369
|
+
),
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
280
373
|
/**
|
|
281
374
|
* Gets replica-backed wallet analytics. Without `subaccountName`, latest cumulative values are
|
|
282
375
|
* selected per known subaccount and then summed. The response is a snapshot and does not claim
|
package/src/dataMappers.ts
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
GetNuanzeCollateralFlowSeriesResponse,
|
|
32
32
|
GetNuanzeCollateralFlowSummaryResponse,
|
|
33
33
|
GetNuanzeCollateralFlowsResponse,
|
|
34
|
+
GetNuanzeFollowedLeaderboardPositionResponse,
|
|
34
35
|
GetNuanzeFollowedLeaderboardResponse,
|
|
35
36
|
GetNuanzeFundingRatesResponse,
|
|
36
37
|
GetNuanzeLeaderboardResponse,
|
|
@@ -43,7 +44,9 @@ import {
|
|
|
43
44
|
GetNuanzeNewsResponse,
|
|
44
45
|
GetNuanzeOpenPositionsResponse,
|
|
45
46
|
GetNuanzePlatformSummaryResponse,
|
|
47
|
+
GetNuanzeSubaccountLeaderboardPositionResponse,
|
|
46
48
|
GetNuanzeSubaccountLeaderboardResponse,
|
|
49
|
+
GetNuanzeWalletLeaderboardPositionResponse,
|
|
47
50
|
GetNuanzeWalletPnlResponse,
|
|
48
51
|
GetNuanzeWalletPnlSeriesResponse,
|
|
49
52
|
GetNuanzeWalletPositionsResponse,
|
|
@@ -85,6 +88,7 @@ import {
|
|
|
85
88
|
NuanzeServerCollateralFlowSeriesResponse,
|
|
86
89
|
NuanzeServerCollateralFlowSummaryResponse,
|
|
87
90
|
NuanzeServerCollateralFlowsResponse,
|
|
91
|
+
NuanzeServerFollowedLeaderboardPositionResponse,
|
|
88
92
|
NuanzeServerFollowedLeaderboardResponse,
|
|
89
93
|
NuanzeServerFundingRatesResponse,
|
|
90
94
|
NuanzeServerLeaderboardResponse,
|
|
@@ -95,7 +99,9 @@ import {
|
|
|
95
99
|
NuanzeServerNewsResponse,
|
|
96
100
|
NuanzeServerOpenPositionsResponse,
|
|
97
101
|
NuanzeServerPlatformSummaryResponse,
|
|
102
|
+
NuanzeServerSubaccountLeaderboardPositionResponse,
|
|
98
103
|
NuanzeServerSubaccountLeaderboardResponse,
|
|
104
|
+
NuanzeServerWalletLeaderboardPositionResponse,
|
|
99
105
|
NuanzeServerWalletPnlResponse,
|
|
100
106
|
NuanzeServerWalletPnlSeriesResponse,
|
|
101
107
|
NuanzeServerWalletPositionsResponse,
|
|
@@ -362,6 +368,20 @@ export function mapNuanzeLeaderboardResponse(
|
|
|
362
368
|
};
|
|
363
369
|
}
|
|
364
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Maps a server-side `GET /leaderboard/wallets/{address}` response. The item is null only when
|
|
373
|
+
* the wallet leaderboard source row is absent.
|
|
374
|
+
*/
|
|
375
|
+
export function mapNuanzeWalletLeaderboardPositionResponse(
|
|
376
|
+
server: NuanzeServerWalletLeaderboardPositionResponse,
|
|
377
|
+
): GetNuanzeWalletLeaderboardPositionResponse {
|
|
378
|
+
return {
|
|
379
|
+
timeframe: server.timeframe,
|
|
380
|
+
item: server.item === null ? null : mapNuanzeLeaderboardItem(server.item),
|
|
381
|
+
asOf: server.asOf,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
|
|
365
385
|
/**
|
|
366
386
|
* Maps a server-side followed-leaderboard row.
|
|
367
387
|
*/
|
|
@@ -432,7 +452,28 @@ export function mapNuanzeSubaccountLeaderboardResponse(
|
|
|
432
452
|
}
|
|
433
453
|
|
|
434
454
|
/**
|
|
435
|
-
* Maps a server-side `GET /
|
|
455
|
+
* Maps a server-side `GET /leaderboard/subaccounts/{subaccountHex}` response. An absent source
|
|
456
|
+
* row maps to `filteredRank` null with `item` null; an existing but filter-excluded row keeps
|
|
457
|
+
* its full item (including `globalRank`) with `filteredRank` null.
|
|
458
|
+
*/
|
|
459
|
+
export function mapNuanzeSubaccountLeaderboardPositionResponse(
|
|
460
|
+
server: NuanzeServerSubaccountLeaderboardPositionResponse,
|
|
461
|
+
): GetNuanzeSubaccountLeaderboardPositionResponse {
|
|
462
|
+
return {
|
|
463
|
+
timeframe: server.timeframe,
|
|
464
|
+
filteredRank: server.filteredRank,
|
|
465
|
+
item:
|
|
466
|
+
server.item === null
|
|
467
|
+
? null
|
|
468
|
+
: mapNuanzeSubaccountLeaderboardItem(server.item),
|
|
469
|
+
asOf: server.asOf,
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Maps a server-side `GET /wallets/leaderboard` response, including the nullable `viewAs`
|
|
475
|
+
* viewer. A filter-excluded followed viewer keeps its full item with `filteredRank` null; a
|
|
476
|
+
* viewer the follower does not follow maps to null.
|
|
436
477
|
*/
|
|
437
478
|
export function mapNuanzeFollowedLeaderboardResponse(
|
|
438
479
|
server: NuanzeServerFollowedLeaderboardResponse,
|
|
@@ -441,6 +482,36 @@ export function mapNuanzeFollowedLeaderboardResponse(
|
|
|
441
482
|
timeframe: server.timeframe,
|
|
442
483
|
items: server.items.map(mapNuanzeFollowedLeaderboardItem),
|
|
443
484
|
nextCursor: server.nextCursor,
|
|
485
|
+
viewer:
|
|
486
|
+
server.viewer === null
|
|
487
|
+
? null
|
|
488
|
+
: {
|
|
489
|
+
filteredRank: server.viewer.filteredRank,
|
|
490
|
+
item:
|
|
491
|
+
server.viewer.item === null
|
|
492
|
+
? null
|
|
493
|
+
: mapNuanzeFollowedLeaderboardItem(server.viewer.item),
|
|
494
|
+
},
|
|
495
|
+
asOf: server.asOf,
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Maps a server-side `GET /wallets/leaderboard/followed/{viewAs}` response. A subaccount the
|
|
501
|
+
* follower does not follow maps to `filteredRank` null with `item` null; an existing but
|
|
502
|
+
* filter-excluded followed row keeps its full item (including `globalRank`) with `filteredRank`
|
|
503
|
+
* null.
|
|
504
|
+
*/
|
|
505
|
+
export function mapNuanzeFollowedLeaderboardPositionResponse(
|
|
506
|
+
server: NuanzeServerFollowedLeaderboardPositionResponse,
|
|
507
|
+
): GetNuanzeFollowedLeaderboardPositionResponse {
|
|
508
|
+
return {
|
|
509
|
+
timeframe: server.timeframe,
|
|
510
|
+
filteredRank: server.filteredRank,
|
|
511
|
+
item:
|
|
512
|
+
server.item === null
|
|
513
|
+
? null
|
|
514
|
+
: mapNuanzeFollowedLeaderboardItem(server.item),
|
|
444
515
|
asOf: server.asOf,
|
|
445
516
|
};
|
|
446
517
|
}
|