@nadohq/nuanze-client 0.68.0 → 0.70.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 +3 -0
- package/dist/{NuanzeClient-Br6paVRj.cjs → NuanzeClient-Ctcbv4_F.cjs} +5 -3
- package/dist/NuanzeClient-Ctcbv4_F.cjs.map +1 -0
- package/dist/NuanzeClient.cjs +1 -1
- package/dist/NuanzeClient.d.cts +5 -3
- package/dist/NuanzeClient.d.cts.map +1 -1
- package/dist/NuanzeClient.d.ts +5 -3
- package/dist/NuanzeClient.d.ts.map +1 -1
- package/dist/NuanzeClient.js +4 -2
- package/dist/NuanzeClient.js.map +1 -1
- package/dist/{NuanzeServerFailureError-D6KPGUg9.d.ts → NuanzeServerFailureError-BeiAW2Uo.d.ts} +2 -2
- package/dist/{NuanzeServerFailureError-D6KPGUg9.d.ts.map → NuanzeServerFailureError-BeiAW2Uo.d.ts.map} +1 -1
- package/dist/{NuanzeServerFailureError-BvCgAQBY.d.cts → NuanzeServerFailureError-CQOL2fxe.d.cts} +2 -2
- package/dist/{NuanzeServerFailureError-BvCgAQBY.d.cts.map → NuanzeServerFailureError-CQOL2fxe.d.cts.map} +1 -1
- package/dist/{clientModelTypes-Cu7A2-_S.d.ts → clientModelTypes-C0LBnfWU.d.cts} +16 -1
- package/dist/clientModelTypes-C0LBnfWU.d.cts.map +1 -0
- package/dist/{clientModelTypes-Cu7A2-_S.d.cts → clientModelTypes-C0LBnfWU.d.ts} +16 -1
- package/dist/clientModelTypes-C0LBnfWU.d.ts.map +1 -0
- package/dist/{clientTypes-CIJscdmP.d.ts → clientTypes-P72Dhpkq.d.ts} +2 -2
- package/dist/{clientTypes-CIJscdmP.d.ts.map → clientTypes-P72Dhpkq.d.ts.map} +1 -1
- package/dist/{clientTypes-hrCFTuWK.d.cts → clientTypes-kVDD2Lcp.d.cts} +2 -2
- package/dist/{clientTypes-hrCFTuWK.d.cts.map → clientTypes-kVDD2Lcp.d.cts.map} +1 -1
- package/dist/dataMappers.cjs +2 -0
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +4 -4
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +4 -4
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +2 -0
- package/dist/dataMappers.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/{serverModelTypes-CkEG2EjE.d.ts → serverModelTypes-Yx3OTvNk.d.cts} +4 -2
- package/dist/serverModelTypes-Yx3OTvNk.d.cts.map +1 -0
- package/dist/{serverModelTypes-CMwhkBLQ.d.cts → serverModelTypes-vnV8xv1g.d.ts} +4 -2
- package/dist/serverModelTypes-vnV8xv1g.d.ts.map +1 -0
- package/dist/{serverQueryTypes-C714Xx6q.d.cts → serverQueryTypes-BRxcYfpb.d.cts} +3 -3
- package/dist/{serverQueryTypes-C714Xx6q.d.cts.map → serverQueryTypes-BRxcYfpb.d.cts.map} +1 -1
- package/dist/{serverQueryTypes-Cyt-sd02.d.ts → serverQueryTypes-CO9GCAfM.d.ts} +3 -3
- package/dist/{serverQueryTypes-Cyt-sd02.d.ts.map → serverQueryTypes-CO9GCAfM.d.ts.map} +1 -1
- package/dist/types/NuanzeServerFailureError.d.cts +1 -1
- package/dist/types/NuanzeServerFailureError.d.ts +1 -1
- package/dist/types/clientModelTypes.cjs.map +1 -1
- package/dist/types/clientModelTypes.d.cts +1 -1
- package/dist/types/clientModelTypes.d.ts +1 -1
- package/dist/types/clientModelTypes.js.map +1 -1
- package/dist/types/clientTypes.d.cts +1 -1
- package/dist/types/clientTypes.d.ts +1 -1
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/serverModelTypes.d.cts +1 -1
- package/dist/types/serverModelTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.d.cts +1 -1
- package/dist/types/serverQueryTypes.d.ts +1 -1
- package/package.json +3 -3
- package/src/NuanzeClient.ts +4 -2
- package/src/dataMappers.ts +2 -0
- package/src/types/clientModelTypes.ts +15 -0
- package/src/types/serverModelTypes.ts +2 -0
- package/dist/NuanzeClient-Br6paVRj.cjs.map +0 -1
- package/dist/clientModelTypes-Cu7A2-_S.d.cts.map +0 -1
- package/dist/clientModelTypes-Cu7A2-_S.d.ts.map +0 -1
- package/dist/serverModelTypes-CMwhkBLQ.d.cts.map +0 -1
- package/dist/serverModelTypes-CkEG2EjE.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -91,6 +91,9 @@ omitted or has no source row (for the followed leaderboard: when the follower do
|
|
|
91
91
|
For subaccounts, privacy, trading, and username-claim filters define the filtered-rank population without removing
|
|
92
92
|
an existing full item or its `globalRank`; exclusion sets only `filteredRank` to null. On the followed leaderboard
|
|
93
93
|
`filteredRank` counts only the follower's filter-passing followed subaccounts, while `globalRank` stays global.
|
|
94
|
+
Every subaccount and followed leaderboard item also carries its own `filteredRank` next to `globalRank`: on collection
|
|
95
|
+
rows it is the position under the active filters, counted across cursor pages rather than within one page, and on a
|
|
96
|
+
`viewer` or position `item` it equals the enclosing `filteredRank`.
|
|
94
97
|
|
|
95
98
|
The dedicated point reads coexist with `viewAs`: `getWalletLeaderboardPosition({ address })` GETs
|
|
96
99
|
`/leaderboard/wallets/{address}`, `getSubaccountLeaderboardPosition({ subaccountHex })` GETs
|
|
@@ -120,7 +120,8 @@ var NuanzeClient = class {
|
|
|
120
120
|
* Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account
|
|
121
121
|
* PnL descending with nulls last. Username, display name, and avatar URL are null when
|
|
122
122
|
* unavailable.
|
|
123
|
-
* `globalRank` is independent of the active privacy and trading filters
|
|
123
|
+
* `globalRank` is independent of the active privacy and trading filters, while each item's
|
|
124
|
+
* `filteredRank` is its position under them, counted across pages. Pagination uses a
|
|
124
125
|
* filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that
|
|
125
126
|
* subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`
|
|
126
127
|
* is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its
|
|
@@ -195,7 +196,8 @@ var NuanzeClient = class {
|
|
|
195
196
|
* follows, sorted by PnL descending with nulls last. The follower does not need a claimed
|
|
196
197
|
* username. Subaccounts with no PnL in the window are included by default with null PnL/rank,
|
|
197
198
|
* zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.
|
|
198
|
-
*
|
|
199
|
+
* Each item's `filteredRank` is its position among the follower's filter-passing followed
|
|
200
|
+
* subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's
|
|
199
201
|
* `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full
|
|
200
202
|
* item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or
|
|
201
203
|
* the follower does not actively follow that subaccount, and a filter-excluded followed row
|
|
@@ -431,4 +433,4 @@ Object.defineProperty(exports, "NuanzeClient", {
|
|
|
431
433
|
}
|
|
432
434
|
});
|
|
433
435
|
|
|
434
|
-
//# sourceMappingURL=NuanzeClient-
|
|
436
|
+
//# sourceMappingURL=NuanzeClient-Ctcbv4_F.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NuanzeClient-Ctcbv4_F.cjs","names":["mapNuanzeNewsResponse","mapNuanzeMarketsResponse","mapNuanzeMarketByTickerResponse","mapNuanzeFundingRatesResponse","mapNuanzeLeaderboardResponse","mapNuanzeWalletLeaderboardPositionResponse","mapNuanzeSubaccountLeaderboardResponse","mapNuanzeSubaccountLeaderboardPositionResponse","mapNuanzeSubaccountStatsResponse","mapNuanzePlatformSummaryResponse","mapNuanzeCohortsResponse","mapNuanzeFollowedLeaderboardResponse","mapNuanzeFollowedLeaderboardPositionResponse","mapNuanzeWalletSummaryResponse","mapNuanzeWalletPositionsResponse","mapNuanzeMarketTradesResponse","mapNuanzeMarketCandlesResponse","mapNuanzeWalletTradesResponse","mapNuanzeWalletPnlResponse","mapNuanzeWalletPnlSeriesResponse","mapNuanzeCollateralFlowsResponse","mapNuanzeCollateralFlowSummaryResponse","mapNuanzeCollateralFlowSeriesResponse","mapNuanzeMarketPositioningResponse","mapNuanzeMarketPositionsResponse","mapNuanzeOpenPositionsResponse","isNuanzeServerFailureResponse","NuanzeServerFailureError"],"sources":["../src/NuanzeClient.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapNuanzeCohortsResponse,\n mapNuanzeCollateralFlowSeriesResponse,\n mapNuanzeCollateralFlowSummaryResponse,\n mapNuanzeCollateralFlowsResponse,\n mapNuanzeFollowedLeaderboardPositionResponse,\n mapNuanzeFollowedLeaderboardResponse,\n mapNuanzeFundingRatesResponse,\n mapNuanzeLeaderboardResponse,\n mapNuanzeMarketByTickerResponse,\n mapNuanzeMarketCandlesResponse,\n mapNuanzeMarketPositioningResponse,\n mapNuanzeMarketPositionsResponse,\n mapNuanzeMarketTradesResponse,\n mapNuanzeMarketsResponse,\n mapNuanzeNewsResponse,\n mapNuanzeOpenPositionsResponse,\n mapNuanzePlatformSummaryResponse,\n mapNuanzeSubaccountLeaderboardPositionResponse,\n mapNuanzeSubaccountLeaderboardResponse,\n mapNuanzeSubaccountStatsResponse,\n mapNuanzeWalletLeaderboardPositionResponse,\n mapNuanzeWalletPnlResponse,\n mapNuanzeWalletPnlSeriesResponse,\n mapNuanzeWalletPositionsResponse,\n mapNuanzeWalletSummaryResponse,\n mapNuanzeWalletTradesResponse,\n} from './dataMappers';\nimport {\n GetNuanzeCohortsResponse,\n GetNuanzeCollateralFlowSeriesParams,\n GetNuanzeCollateralFlowSeriesResponse,\n GetNuanzeCollateralFlowSummaryParams,\n GetNuanzeCollateralFlowSummaryResponse,\n GetNuanzeCollateralFlowsParams,\n GetNuanzeCollateralFlowsResponse,\n GetNuanzeFollowedLeaderboardParams,\n GetNuanzeFollowedLeaderboardPositionParams,\n GetNuanzeFollowedLeaderboardPositionResponse,\n GetNuanzeFollowedLeaderboardResponse,\n GetNuanzeFundingRatesParams,\n GetNuanzeFundingRatesResponse,\n GetNuanzeLeaderboardParams,\n GetNuanzeLeaderboardResponse,\n GetNuanzeMarketByTickerParams,\n GetNuanzeMarketByTickerResponse,\n GetNuanzeMarketCandlesParams,\n GetNuanzeMarketCandlesResponse,\n GetNuanzeMarketPositioningParams,\n GetNuanzeMarketPositioningResponse,\n GetNuanzeMarketPositionsParams,\n GetNuanzeMarketPositionsResponse,\n GetNuanzeMarketTradesParams,\n GetNuanzeMarketTradesResponse,\n GetNuanzeMarketsParams,\n GetNuanzeMarketsResponse,\n GetNuanzeNewsParams,\n GetNuanzeNewsResponse,\n GetNuanzeOpenPositionsParams,\n GetNuanzeOpenPositionsResponse,\n GetNuanzePlatformSummaryParams,\n GetNuanzePlatformSummaryResponse,\n GetNuanzeSubaccountLeaderboardParams,\n GetNuanzeSubaccountLeaderboardPositionParams,\n GetNuanzeSubaccountLeaderboardPositionResponse,\n GetNuanzeSubaccountLeaderboardResponse,\n GetNuanzeSubaccountStatsParams,\n GetNuanzeSubaccountStatsResponse,\n GetNuanzeWalletLeaderboardPositionParams,\n GetNuanzeWalletLeaderboardPositionResponse,\n GetNuanzeWalletPnlParams,\n GetNuanzeWalletPnlResponse,\n GetNuanzeWalletPnlSeriesParams,\n GetNuanzeWalletPnlSeriesResponse,\n GetNuanzeWalletPositionsParams,\n GetNuanzeWalletPositionsResponse,\n GetNuanzeWalletSummaryParams,\n GetNuanzeWalletSummaryResponse,\n GetNuanzeWalletTradesParams,\n GetNuanzeWalletTradesResponse,\n NuanzeMarketSelector,\n} from './types/clientTypes';\nimport { NuanzeServerFailureError } from './types/NuanzeServerFailureError';\nimport { NuanzeServerMarketPositioningResponse } from './types/serverModelTypes';\nimport {\n NuanzeServerCohortsResponse,\n NuanzeServerCollateralFlowSeriesResponse,\n NuanzeServerCollateralFlowSummaryResponse,\n NuanzeServerCollateralFlowsResponse,\n NuanzeServerFollowedLeaderboardPositionResponse,\n NuanzeServerFollowedLeaderboardResponse,\n NuanzeServerFundingRatesResponse,\n NuanzeServerLeaderboardResponse,\n NuanzeServerMarketByTickerResponse,\n NuanzeServerMarketCandlesResponse,\n NuanzeServerMarketPositionsResponse,\n NuanzeServerMarketTradesResponse,\n NuanzeServerMarketsResponse,\n NuanzeServerNewsResponse,\n NuanzeServerOpenPositionsResponse,\n NuanzeServerPlatformSummaryResponse,\n NuanzeServerSubaccountLeaderboardPositionResponse,\n NuanzeServerSubaccountLeaderboardResponse,\n NuanzeServerSubaccountStatsResponse,\n NuanzeServerWalletLeaderboardPositionResponse,\n NuanzeServerWalletPnlResponse,\n NuanzeServerWalletPnlSeriesResponse,\n NuanzeServerWalletPositionsResponse,\n NuanzeServerWalletSummaryResponse,\n NuanzeServerWalletTradesResponse,\n isNuanzeServerFailureResponse,\n} from './types/serverQueryTypes';\n\n/**\n * Options for constructing a {@link NuanzeClient}.\n */\nexport interface NuanzeClientOpts {\n /**\n * Base URL of the Nuanze API, including the version segment, e.g. {@link NUANZE_CLIENT_ENDPOINTS}.\n */\n url: string;\n}\n\n/**\n * Client for the Nuanze public analytics API: markets, wallets, trades, candles, collateral flows,\n * and positioning.\n *\n * Read-only and credential-free, so unlike the other service clients it takes no wallet client or\n * linked signer. It also sends no `x-nado-client-type` header: Nuanze is a public API that does not\n * attribute traffic per client, and its `Access-Control-Allow-Headers` does not list the header, so\n * sending it would fail CORS preflight in the browser. All operations are GET.\n */\nexport class NuanzeClient {\n readonly opts: NuanzeClientOpts;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: NuanzeClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n // Nuanze is public and answers every origin with `Access-Control-Allow-Origin: *`, which\n // browsers reject for credentialed requests.\n withCredentials: false,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n // Repeatable `productId` must serialize as `productId=1&productId=2` (OpenAPI explode).\n paramsSerializer: { indexes: null },\n });\n }\n\n /**\n * Lists published editorial stories, sorted by `publishedAt` descending then `id` descending.\n * Ticker filters include every product for the asset without distinguishing spot from perpetual\n * markets; an optional product ID narrows to one exact product. The opaque cursor is exclusive\n * and bound to normalized filters. Raw article ingestion, scoring, queue, and newsdesk fields are\n * excluded.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getNews(\n params: GetNuanzeNewsParams = {},\n ): Promise<GetNuanzeNewsResponse> {\n return mapNuanzeNewsResponse(\n await this.getJson<NuanzeServerNewsResponse>('/news', params),\n );\n }\n\n /**\n * Gets the active market universe, ordered by `productId` ascending. Never truncated, so `count`\n * always equals the length of `markets`. Market metadata refreshes about every five minutes and\n * prices about every minute.\n *\n * @throws {NuanzeServerFailureError} With error code `BAD_REQUEST` if a filter value is not a\n * documented venue or tradability state.\n */\n async getMarkets(\n params: GetNuanzeMarketsParams = {},\n ): Promise<GetNuanzeMarketsResponse> {\n return mapNuanzeMarketsResponse(\n await this.getJson<NuanzeServerMarketsResponse>('/markets', params),\n );\n }\n\n /**\n * Resolves a market by {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`;\n * when both are given, `productId` is used for the path segment and `ticker` is ignored.\n * Ticker lookup is case-insensitive and accepts canonical tickers or legacy source symbols.\n * An explicit unavailable venue returns `MARKET_NOT_FOUND`. With no venue, `strictVenue=true`\n * returns `AMBIGUOUS_MARKET` for multi-venue assets; otherwise the primary venue is used.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid\n * selectors, and `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketByTicker(\n params: GetNuanzeMarketByTickerParams,\n ): Promise<GetNuanzeMarketByTickerResponse> {\n return mapNuanzeMarketByTickerResponse(\n await this.getMarketJson<NuanzeServerMarketByTickerResponse>(params),\n );\n }\n\n /**\n * Lists the latest funding observation per active perpetual market, refreshed about every five\n * minutes.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getFundingRates(\n params: GetNuanzeFundingRatesParams = {},\n ): Promise<GetNuanzeFundingRatesResponse> {\n return mapNuanzeFundingRatesResponse(\n await this.getJson<NuanzeServerFundingRatesResponse>(\n '/funding/rates',\n params,\n ),\n );\n }\n\n /**\n * Gets the account PnL leaderboard. Equity-basis account PnL includes realized and unrealized\n * movement plus funding and is not realized PnL. Pass `viewAs` with an EVM address to also\n * receive that wallet's full row plus rank as `viewer`, computed in the same request without\n * altering pagination; `viewer` is null when `viewAs` is omitted or has no source row.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when `viewAs` is malformed.\n */\n async getLeaderboard(\n params: GetNuanzeLeaderboardParams = {},\n ): Promise<GetNuanzeLeaderboardResponse> {\n return mapNuanzeLeaderboardResponse(\n await this.getJson<NuanzeServerLeaderboardResponse>(\n '/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one wallet's leaderboard position by explicit EVM address. Equity-basis account PnL\n * includes realized and unrealized movement plus funding and is not realized PnL. `item` is\n * null only when the wallet leaderboard source row is absent; `rank` is the global rank in\n * the unfiltered leaderboard, independent of collection `limit` and `offset`. For an inline\n * lookup scoped to a ranked page, `getLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when the address is malformed.\n */\n async getWalletLeaderboardPosition(\n params: GetNuanzeWalletLeaderboardPositionParams,\n ): Promise<GetNuanzeWalletLeaderboardPositionResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletLeaderboardPositionResponse(\n await this.getJson<NuanzeServerWalletLeaderboardPositionResponse>(\n `/leaderboard/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account\n * PnL descending with nulls last. Username, display name, and avatar URL are null when\n * unavailable.\n * `globalRank` is independent of the active privacy and trading filters, while each item's\n * `filteredRank` is its position under them, counted across pages. Pagination uses a\n * filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that\n * subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`\n * is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its\n * item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when filters, the cursor, or `viewAs`\n * are invalid.\n */\n async getSubaccountLeaderboard(\n params: GetNuanzeSubaccountLeaderboardParams = {},\n ): Promise<GetNuanzeSubaccountLeaderboardResponse> {\n return mapNuanzeSubaccountLeaderboardResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardResponse>(\n '/leaderboard/subaccounts',\n params,\n ),\n );\n }\n\n /**\n * Gets one subaccount's leaderboard position by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form). `item.globalRank` reflects the subaccount's true position\n * across the full leaderboard, independent of the `includePrivate`, `includeUntraded`, and\n * `includeUnclaimed` filters, while `filteredRank` uses the request's active filters: an\n * absent source row yields `filteredRank` null with `item` null, an existing but\n * filter-excluded row keeps its full item with `filteredRank` null, and an included row\n * carries both ranks. For an inline lookup scoped to a ranked page,\n * `getSubaccountLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when filters are invalid, or\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed.\n */\n async getSubaccountLeaderboardPosition(\n params: GetNuanzeSubaccountLeaderboardPositionParams,\n ): Promise<GetNuanzeSubaccountLeaderboardPositionResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountLeaderboardPositionResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardPositionResponse>(\n `/leaderboard/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets every trader stat card for one subaccount by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form): leaderboard rank and window PnL, snapshot volume,\n * average leverage over current isolated perp legs, best/worst close-event trade in the\n * window, point-in-time long/short bias from current open perp legs, and the most-traded\n * market. Best/worst trade, leverage, bias percentages, and most-traded market are null\n * when the subaccount has no closes, isolated margin, open positions, or activity rows\n * respectively.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe is invalid,\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed, or `WALLET_NOT_FOUND` when\n * the hex is unknown.\n */\n async getSubaccountStats(\n params: GetNuanzeSubaccountStatsParams,\n ): Promise<GetNuanzeSubaccountStatsResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountStatsResponse(\n await this.getJson<NuanzeServerSubaccountStatsResponse>(\n `/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets platform activity summary from five-minute aggregates.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if the window is not a documented value.\n */\n async getPlatformSummary(\n params: GetNuanzePlatformSummaryParams = {},\n ): Promise<GetNuanzePlatformSummaryResponse> {\n return mapNuanzePlatformSummaryResponse(\n await this.getJson<NuanzeServerPlatformSummaryResponse>(\n '/platform/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets the six fixed wallet cohorts of the nuanze.co cohorts page. Every wallet that has traded\n * belongs to exactly one, chosen by its lifetime equity-basis account PnL summed across its\n * subaccounts: `extremely_profitable` [1,000,000, +inf), `very_profitable` [100,000, 1,000,000),\n * `profitable` [0, 100,000), `unprofitable` [-100,000, 0), `very_unprofitable` [-1,000,000,\n * -100,000), and `rekt` (-inf, -1,000,000), the same cohorts as `getMarketPositioning` with\n * `groupBy: 'cohort'`. All six are always returned in that order, each with PnL totals,\n * profit/loss wallet counts, lifetime trades, and the members' current open perp notional split\n * long/short; `longPct` and `shortPct` are null when the cohort is flat. `series` samples the\n * cohort's long percentage every four hours over the last 30 days, oldest first. Membership and\n * aggregates refresh about every five minutes, series points every four hours.\n */\n async getCohorts(): Promise<GetNuanzeCohortsResponse> {\n return mapNuanzeCohortsResponse(\n await this.getJson<NuanzeServerCohortsResponse>('/cohorts'),\n );\n }\n\n /**\n * Gets a keyset-paginated leaderboard for every subaccount a supplied bytes32 subaccount actively\n * follows, sorted by PnL descending with nulls last. The follower does not need a claimed\n * username. Subaccounts with no PnL in the window are included by default with null PnL/rank,\n * zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.\n * Each item's `filteredRank` is its position among the follower's filter-passing followed\n * subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's\n * `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full\n * item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or\n * the follower does not actively follow that subaccount, and a filter-excluded followed row\n * keeps its item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when params, the cursor, the follower\n * hex, or `viewAs` are invalid.\n */\n async getFollowedLeaderboard(\n params: GetNuanzeFollowedLeaderboardParams,\n ): Promise<GetNuanzeFollowedLeaderboardResponse> {\n return mapNuanzeFollowedLeaderboardResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardResponse>(\n '/wallets/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one followed subaccount's position within a follower's leaderboard. `subaccountHex`\n * identifies the follower whose active follow graph is ranked and `viewAs` the followed\n * subaccount to position, both as bytes32 subaccount hex (the SDK `subaccountToHex` form).\n * `item.globalRank` reflects the subaccount's true position across the full global subaccount\n * leaderboard, independent of the follow graph and of the `includeUntraded`, `includePrivate`,\n * and `includeUnclaimed` filters, while `filteredRank` counts only the follower's followed\n * subaccounts passing the request's active filters: a subaccount the follower does not follow\n * yields `filteredRank` null with `item` null, an existing but filter-excluded followed row\n * keeps its full item with `filteredRank` null, and an included row carries both ranks. For an\n * inline lookup scoped to a ranked page, `getFollowedLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe or filters are\n * invalid, or `INVALID_SUBACCOUNT` when either subaccount hex is malformed.\n */\n async getFollowedLeaderboardPosition(\n params: GetNuanzeFollowedLeaderboardPositionParams,\n ): Promise<GetNuanzeFollowedLeaderboardPositionResponse> {\n const { viewAs, ...query } = params;\n return mapNuanzeFollowedLeaderboardPositionResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardPositionResponse>(\n `/wallets/leaderboard/followed/${encodeURIComponent(viewAs)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets replica-backed wallet analytics. Without `subaccountName`, latest cumulative values are\n * selected per known subaccount and then summed. The response is a snapshot and does not claim\n * live health, withdrawable collateral, open-order, or signer state.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletSummary(\n params: GetNuanzeWalletSummaryParams,\n ): Promise<GetNuanzeWalletSummaryResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletSummaryResponse(\n await this.getJson<NuanzeServerWalletSummaryResponse>(\n `/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Lists at most 500 current replica position rows across all known subaccounts by default. Rows\n * remain per subaccount. Spot rows are excluded unless `includeSpot=true`. This is not an\n * execution-grade live feed.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPositions(\n params: GetNuanzeWalletPositionsParams,\n ): Promise<GetNuanzeWalletPositionsResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPositionsResponse(\n await this.getJson<NuanzeServerWalletPositionsResponse>(\n `/wallets/${encodeURIComponent(address)}/positions`,\n query,\n ),\n );\n }\n\n /**\n * Lists market trades for a {@link NuanzeMarketSelector}: one taker-side row per match, sorted\n * by `matchedAt` then `id` descending. Supply at least `ticker` or `productId`; when both are\n * given, `productId` is used for the path segment and `ticker` is ignored. The exclusive cursor\n * is bound to operation and normalized filters. `from` is inclusive and `to` exclusive. Wallet\n * identity is absent.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketTrades(\n params: GetNuanzeMarketTradesParams,\n ): Promise<GetNuanzeMarketTradesResponse> {\n return mapNuanzeMarketTradesResponse(\n await this.getMarketJson<NuanzeServerMarketTradesResponse>(\n params,\n '/trades',\n ),\n );\n }\n\n /**\n * Lists market candles for a {@link NuanzeMarketSelector}. Supply at least `ticker` or\n * `productId`; when both are given, `productId` is used for the path segment and `ticker` is\n * ignored. Source storage is 1h; 4h and 1d are UTC-aligned rollups and missing bars are not\n * interpolated. The newest `limit` matching bars are selected and returned oldest-to-newest,\n * at most 750, with no pagination. A current bucket has `complete=false`.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_INTERVAL`, `RANGE_TOO_LARGE`,\n * `AMBIGUOUS_MARKET`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve.\n */\n async getMarketCandles(\n params: GetNuanzeMarketCandlesParams,\n ): Promise<GetNuanzeMarketCandlesResponse> {\n return mapNuanzeMarketCandlesResponse(\n await this.getMarketJson<NuanzeServerMarketCandlesResponse>(\n params,\n '/candles',\n ),\n );\n }\n\n /**\n * Lists wallet-owned maker and taker execution rows, sorted by `matchedAt` then `id` descending.\n * The cursor is exclusive and filter-bound. `from` is inclusive and `to` exclusive.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletTrades(\n params: GetNuanzeWalletTradesParams,\n ): Promise<GetNuanzeWalletTradesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletTradesResponse(\n await this.getJson<NuanzeServerWalletTradesResponse>(\n `/wallets/${encodeURIComponent(address)}/trades`,\n query,\n ),\n );\n }\n\n /**\n * Gets wallet account PnL. 24h is rolling and uses hourly snapshots with a daily fallback\n * baseline. Longer windows use daily snapshots; `all` starts at earliest coverage. PnL includes\n * realized and unrealized movement plus funding.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnl(\n params: GetNuanzeWalletPnlParams,\n ): Promise<GetNuanzeWalletPnlResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlResponse(\n await this.getJson<NuanzeServerWalletPnlResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl`,\n query,\n ),\n );\n }\n\n /**\n * Gets a wallet account series of at most 1,000 deterministically sampled points ordered by\n * timestamp. Series contain a boundary anchor and a carried-forward request-time tip; synthetic\n * points are identified. Latest buckets may be provisional.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnlSeries(\n params: GetNuanzeWalletPnlSeriesParams,\n ): Promise<GetNuanzeWalletPnlSeriesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlSeriesResponse(\n await this.getJson<NuanzeServerWalletPnlSeriesResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl/series`,\n query,\n ),\n );\n }\n\n /**\n * Lists public collateral events, sorted by timestamp then `id` descending. Repeated `productId`\n * uses OR semantics. `minUsd` excludes unvalued events; without it unvalued events remain.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getCollateralFlows(\n params: GetNuanzeCollateralFlowsParams = {},\n ): Promise<GetNuanzeCollateralFlowsResponse> {\n return mapNuanzeCollateralFlowsResponse(\n await this.getJson<NuanzeServerCollateralFlowsResponse>('/flows', params),\n );\n }\n\n /**\n * Gets collateral flow aggregates: deposited, withdrawn, net, and gross, with valuation coverage\n * and a prior equal-window comparison. `all` has no prior window.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getCollateralFlowSummary(\n params: GetNuanzeCollateralFlowSummaryParams = {},\n ): Promise<GetNuanzeCollateralFlowSummaryResponse> {\n return mapNuanzeCollateralFlowSummaryResponse(\n await this.getJson<NuanzeServerCollateralFlowSummaryResponse>(\n '/flows/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets collateral flow series of at most 1,000 UTC buckets. Allowed timeframe/bucket pairs are\n * 24h/hour, 7d/hour or day (default hour), 30d/day, and all/day.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_BUCKET` or `BAD_REQUEST` when the pair or\n * filters are invalid.\n */\n async getCollateralFlowSeries(\n params: GetNuanzeCollateralFlowSeriesParams = {},\n ): Promise<GetNuanzeCollateralFlowSeriesResponse> {\n return mapNuanzeCollateralFlowSeriesResponse(\n await this.getJson<NuanzeServerCollateralFlowSeriesResponse>(\n '/flows/series',\n params,\n ),\n );\n }\n\n /**\n * Gets privacy-preserving aggregate positioning for an active perpetual identified by\n * {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`; when both are given,\n * `productId` is used for the path segment and `ticker` is ignored. Cross and isolated legs\n * are summed within owner/subaccount/product before direction classification. Every cell\n * requires at least 20 distinct contributing owners. No identity, individual position, entry\n * price, PnL, margin, or leverage fields are returned.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid input,\n * and `MARKET_NOT_FOUND` when the selector does not resolve to a perp.\n */\n async getMarketPositioning(\n params: GetNuanzeMarketPositioningParams,\n ): Promise<GetNuanzeMarketPositioningResponse> {\n return mapNuanzeMarketPositioningResponse(\n await this.getMarketJson<NuanzeServerMarketPositioningResponse>(\n params,\n '/positioning',\n ),\n );\n }\n\n /**\n * Lists open perpetual position legs for a market identified by {@link NuanzeMarketSelector}.\n * Supply at least `ticker` or `productId`; when both are given, `productId` is used for the\n * path segment and `ticker` is ignored. Results default to absolute notional descending and\n * can be ordered by signed unrealized PnL or absolute base amount in either direction. Spot\n * markets are not supported. Legs below $10 absolute notional are excluded. Wallet addresses,\n * nullable synced usernames, display names, and avatar URLs, and signed exact base amounts are\n * returned.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve to a perp.\n */\n async getMarketPositions(\n params: GetNuanzeMarketPositionsParams,\n ): Promise<GetNuanzeMarketPositionsResponse> {\n return mapNuanzeMarketPositionsResponse(\n await this.getMarketJson<NuanzeServerMarketPositionsResponse>(\n params,\n '/positions',\n ),\n );\n }\n\n /**\n * Lists current open perpetual position legs across every market by signed unrealized PnL.\n * Descending returns the largest gainers and ascending returns the largest losers. This is a\n * latest indexed snapshot with no timeframe. Legs below $10 absolute notional are excluded.\n * Private subaccounts are excluded unless `includePrivate=true`. Each row includes market\n * identity, nullable synced username, display name, and avatar URL, and its source snapshot\n * timestamp.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_CURSOR`, `CURSOR_FILTER_MISMATCH`, or\n * `BAD_REQUEST` when the query or cursor is invalid.\n */\n async getOpenPositions(\n params: GetNuanzeOpenPositionsParams = {},\n ): Promise<GetNuanzeOpenPositionsResponse> {\n return mapNuanzeOpenPositionsResponse(\n await this.getJson<NuanzeServerOpenPositionsResponse>(\n '/positions',\n params,\n ),\n );\n }\n\n /**\n * Performs a GET against `{baseUrl}{path}` and classifies the status before returning the body.\n */\n private async getJson<T>(path: string, params?: object): Promise<T> {\n return this.requestJson<T>(path, { params });\n }\n\n private async getMarketJson<T>(\n params: NuanzeMarketSelector & object,\n suffix = '',\n ): Promise<T> {\n const { productId, ticker, ...query } = params;\n const selector = productId ?? ticker;\n if (selector === undefined) {\n throw new Error('A market ticker or productId is required.');\n }\n return this.getJson<T>(\n `/markets/${encodeURIComponent(selector.toString())}${suffix}`,\n query,\n );\n }\n\n private async requestJson<T>(\n path: string,\n config: { params?: object } = {},\n ): Promise<T> {\n const response = await this.axiosInstance.request<T>({\n method: 'GET',\n url: `${this.opts.url}${path}`,\n ...config,\n });\n this.checkResponseStatus(response);\n return response.data;\n }\n\n /**\n * Validates the HTTP status before interpreting the body. Nuanze maps every domain failure onto a\n * non-2xx status carrying a failure envelope, so anything else is a transport-level error.\n */\n private checkResponseStatus(response: AxiosResponse<unknown>) {\n if (response.status >= 200 && response.status < 300) {\n return;\n }\n if (isNuanzeServerFailureResponse(response.data)) {\n throw new NuanzeServerFailureError(response.data, response.status);\n }\n throw new Error(\n `Unexpected response from Nuanze: ${response.status} ${response.statusText}. Data: ${JSON.stringify(response.data)}`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,IAAa,eAAb,MAA0B;CAIxB,YAAY,MAAwB;EAClC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAA,QAAM,OAAO;GAGhC,iBAAiB;GAEjB,sBAAsB;GAEtB,kBAAkB,EAAE,SAAS,KAAK;EACpC,CAAC;CACH;;;;;;;;;;;CAYA,MAAM,QACJ,SAA8B,CAAC,GACC;EAChC,OAAOA,oBAAAA,sBACL,MAAM,KAAK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ACR,KAAK,GAAG,KAAK,KAAK,MAAM;GACxB,GAAG;EACL,CAAC;EACD,KAAK,oBAAoB,QAAQ;EACjC,OAAO,SAAS;CAClB;;;;;CAMA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAIC,+BAAAA,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAIC,uCAAAA,yBAAyB,SAAS,MAAM,SAAS,MAAM;EAEnE,MAAM,IAAI,MACR,oCAAoC,SAAS,OAAO,GAAG,SAAS,WAAW,UAAU,KAAK,UAAU,SAAS,IAAI,GACnH;CACF;AACF"}
|
package/dist/NuanzeClient.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_NuanzeClient = require("./NuanzeClient-
|
|
2
|
+
const require_NuanzeClient = require("./NuanzeClient-Ctcbv4_F.cjs");
|
|
3
3
|
require("./dataMappers.cjs");
|
|
4
4
|
exports.NuanzeClient = require_NuanzeClient.NuanzeClient;
|
package/dist/NuanzeClient.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as GetNuanzeOpenPositionsParams, B as GetNuanzeWalletLeaderboardPositionParams, C as GetNuanzeMarketPositionsResponse, D as GetNuanzeMarketsResponse, E as GetNuanzeMarketsParams, F as GetNuanzeSubaccountLeaderboardPositionParams, G as GetNuanzeWalletPnlSeriesResponse, H as GetNuanzeWalletPnlParams, I as GetNuanzeSubaccountLeaderboardPositionResponse, J as GetNuanzeWalletSummaryParams, K as GetNuanzeWalletPositionsParams, L as GetNuanzeSubaccountLeaderboardResponse, M as GetNuanzePlatformSummaryParams, N as GetNuanzePlatformSummaryResponse, O as GetNuanzeNewsParams, P as GetNuanzeSubaccountLeaderboardParams, R as GetNuanzeSubaccountStatsParams, S as GetNuanzeMarketPositionsParams, T as GetNuanzeMarketTradesResponse, U as GetNuanzeWalletPnlResponse, V as GetNuanzeWalletLeaderboardPositionResponse, W as GetNuanzeWalletPnlSeriesParams, X as GetNuanzeWalletTradesParams, Y as GetNuanzeWalletSummaryResponse, Z as GetNuanzeWalletTradesResponse, _ as GetNuanzeMarketByTickerResponse, a as GetNuanzeCollateralFlowSummaryResponse, b as GetNuanzeMarketPositioningParams, c as GetNuanzeFollowedLeaderboardParams, d as GetNuanzeFollowedLeaderboardResponse, f as GetNuanzeFundingRatesParams, g as GetNuanzeMarketByTickerParams, h as GetNuanzeLeaderboardResponse, i as GetNuanzeCollateralFlowSummaryParams, j as GetNuanzeOpenPositionsResponse, k as GetNuanzeNewsResponse, l as GetNuanzeFollowedLeaderboardPositionParams, m as GetNuanzeLeaderboardParams, n as GetNuanzeCollateralFlowSeriesParams, o as GetNuanzeCollateralFlowsParams, p as GetNuanzeFundingRatesResponse, q as GetNuanzeWalletPositionsResponse, r as GetNuanzeCollateralFlowSeriesResponse, s as GetNuanzeCollateralFlowsResponse, t as GetNuanzeCohortsResponse, u as GetNuanzeFollowedLeaderboardPositionResponse, v as GetNuanzeMarketCandlesParams, w as GetNuanzeMarketTradesParams, x as GetNuanzeMarketPositioningResponse, y as GetNuanzeMarketCandlesResponse, z as GetNuanzeSubaccountStatsResponse } from "./clientTypes-
|
|
1
|
+
import { A as GetNuanzeOpenPositionsParams, B as GetNuanzeWalletLeaderboardPositionParams, C as GetNuanzeMarketPositionsResponse, D as GetNuanzeMarketsResponse, E as GetNuanzeMarketsParams, F as GetNuanzeSubaccountLeaderboardPositionParams, G as GetNuanzeWalletPnlSeriesResponse, H as GetNuanzeWalletPnlParams, I as GetNuanzeSubaccountLeaderboardPositionResponse, J as GetNuanzeWalletSummaryParams, K as GetNuanzeWalletPositionsParams, L as GetNuanzeSubaccountLeaderboardResponse, M as GetNuanzePlatformSummaryParams, N as GetNuanzePlatformSummaryResponse, O as GetNuanzeNewsParams, P as GetNuanzeSubaccountLeaderboardParams, R as GetNuanzeSubaccountStatsParams, S as GetNuanzeMarketPositionsParams, T as GetNuanzeMarketTradesResponse, U as GetNuanzeWalletPnlResponse, V as GetNuanzeWalletLeaderboardPositionResponse, W as GetNuanzeWalletPnlSeriesParams, X as GetNuanzeWalletTradesParams, Y as GetNuanzeWalletSummaryResponse, Z as GetNuanzeWalletTradesResponse, _ as GetNuanzeMarketByTickerResponse, a as GetNuanzeCollateralFlowSummaryResponse, b as GetNuanzeMarketPositioningParams, c as GetNuanzeFollowedLeaderboardParams, d as GetNuanzeFollowedLeaderboardResponse, f as GetNuanzeFundingRatesParams, g as GetNuanzeMarketByTickerParams, h as GetNuanzeLeaderboardResponse, i as GetNuanzeCollateralFlowSummaryParams, j as GetNuanzeOpenPositionsResponse, k as GetNuanzeNewsResponse, l as GetNuanzeFollowedLeaderboardPositionParams, m as GetNuanzeLeaderboardParams, n as GetNuanzeCollateralFlowSeriesParams, o as GetNuanzeCollateralFlowsParams, p as GetNuanzeFundingRatesResponse, q as GetNuanzeWalletPositionsResponse, r as GetNuanzeCollateralFlowSeriesResponse, s as GetNuanzeCollateralFlowsResponse, t as GetNuanzeCohortsResponse, u as GetNuanzeFollowedLeaderboardPositionResponse, v as GetNuanzeMarketCandlesParams, w as GetNuanzeMarketTradesParams, x as GetNuanzeMarketPositioningResponse, y as GetNuanzeMarketCandlesResponse, z as GetNuanzeSubaccountStatsResponse } from "./clientTypes-kVDD2Lcp.cjs";
|
|
2
2
|
import { AxiosInstance } from "axios";
|
|
3
3
|
|
|
4
4
|
//#region src/NuanzeClient.d.ts
|
|
@@ -87,7 +87,8 @@ declare class NuanzeClient {
|
|
|
87
87
|
* Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account
|
|
88
88
|
* PnL descending with nulls last. Username, display name, and avatar URL are null when
|
|
89
89
|
* unavailable.
|
|
90
|
-
* `globalRank` is independent of the active privacy and trading filters
|
|
90
|
+
* `globalRank` is independent of the active privacy and trading filters, while each item's
|
|
91
|
+
* `filteredRank` is its position under them, counted across pages. Pagination uses a
|
|
91
92
|
* filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that
|
|
92
93
|
* subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`
|
|
93
94
|
* is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its
|
|
@@ -150,7 +151,8 @@ declare class NuanzeClient {
|
|
|
150
151
|
* follows, sorted by PnL descending with nulls last. The follower does not need a claimed
|
|
151
152
|
* username. Subaccounts with no PnL in the window are included by default with null PnL/rank,
|
|
152
153
|
* zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.
|
|
153
|
-
*
|
|
154
|
+
* Each item's `filteredRank` is its position among the follower's filter-passing followed
|
|
155
|
+
* subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's
|
|
154
156
|
* `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full
|
|
155
157
|
* item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or
|
|
156
158
|
* the follower does not actively follow that subaccount, and a filter-excluded followed row
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeClient.d.cts","names":[],"sources":["../src/src/NuanzeClient.ts"],"mappings":";;;;;;AAqHA;UAAiB,gBAAA;;;AAIZ;EAAH,GAAG;AAAA;;;;;;;;;;cAYQ,YAAA;EAAA,SACF,IAAA,EAAM,gBAAA;EAAA,SACN,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,gBAAA;EAwER;;;;;;;;;;EAjDJ,OAAA,CACJ,MAAA,GAAQ,mBAAA,GACP,OAAA,CAAQ,qBAAA;
|
|
1
|
+
{"version":3,"file":"NuanzeClient.d.cts","names":[],"sources":["../src/src/NuanzeClient.ts"],"mappings":";;;;;;AAqHA;UAAiB,gBAAA;;;AAIZ;EAAH,GAAG;AAAA;;;;;;;;;;cAYQ,YAAA;EAAA,SACF,IAAA,EAAM,gBAAA;EAAA,SACN,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,gBA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,OAAA,CAAQ,gCAAA;EAwGR;;;;;;;;;;;EAnFG,eAAA,CACJ,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EAkIL;;;;;;;;;;;EA9GA,gBAAA,CACJ,MAAA,EAAQ,4BAAA,GACP,OAAA,CAAQ,8BAAA;EA6JT;;;;;;;;EA5II,eAAA,CACJ,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EAmLG;;;;AAgCa;;;;EAjMrB,YAAA,CACJ,MAAA,EAAQ,wBAAA,GACP,OAAA,CAAQ,0BAAA;;;;;;;;;EAkBL,kBAAA,CACJ,MAAA,EAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;;;;;;;;EAiBL,kBAAA,CACJ,MAAA,GAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;;;;;;;EAYL,wBAAA,CACJ,MAAA,GAAQ,oCAAA,GACP,OAAA,CAAQ,sCAAA;;;;;;;;EAgBL,uBAAA,CACJ,MAAA,GAAQ,mCAAA,GACP,OAAA,CAAQ,qCAAA;;;;;;;;;;;;EAoBL,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;;;;;;;;;;;;;;;;EAwBL,kBAAA,CACJ,MAAA,EAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;;;;;;;;;;;;;;EAsBL,gBAAA,CACJ,MAAA,GAAQ,4BAAA,GACP,OAAA,CAAQ,8BAAA;;;;UAYG,OAAA;EAAA,QAIA,aAAA;EAAA,QAeA,WAAA;;;;;UAiBN,mBAAA;AAAA"}
|
package/dist/NuanzeClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as GetNuanzeOpenPositionsParams, B as GetNuanzeWalletLeaderboardPositionParams, C as GetNuanzeMarketPositionsResponse, D as GetNuanzeMarketsResponse, E as GetNuanzeMarketsParams, F as GetNuanzeSubaccountLeaderboardPositionParams, G as GetNuanzeWalletPnlSeriesResponse, H as GetNuanzeWalletPnlParams, I as GetNuanzeSubaccountLeaderboardPositionResponse, J as GetNuanzeWalletSummaryParams, K as GetNuanzeWalletPositionsParams, L as GetNuanzeSubaccountLeaderboardResponse, M as GetNuanzePlatformSummaryParams, N as GetNuanzePlatformSummaryResponse, O as GetNuanzeNewsParams, P as GetNuanzeSubaccountLeaderboardParams, R as GetNuanzeSubaccountStatsParams, S as GetNuanzeMarketPositionsParams, T as GetNuanzeMarketTradesResponse, U as GetNuanzeWalletPnlResponse, V as GetNuanzeWalletLeaderboardPositionResponse, W as GetNuanzeWalletPnlSeriesParams, X as GetNuanzeWalletTradesParams, Y as GetNuanzeWalletSummaryResponse, Z as GetNuanzeWalletTradesResponse, _ as GetNuanzeMarketByTickerResponse, a as GetNuanzeCollateralFlowSummaryResponse, b as GetNuanzeMarketPositioningParams, c as GetNuanzeFollowedLeaderboardParams, d as GetNuanzeFollowedLeaderboardResponse, f as GetNuanzeFundingRatesParams, g as GetNuanzeMarketByTickerParams, h as GetNuanzeLeaderboardResponse, i as GetNuanzeCollateralFlowSummaryParams, j as GetNuanzeOpenPositionsResponse, k as GetNuanzeNewsResponse, l as GetNuanzeFollowedLeaderboardPositionParams, m as GetNuanzeLeaderboardParams, n as GetNuanzeCollateralFlowSeriesParams, o as GetNuanzeCollateralFlowsParams, p as GetNuanzeFundingRatesResponse, q as GetNuanzeWalletPositionsResponse, r as GetNuanzeCollateralFlowSeriesResponse, s as GetNuanzeCollateralFlowsResponse, t as GetNuanzeCohortsResponse, u as GetNuanzeFollowedLeaderboardPositionResponse, v as GetNuanzeMarketCandlesParams, w as GetNuanzeMarketTradesParams, x as GetNuanzeMarketPositioningResponse, y as GetNuanzeMarketCandlesResponse, z as GetNuanzeSubaccountStatsResponse } from "./clientTypes-
|
|
1
|
+
import { A as GetNuanzeOpenPositionsParams, B as GetNuanzeWalletLeaderboardPositionParams, C as GetNuanzeMarketPositionsResponse, D as GetNuanzeMarketsResponse, E as GetNuanzeMarketsParams, F as GetNuanzeSubaccountLeaderboardPositionParams, G as GetNuanzeWalletPnlSeriesResponse, H as GetNuanzeWalletPnlParams, I as GetNuanzeSubaccountLeaderboardPositionResponse, J as GetNuanzeWalletSummaryParams, K as GetNuanzeWalletPositionsParams, L as GetNuanzeSubaccountLeaderboardResponse, M as GetNuanzePlatformSummaryParams, N as GetNuanzePlatformSummaryResponse, O as GetNuanzeNewsParams, P as GetNuanzeSubaccountLeaderboardParams, R as GetNuanzeSubaccountStatsParams, S as GetNuanzeMarketPositionsParams, T as GetNuanzeMarketTradesResponse, U as GetNuanzeWalletPnlResponse, V as GetNuanzeWalletLeaderboardPositionResponse, W as GetNuanzeWalletPnlSeriesParams, X as GetNuanzeWalletTradesParams, Y as GetNuanzeWalletSummaryResponse, Z as GetNuanzeWalletTradesResponse, _ as GetNuanzeMarketByTickerResponse, a as GetNuanzeCollateralFlowSummaryResponse, b as GetNuanzeMarketPositioningParams, c as GetNuanzeFollowedLeaderboardParams, d as GetNuanzeFollowedLeaderboardResponse, f as GetNuanzeFundingRatesParams, g as GetNuanzeMarketByTickerParams, h as GetNuanzeLeaderboardResponse, i as GetNuanzeCollateralFlowSummaryParams, j as GetNuanzeOpenPositionsResponse, k as GetNuanzeNewsResponse, l as GetNuanzeFollowedLeaderboardPositionParams, m as GetNuanzeLeaderboardParams, n as GetNuanzeCollateralFlowSeriesParams, o as GetNuanzeCollateralFlowsParams, p as GetNuanzeFundingRatesResponse, q as GetNuanzeWalletPositionsResponse, r as GetNuanzeCollateralFlowSeriesResponse, s as GetNuanzeCollateralFlowsResponse, t as GetNuanzeCohortsResponse, u as GetNuanzeFollowedLeaderboardPositionResponse, v as GetNuanzeMarketCandlesParams, w as GetNuanzeMarketTradesParams, x as GetNuanzeMarketPositioningResponse, y as GetNuanzeMarketCandlesResponse, z as GetNuanzeSubaccountStatsResponse } from "./clientTypes-P72Dhpkq.js";
|
|
2
2
|
import { AxiosInstance } from "axios";
|
|
3
3
|
|
|
4
4
|
//#region src/NuanzeClient.d.ts
|
|
@@ -87,7 +87,8 @@ declare class NuanzeClient {
|
|
|
87
87
|
* Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account
|
|
88
88
|
* PnL descending with nulls last. Username, display name, and avatar URL are null when
|
|
89
89
|
* unavailable.
|
|
90
|
-
* `globalRank` is independent of the active privacy and trading filters
|
|
90
|
+
* `globalRank` is independent of the active privacy and trading filters, while each item's
|
|
91
|
+
* `filteredRank` is its position under them, counted across pages. Pagination uses a
|
|
91
92
|
* filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that
|
|
92
93
|
* subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`
|
|
93
94
|
* is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its
|
|
@@ -150,7 +151,8 @@ declare class NuanzeClient {
|
|
|
150
151
|
* follows, sorted by PnL descending with nulls last. The follower does not need a claimed
|
|
151
152
|
* username. Subaccounts with no PnL in the window are included by default with null PnL/rank,
|
|
152
153
|
* zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.
|
|
153
|
-
*
|
|
154
|
+
* Each item's `filteredRank` is its position among the follower's filter-passing followed
|
|
155
|
+
* subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's
|
|
154
156
|
* `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full
|
|
155
157
|
* item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or
|
|
156
158
|
* the follower does not actively follow that subaccount, and a filter-excluded followed row
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeClient.d.ts","names":[],"sources":["../src/src/NuanzeClient.ts"],"mappings":";;;;;;AAqHA;UAAiB,gBAAA;;;AAIZ;EAAH,GAAG;AAAA;;;;;;;;;;cAYQ,YAAA;EAAA,SACF,IAAA,EAAM,gBAAA;EAAA,SACN,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,gBAAA;EAwER;;;;;;;;;;EAjDJ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AA;EAAA,QAeA,WAAA;;;;;UAiBN,mBAAA;AAAA"}
|
package/dist/NuanzeClient.js
CHANGED
|
@@ -97,7 +97,8 @@ var NuanzeClient = class {
|
|
|
97
97
|
* Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account
|
|
98
98
|
* PnL descending with nulls last. Username, display name, and avatar URL are null when
|
|
99
99
|
* unavailable.
|
|
100
|
-
* `globalRank` is independent of the active privacy and trading filters
|
|
100
|
+
* `globalRank` is independent of the active privacy and trading filters, while each item's
|
|
101
|
+
* `filteredRank` is its position under them, counted across pages. Pagination uses a
|
|
101
102
|
* filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that
|
|
102
103
|
* subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`
|
|
103
104
|
* is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its
|
|
@@ -172,7 +173,8 @@ var NuanzeClient = class {
|
|
|
172
173
|
* follows, sorted by PnL descending with nulls last. The follower does not need a claimed
|
|
173
174
|
* username. Subaccounts with no PnL in the window are included by default with null PnL/rank,
|
|
174
175
|
* zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.
|
|
175
|
-
*
|
|
176
|
+
* Each item's `filteredRank` is its position among the follower's filter-passing followed
|
|
177
|
+
* subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's
|
|
176
178
|
* `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full
|
|
177
179
|
* item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or
|
|
178
180
|
* the follower does not actively follow that subaccount, and a filter-excluded followed row
|
package/dist/NuanzeClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeClient.js","names":[],"sources":["../src/NuanzeClient.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapNuanzeCohortsResponse,\n mapNuanzeCollateralFlowSeriesResponse,\n mapNuanzeCollateralFlowSummaryResponse,\n mapNuanzeCollateralFlowsResponse,\n mapNuanzeFollowedLeaderboardPositionResponse,\n mapNuanzeFollowedLeaderboardResponse,\n mapNuanzeFundingRatesResponse,\n mapNuanzeLeaderboardResponse,\n mapNuanzeMarketByTickerResponse,\n mapNuanzeMarketCandlesResponse,\n mapNuanzeMarketPositioningResponse,\n mapNuanzeMarketPositionsResponse,\n mapNuanzeMarketTradesResponse,\n mapNuanzeMarketsResponse,\n mapNuanzeNewsResponse,\n mapNuanzeOpenPositionsResponse,\n mapNuanzePlatformSummaryResponse,\n mapNuanzeSubaccountLeaderboardPositionResponse,\n mapNuanzeSubaccountLeaderboardResponse,\n mapNuanzeSubaccountStatsResponse,\n mapNuanzeWalletLeaderboardPositionResponse,\n mapNuanzeWalletPnlResponse,\n mapNuanzeWalletPnlSeriesResponse,\n mapNuanzeWalletPositionsResponse,\n mapNuanzeWalletSummaryResponse,\n mapNuanzeWalletTradesResponse,\n} from './dataMappers';\nimport {\n GetNuanzeCohortsResponse,\n GetNuanzeCollateralFlowSeriesParams,\n GetNuanzeCollateralFlowSeriesResponse,\n GetNuanzeCollateralFlowSummaryParams,\n GetNuanzeCollateralFlowSummaryResponse,\n GetNuanzeCollateralFlowsParams,\n GetNuanzeCollateralFlowsResponse,\n GetNuanzeFollowedLeaderboardParams,\n GetNuanzeFollowedLeaderboardPositionParams,\n GetNuanzeFollowedLeaderboardPositionResponse,\n GetNuanzeFollowedLeaderboardResponse,\n GetNuanzeFundingRatesParams,\n GetNuanzeFundingRatesResponse,\n GetNuanzeLeaderboardParams,\n GetNuanzeLeaderboardResponse,\n GetNuanzeMarketByTickerParams,\n GetNuanzeMarketByTickerResponse,\n GetNuanzeMarketCandlesParams,\n GetNuanzeMarketCandlesResponse,\n GetNuanzeMarketPositioningParams,\n GetNuanzeMarketPositioningResponse,\n GetNuanzeMarketPositionsParams,\n GetNuanzeMarketPositionsResponse,\n GetNuanzeMarketTradesParams,\n GetNuanzeMarketTradesResponse,\n GetNuanzeMarketsParams,\n GetNuanzeMarketsResponse,\n GetNuanzeNewsParams,\n GetNuanzeNewsResponse,\n GetNuanzeOpenPositionsParams,\n GetNuanzeOpenPositionsResponse,\n GetNuanzePlatformSummaryParams,\n GetNuanzePlatformSummaryResponse,\n GetNuanzeSubaccountLeaderboardParams,\n GetNuanzeSubaccountLeaderboardPositionParams,\n GetNuanzeSubaccountLeaderboardPositionResponse,\n GetNuanzeSubaccountLeaderboardResponse,\n GetNuanzeSubaccountStatsParams,\n GetNuanzeSubaccountStatsResponse,\n GetNuanzeWalletLeaderboardPositionParams,\n GetNuanzeWalletLeaderboardPositionResponse,\n GetNuanzeWalletPnlParams,\n GetNuanzeWalletPnlResponse,\n GetNuanzeWalletPnlSeriesParams,\n GetNuanzeWalletPnlSeriesResponse,\n GetNuanzeWalletPositionsParams,\n GetNuanzeWalletPositionsResponse,\n GetNuanzeWalletSummaryParams,\n GetNuanzeWalletSummaryResponse,\n GetNuanzeWalletTradesParams,\n GetNuanzeWalletTradesResponse,\n NuanzeMarketSelector,\n} from './types/clientTypes';\nimport { NuanzeServerFailureError } from './types/NuanzeServerFailureError';\nimport { NuanzeServerMarketPositioningResponse } from './types/serverModelTypes';\nimport {\n NuanzeServerCohortsResponse,\n NuanzeServerCollateralFlowSeriesResponse,\n NuanzeServerCollateralFlowSummaryResponse,\n NuanzeServerCollateralFlowsResponse,\n NuanzeServerFollowedLeaderboardPositionResponse,\n NuanzeServerFollowedLeaderboardResponse,\n NuanzeServerFundingRatesResponse,\n NuanzeServerLeaderboardResponse,\n NuanzeServerMarketByTickerResponse,\n NuanzeServerMarketCandlesResponse,\n NuanzeServerMarketPositionsResponse,\n NuanzeServerMarketTradesResponse,\n NuanzeServerMarketsResponse,\n NuanzeServerNewsResponse,\n NuanzeServerOpenPositionsResponse,\n NuanzeServerPlatformSummaryResponse,\n NuanzeServerSubaccountLeaderboardPositionResponse,\n NuanzeServerSubaccountLeaderboardResponse,\n NuanzeServerSubaccountStatsResponse,\n NuanzeServerWalletLeaderboardPositionResponse,\n NuanzeServerWalletPnlResponse,\n NuanzeServerWalletPnlSeriesResponse,\n NuanzeServerWalletPositionsResponse,\n NuanzeServerWalletSummaryResponse,\n NuanzeServerWalletTradesResponse,\n isNuanzeServerFailureResponse,\n} from './types/serverQueryTypes';\n\n/**\n * Options for constructing a {@link NuanzeClient}.\n */\nexport interface NuanzeClientOpts {\n /**\n * Base URL of the Nuanze API, including the version segment, e.g. {@link NUANZE_CLIENT_ENDPOINTS}.\n */\n url: string;\n}\n\n/**\n * Client for the Nuanze public analytics API: markets, wallets, trades, candles, collateral flows,\n * and positioning.\n *\n * Read-only and credential-free, so unlike the other service clients it takes no wallet client or\n * linked signer. It also sends no `x-nado-client-type` header: Nuanze is a public API that does not\n * attribute traffic per client, and its `Access-Control-Allow-Headers` does not list the header, so\n * sending it would fail CORS preflight in the browser. All operations are GET.\n */\nexport class NuanzeClient {\n readonly opts: NuanzeClientOpts;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: NuanzeClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n // Nuanze is public and answers every origin with `Access-Control-Allow-Origin: *`, which\n // browsers reject for credentialed requests.\n withCredentials: false,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n // Repeatable `productId` must serialize as `productId=1&productId=2` (OpenAPI explode).\n paramsSerializer: { indexes: null },\n });\n }\n\n /**\n * Lists published editorial stories, sorted by `publishedAt` descending then `id` descending.\n * Ticker filters include every product for the asset without distinguishing spot from perpetual\n * markets; an optional product ID narrows to one exact product. The opaque cursor is exclusive\n * and bound to normalized filters. Raw article ingestion, scoring, queue, and newsdesk fields are\n * excluded.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getNews(\n params: GetNuanzeNewsParams = {},\n ): Promise<GetNuanzeNewsResponse> {\n return mapNuanzeNewsResponse(\n await this.getJson<NuanzeServerNewsResponse>('/news', params),\n );\n }\n\n /**\n * Gets the active market universe, ordered by `productId` ascending. Never truncated, so `count`\n * always equals the length of `markets`. Market metadata refreshes about every five minutes and\n * prices about every minute.\n *\n * @throws {NuanzeServerFailureError} With error code `BAD_REQUEST` if a filter value is not a\n * documented venue or tradability state.\n */\n async getMarkets(\n params: GetNuanzeMarketsParams = {},\n ): Promise<GetNuanzeMarketsResponse> {\n return mapNuanzeMarketsResponse(\n await this.getJson<NuanzeServerMarketsResponse>('/markets', params),\n );\n }\n\n /**\n * Resolves a market by {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`;\n * when both are given, `productId` is used for the path segment and `ticker` is ignored.\n * Ticker lookup is case-insensitive and accepts canonical tickers or legacy source symbols.\n * An explicit unavailable venue returns `MARKET_NOT_FOUND`. With no venue, `strictVenue=true`\n * returns `AMBIGUOUS_MARKET` for multi-venue assets; otherwise the primary venue is used.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid\n * selectors, and `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketByTicker(\n params: GetNuanzeMarketByTickerParams,\n ): Promise<GetNuanzeMarketByTickerResponse> {\n return mapNuanzeMarketByTickerResponse(\n await this.getMarketJson<NuanzeServerMarketByTickerResponse>(params),\n );\n }\n\n /**\n * Lists the latest funding observation per active perpetual market, refreshed about every five\n * minutes.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getFundingRates(\n params: GetNuanzeFundingRatesParams = {},\n ): Promise<GetNuanzeFundingRatesResponse> {\n return mapNuanzeFundingRatesResponse(\n await this.getJson<NuanzeServerFundingRatesResponse>(\n '/funding/rates',\n params,\n ),\n );\n }\n\n /**\n * Gets the account PnL leaderboard. Equity-basis account PnL includes realized and unrealized\n * movement plus funding and is not realized PnL. Pass `viewAs` with an EVM address to also\n * receive that wallet's full row plus rank as `viewer`, computed in the same request without\n * altering pagination; `viewer` is null when `viewAs` is omitted or has no source row.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when `viewAs` is malformed.\n */\n async getLeaderboard(\n params: GetNuanzeLeaderboardParams = {},\n ): Promise<GetNuanzeLeaderboardResponse> {\n return mapNuanzeLeaderboardResponse(\n await this.getJson<NuanzeServerLeaderboardResponse>(\n '/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one wallet's leaderboard position by explicit EVM address. Equity-basis account PnL\n * includes realized and unrealized movement plus funding and is not realized PnL. `item` is\n * null only when the wallet leaderboard source row is absent; `rank` is the global rank in\n * the unfiltered leaderboard, independent of collection `limit` and `offset`. For an inline\n * lookup scoped to a ranked page, `getLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when the address is malformed.\n */\n async getWalletLeaderboardPosition(\n params: GetNuanzeWalletLeaderboardPositionParams,\n ): Promise<GetNuanzeWalletLeaderboardPositionResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletLeaderboardPositionResponse(\n await this.getJson<NuanzeServerWalletLeaderboardPositionResponse>(\n `/leaderboard/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account\n * PnL descending with nulls last. Username, display name, and avatar URL are null when\n * unavailable.\n * `globalRank` is independent of the active privacy and trading filters. Pagination uses a\n * filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that\n * subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`\n * is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its\n * item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when filters, the cursor, or `viewAs`\n * are invalid.\n */\n async getSubaccountLeaderboard(\n params: GetNuanzeSubaccountLeaderboardParams = {},\n ): Promise<GetNuanzeSubaccountLeaderboardResponse> {\n return mapNuanzeSubaccountLeaderboardResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardResponse>(\n '/leaderboard/subaccounts',\n params,\n ),\n );\n }\n\n /**\n * Gets one subaccount's leaderboard position by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form). `item.globalRank` reflects the subaccount's true position\n * across the full leaderboard, independent of the `includePrivate`, `includeUntraded`, and\n * `includeUnclaimed` filters, while `filteredRank` uses the request's active filters: an\n * absent source row yields `filteredRank` null with `item` null, an existing but\n * filter-excluded row keeps its full item with `filteredRank` null, and an included row\n * carries both ranks. For an inline lookup scoped to a ranked page,\n * `getSubaccountLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when filters are invalid, or\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed.\n */\n async getSubaccountLeaderboardPosition(\n params: GetNuanzeSubaccountLeaderboardPositionParams,\n ): Promise<GetNuanzeSubaccountLeaderboardPositionResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountLeaderboardPositionResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardPositionResponse>(\n `/leaderboard/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets every trader stat card for one subaccount by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form): leaderboard rank and window PnL, snapshot volume,\n * average leverage over current isolated perp legs, best/worst close-event trade in the\n * window, point-in-time long/short bias from current open perp legs, and the most-traded\n * market. Best/worst trade, leverage, bias percentages, and most-traded market are null\n * when the subaccount has no closes, isolated margin, open positions, or activity rows\n * respectively.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe is invalid,\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed, or `WALLET_NOT_FOUND` when\n * the hex is unknown.\n */\n async getSubaccountStats(\n params: GetNuanzeSubaccountStatsParams,\n ): Promise<GetNuanzeSubaccountStatsResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountStatsResponse(\n await this.getJson<NuanzeServerSubaccountStatsResponse>(\n `/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets platform activity summary from five-minute aggregates.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if the window is not a documented value.\n */\n async getPlatformSummary(\n params: GetNuanzePlatformSummaryParams = {},\n ): Promise<GetNuanzePlatformSummaryResponse> {\n return mapNuanzePlatformSummaryResponse(\n await this.getJson<NuanzeServerPlatformSummaryResponse>(\n '/platform/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets the six fixed wallet cohorts of the nuanze.co cohorts page. Every wallet that has traded\n * belongs to exactly one, chosen by its lifetime equity-basis account PnL summed across its\n * subaccounts: `extremely_profitable` [1,000,000, +inf), `very_profitable` [100,000, 1,000,000),\n * `profitable` [0, 100,000), `unprofitable` [-100,000, 0), `very_unprofitable` [-1,000,000,\n * -100,000), and `rekt` (-inf, -1,000,000), the same cohorts as `getMarketPositioning` with\n * `groupBy: 'cohort'`. All six are always returned in that order, each with PnL totals,\n * profit/loss wallet counts, lifetime trades, and the members' current open perp notional split\n * long/short; `longPct` and `shortPct` are null when the cohort is flat. `series` samples the\n * cohort's long percentage every four hours over the last 30 days, oldest first. Membership and\n * aggregates refresh about every five minutes, series points every four hours.\n */\n async getCohorts(): Promise<GetNuanzeCohortsResponse> {\n return mapNuanzeCohortsResponse(\n await this.getJson<NuanzeServerCohortsResponse>('/cohorts'),\n );\n }\n\n /**\n * Gets a keyset-paginated leaderboard for every subaccount a supplied bytes32 subaccount actively\n * follows, sorted by PnL descending with nulls last. The follower does not need a claimed\n * username. Subaccounts with no PnL in the window are included by default with null PnL/rank,\n * zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.\n * Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's\n * `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full\n * item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or\n * the follower does not actively follow that subaccount, and a filter-excluded followed row\n * keeps its item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when params, the cursor, the follower\n * hex, or `viewAs` are invalid.\n */\n async getFollowedLeaderboard(\n params: GetNuanzeFollowedLeaderboardParams,\n ): Promise<GetNuanzeFollowedLeaderboardResponse> {\n return mapNuanzeFollowedLeaderboardResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardResponse>(\n '/wallets/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one followed subaccount's position within a follower's leaderboard. `subaccountHex`\n * identifies the follower whose active follow graph is ranked and `viewAs` the followed\n * subaccount to position, both as bytes32 subaccount hex (the SDK `subaccountToHex` form).\n * `item.globalRank` reflects the subaccount's true position across the full global subaccount\n * leaderboard, independent of the follow graph and of the `includeUntraded`, `includePrivate`,\n * and `includeUnclaimed` filters, while `filteredRank` counts only the follower's followed\n * subaccounts passing the request's active filters: a subaccount the follower does not follow\n * yields `filteredRank` null with `item` null, an existing but filter-excluded followed row\n * keeps its full item with `filteredRank` null, and an included row carries both ranks. For an\n * inline lookup scoped to a ranked page, `getFollowedLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe or filters are\n * invalid, or `INVALID_SUBACCOUNT` when either subaccount hex is malformed.\n */\n async getFollowedLeaderboardPosition(\n params: GetNuanzeFollowedLeaderboardPositionParams,\n ): Promise<GetNuanzeFollowedLeaderboardPositionResponse> {\n const { viewAs, ...query } = params;\n return mapNuanzeFollowedLeaderboardPositionResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardPositionResponse>(\n `/wallets/leaderboard/followed/${encodeURIComponent(viewAs)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets replica-backed wallet analytics. Without `subaccountName`, latest cumulative values are\n * selected per known subaccount and then summed. The response is a snapshot and does not claim\n * live health, withdrawable collateral, open-order, or signer state.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletSummary(\n params: GetNuanzeWalletSummaryParams,\n ): Promise<GetNuanzeWalletSummaryResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletSummaryResponse(\n await this.getJson<NuanzeServerWalletSummaryResponse>(\n `/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Lists at most 500 current replica position rows across all known subaccounts by default. Rows\n * remain per subaccount. Spot rows are excluded unless `includeSpot=true`. This is not an\n * execution-grade live feed.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPositions(\n params: GetNuanzeWalletPositionsParams,\n ): Promise<GetNuanzeWalletPositionsResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPositionsResponse(\n await this.getJson<NuanzeServerWalletPositionsResponse>(\n `/wallets/${encodeURIComponent(address)}/positions`,\n query,\n ),\n );\n }\n\n /**\n * Lists market trades for a {@link NuanzeMarketSelector}: one taker-side row per match, sorted\n * by `matchedAt` then `id` descending. Supply at least `ticker` or `productId`; when both are\n * given, `productId` is used for the path segment and `ticker` is ignored. The exclusive cursor\n * is bound to operation and normalized filters. `from` is inclusive and `to` exclusive. Wallet\n * identity is absent.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketTrades(\n params: GetNuanzeMarketTradesParams,\n ): Promise<GetNuanzeMarketTradesResponse> {\n return mapNuanzeMarketTradesResponse(\n await this.getMarketJson<NuanzeServerMarketTradesResponse>(\n params,\n '/trades',\n ),\n );\n }\n\n /**\n * Lists market candles for a {@link NuanzeMarketSelector}. Supply at least `ticker` or\n * `productId`; when both are given, `productId` is used for the path segment and `ticker` is\n * ignored. Source storage is 1h; 4h and 1d are UTC-aligned rollups and missing bars are not\n * interpolated. The newest `limit` matching bars are selected and returned oldest-to-newest,\n * at most 750, with no pagination. A current bucket has `complete=false`.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_INTERVAL`, `RANGE_TOO_LARGE`,\n * `AMBIGUOUS_MARKET`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve.\n */\n async getMarketCandles(\n params: GetNuanzeMarketCandlesParams,\n ): Promise<GetNuanzeMarketCandlesResponse> {\n return mapNuanzeMarketCandlesResponse(\n await this.getMarketJson<NuanzeServerMarketCandlesResponse>(\n params,\n '/candles',\n ),\n );\n }\n\n /**\n * Lists wallet-owned maker and taker execution rows, sorted by `matchedAt` then `id` descending.\n * The cursor is exclusive and filter-bound. `from` is inclusive and `to` exclusive.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletTrades(\n params: GetNuanzeWalletTradesParams,\n ): Promise<GetNuanzeWalletTradesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletTradesResponse(\n await this.getJson<NuanzeServerWalletTradesResponse>(\n `/wallets/${encodeURIComponent(address)}/trades`,\n query,\n ),\n );\n }\n\n /**\n * Gets wallet account PnL. 24h is rolling and uses hourly snapshots with a daily fallback\n * baseline. Longer windows use daily snapshots; `all` starts at earliest coverage. PnL includes\n * realized and unrealized movement plus funding.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnl(\n params: GetNuanzeWalletPnlParams,\n ): Promise<GetNuanzeWalletPnlResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlResponse(\n await this.getJson<NuanzeServerWalletPnlResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl`,\n query,\n ),\n );\n }\n\n /**\n * Gets a wallet account series of at most 1,000 deterministically sampled points ordered by\n * timestamp. Series contain a boundary anchor and a carried-forward request-time tip; synthetic\n * points are identified. Latest buckets may be provisional.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnlSeries(\n params: GetNuanzeWalletPnlSeriesParams,\n ): Promise<GetNuanzeWalletPnlSeriesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlSeriesResponse(\n await this.getJson<NuanzeServerWalletPnlSeriesResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl/series`,\n query,\n ),\n );\n }\n\n /**\n * Lists public collateral events, sorted by timestamp then `id` descending. Repeated `productId`\n * uses OR semantics. `minUsd` excludes unvalued events; without it unvalued events remain.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getCollateralFlows(\n params: GetNuanzeCollateralFlowsParams = {},\n ): Promise<GetNuanzeCollateralFlowsResponse> {\n return mapNuanzeCollateralFlowsResponse(\n await this.getJson<NuanzeServerCollateralFlowsResponse>('/flows', params),\n );\n }\n\n /**\n * Gets collateral flow aggregates: deposited, withdrawn, net, and gross, with valuation coverage\n * and a prior equal-window comparison. `all` has no prior window.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getCollateralFlowSummary(\n params: GetNuanzeCollateralFlowSummaryParams = {},\n ): Promise<GetNuanzeCollateralFlowSummaryResponse> {\n return mapNuanzeCollateralFlowSummaryResponse(\n await this.getJson<NuanzeServerCollateralFlowSummaryResponse>(\n '/flows/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets collateral flow series of at most 1,000 UTC buckets. Allowed timeframe/bucket pairs are\n * 24h/hour, 7d/hour or day (default hour), 30d/day, and all/day.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_BUCKET` or `BAD_REQUEST` when the pair or\n * filters are invalid.\n */\n async getCollateralFlowSeries(\n params: GetNuanzeCollateralFlowSeriesParams = {},\n ): Promise<GetNuanzeCollateralFlowSeriesResponse> {\n return mapNuanzeCollateralFlowSeriesResponse(\n await this.getJson<NuanzeServerCollateralFlowSeriesResponse>(\n '/flows/series',\n params,\n ),\n );\n }\n\n /**\n * Gets privacy-preserving aggregate positioning for an active perpetual identified by\n * {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`; when both are given,\n * `productId` is used for the path segment and `ticker` is ignored. Cross and isolated legs\n * are summed within owner/subaccount/product before direction classification. Every cell\n * requires at least 20 distinct contributing owners. No identity, individual position, entry\n * price, PnL, margin, or leverage fields are returned.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid input,\n * and `MARKET_NOT_FOUND` when the selector does not resolve to a perp.\n */\n async getMarketPositioning(\n params: GetNuanzeMarketPositioningParams,\n ): Promise<GetNuanzeMarketPositioningResponse> {\n return mapNuanzeMarketPositioningResponse(\n await this.getMarketJson<NuanzeServerMarketPositioningResponse>(\n params,\n '/positioning',\n ),\n );\n }\n\n /**\n * Lists open perpetual position legs for a market identified by {@link NuanzeMarketSelector}.\n * Supply at least `ticker` or `productId`; when both are given, `productId` is used for the\n * path segment and `ticker` is ignored. Results default to absolute notional descending and\n * can be ordered by signed unrealized PnL or absolute base amount in either direction. Spot\n * markets are not supported. Legs below $10 absolute notional are excluded. Wallet addresses,\n * nullable synced usernames, display names, and avatar URLs, and signed exact base amounts are\n * returned.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve to a perp.\n */\n async getMarketPositions(\n params: GetNuanzeMarketPositionsParams,\n ): Promise<GetNuanzeMarketPositionsResponse> {\n return mapNuanzeMarketPositionsResponse(\n await this.getMarketJson<NuanzeServerMarketPositionsResponse>(\n params,\n '/positions',\n ),\n );\n }\n\n /**\n * Lists current open perpetual position legs across every market by signed unrealized PnL.\n * Descending returns the largest gainers and ascending returns the largest losers. This is a\n * latest indexed snapshot with no timeframe. Legs below $10 absolute notional are excluded.\n * Private subaccounts are excluded unless `includePrivate=true`. Each row includes market\n * identity, nullable synced username, display name, and avatar URL, and its source snapshot\n * timestamp.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_CURSOR`, `CURSOR_FILTER_MISMATCH`, or\n * `BAD_REQUEST` when the query or cursor is invalid.\n */\n async getOpenPositions(\n params: GetNuanzeOpenPositionsParams = {},\n ): Promise<GetNuanzeOpenPositionsResponse> {\n return mapNuanzeOpenPositionsResponse(\n await this.getJson<NuanzeServerOpenPositionsResponse>(\n '/positions',\n params,\n ),\n );\n }\n\n /**\n * Performs a GET against `{baseUrl}{path}` and classifies the status before returning the body.\n */\n private async getJson<T>(path: string, params?: object): Promise<T> {\n return this.requestJson<T>(path, { params });\n }\n\n private async getMarketJson<T>(\n params: NuanzeMarketSelector & object,\n suffix = '',\n ): Promise<T> {\n const { productId, ticker, ...query } = params;\n const selector = productId ?? ticker;\n if (selector === undefined) {\n throw new Error('A market ticker or productId is required.');\n }\n return this.getJson<T>(\n `/markets/${encodeURIComponent(selector.toString())}${suffix}`,\n query,\n );\n }\n\n private async requestJson<T>(\n path: string,\n config: { params?: object } = {},\n ): Promise<T> {\n const response = await this.axiosInstance.request<T>({\n method: 'GET',\n url: `${this.opts.url}${path}`,\n ...config,\n });\n this.checkResponseStatus(response);\n return response.data;\n }\n\n /**\n * Validates the HTTP status before interpreting the body. Nuanze maps every domain failure onto a\n * non-2xx status carrying a failure envelope, so anything else is a transport-level error.\n */\n private checkResponseStatus(response: AxiosResponse<unknown>) {\n if (response.status >= 200 && response.status < 300) {\n return;\n }\n if (isNuanzeServerFailureResponse(response.data)) {\n throw new NuanzeServerFailureError(response.data, response.status);\n }\n throw new Error(\n `Unexpected response from Nuanze: ${response.status} ${response.statusText}. Data: ${JSON.stringify(response.data)}`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAqIA,IAAa,eAAb,MAA0B;CAIxB,YAAY,MAAwB;EAClC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAM,OAAO;GAGhC,iBAAiB;GAEjB,sBAAsB;GAEtB,kBAAkB,EAAE,SAAS,KAAK;EACpC,CAAC;CACH;;;;;;;;;;;CAYA,MAAM,QACJ,SAA8B,CAAC,GACC;EAChC,OAAO,sBACL,MAAM,KAAK,QAAkC,SAAS,MAAM,CAC9D;CACF;;;;;;;;;CAUA,MAAM,WACJ,SAAiC,CAAC,GACC;EACnC,OAAO,yBACL,MAAM,KAAK,QAAqC,YAAY,MAAM,CACpE;CACF;;;;;;;;;;;CAYA,MAAM,kBACJ,QAC0C;EAC1C,OAAO,gCACL,MAAM,KAAK,cAAkD,MAAM,CACrE;CACF;;;;;;;CAQA,MAAM,gBACJ,SAAsC,CAAC,GACC;EACxC,OAAO,8BACL,MAAM,KAAK,QACT,kBACA,MACF,CACF;CACF;;;;;;;;;;CAWA,MAAM,eACJ,SAAqC,CAAC,GACC;EACvC,OAAO,6BACL,MAAM,KAAK,QACT,gBACA,MACF,CACF;CACF;;;;;;;;;;;CAYA,MAAM,6BACJ,QACqD;EACrD,MAAM,EAAE,SAAS,GAAG,UAAU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ACC;EACzC,OAAO,+BACL,MAAM,KAAK,QACT,cACA,MACF,CACF;CACF;;;;CAKA,MAAc,QAAW,MAAc,QAA6B;EAClE,OAAO,KAAK,YAAe,MAAM,EAAE,OAAO,CAAC;CAC7C;CAEA,MAAc,cACZ,QACA,SAAS,IACG;EACZ,MAAM,EAAE,WAAW,QAAQ,GAAG,UAAU;EACxC,MAAM,WAAW,aAAa;EAC9B,IAAI,aAAa,KAAA,GACf,MAAM,IAAI,MAAM,2CAA2C;EAE7D,OAAO,KAAK,QACV,YAAY,mBAAmB,SAAS,SAAS,CAAC,IAAI,UACtD,KACF;CACF;CAEA,MAAc,YACZ,MACA,SAA8B,CAAC,GACnB;EACZ,MAAM,WAAW,MAAM,KAAK,cAAc,QAAW;GACnD,QAAQ;GACR,KAAK,GAAG,KAAK,KAAK,MAAM;GACxB,GAAG;EACL,CAAC;EACD,KAAK,oBAAoB,QAAQ;EACjC,OAAO,SAAS;CAClB;;;;;CAMA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAI,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAI,yBAAyB,SAAS,MAAM,SAAS,MAAM;EAEnE,MAAM,IAAI,MACR,oCAAoC,SAAS,OAAO,GAAG,SAAS,WAAW,UAAU,KAAK,UAAU,SAAS,IAAI,GACnH;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"NuanzeClient.js","names":[],"sources":["../src/NuanzeClient.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapNuanzeCohortsResponse,\n mapNuanzeCollateralFlowSeriesResponse,\n mapNuanzeCollateralFlowSummaryResponse,\n mapNuanzeCollateralFlowsResponse,\n mapNuanzeFollowedLeaderboardPositionResponse,\n mapNuanzeFollowedLeaderboardResponse,\n mapNuanzeFundingRatesResponse,\n mapNuanzeLeaderboardResponse,\n mapNuanzeMarketByTickerResponse,\n mapNuanzeMarketCandlesResponse,\n mapNuanzeMarketPositioningResponse,\n mapNuanzeMarketPositionsResponse,\n mapNuanzeMarketTradesResponse,\n mapNuanzeMarketsResponse,\n mapNuanzeNewsResponse,\n mapNuanzeOpenPositionsResponse,\n mapNuanzePlatformSummaryResponse,\n mapNuanzeSubaccountLeaderboardPositionResponse,\n mapNuanzeSubaccountLeaderboardResponse,\n mapNuanzeSubaccountStatsResponse,\n mapNuanzeWalletLeaderboardPositionResponse,\n mapNuanzeWalletPnlResponse,\n mapNuanzeWalletPnlSeriesResponse,\n mapNuanzeWalletPositionsResponse,\n mapNuanzeWalletSummaryResponse,\n mapNuanzeWalletTradesResponse,\n} from './dataMappers';\nimport {\n GetNuanzeCohortsResponse,\n GetNuanzeCollateralFlowSeriesParams,\n GetNuanzeCollateralFlowSeriesResponse,\n GetNuanzeCollateralFlowSummaryParams,\n GetNuanzeCollateralFlowSummaryResponse,\n GetNuanzeCollateralFlowsParams,\n GetNuanzeCollateralFlowsResponse,\n GetNuanzeFollowedLeaderboardParams,\n GetNuanzeFollowedLeaderboardPositionParams,\n GetNuanzeFollowedLeaderboardPositionResponse,\n GetNuanzeFollowedLeaderboardResponse,\n GetNuanzeFundingRatesParams,\n GetNuanzeFundingRatesResponse,\n GetNuanzeLeaderboardParams,\n GetNuanzeLeaderboardResponse,\n GetNuanzeMarketByTickerParams,\n GetNuanzeMarketByTickerResponse,\n GetNuanzeMarketCandlesParams,\n GetNuanzeMarketCandlesResponse,\n GetNuanzeMarketPositioningParams,\n GetNuanzeMarketPositioningResponse,\n GetNuanzeMarketPositionsParams,\n GetNuanzeMarketPositionsResponse,\n GetNuanzeMarketTradesParams,\n GetNuanzeMarketTradesResponse,\n GetNuanzeMarketsParams,\n GetNuanzeMarketsResponse,\n GetNuanzeNewsParams,\n GetNuanzeNewsResponse,\n GetNuanzeOpenPositionsParams,\n GetNuanzeOpenPositionsResponse,\n GetNuanzePlatformSummaryParams,\n GetNuanzePlatformSummaryResponse,\n GetNuanzeSubaccountLeaderboardParams,\n GetNuanzeSubaccountLeaderboardPositionParams,\n GetNuanzeSubaccountLeaderboardPositionResponse,\n GetNuanzeSubaccountLeaderboardResponse,\n GetNuanzeSubaccountStatsParams,\n GetNuanzeSubaccountStatsResponse,\n GetNuanzeWalletLeaderboardPositionParams,\n GetNuanzeWalletLeaderboardPositionResponse,\n GetNuanzeWalletPnlParams,\n GetNuanzeWalletPnlResponse,\n GetNuanzeWalletPnlSeriesParams,\n GetNuanzeWalletPnlSeriesResponse,\n GetNuanzeWalletPositionsParams,\n GetNuanzeWalletPositionsResponse,\n GetNuanzeWalletSummaryParams,\n GetNuanzeWalletSummaryResponse,\n GetNuanzeWalletTradesParams,\n GetNuanzeWalletTradesResponse,\n NuanzeMarketSelector,\n} from './types/clientTypes';\nimport { NuanzeServerFailureError } from './types/NuanzeServerFailureError';\nimport { NuanzeServerMarketPositioningResponse } from './types/serverModelTypes';\nimport {\n NuanzeServerCohortsResponse,\n NuanzeServerCollateralFlowSeriesResponse,\n NuanzeServerCollateralFlowSummaryResponse,\n NuanzeServerCollateralFlowsResponse,\n NuanzeServerFollowedLeaderboardPositionResponse,\n NuanzeServerFollowedLeaderboardResponse,\n NuanzeServerFundingRatesResponse,\n NuanzeServerLeaderboardResponse,\n NuanzeServerMarketByTickerResponse,\n NuanzeServerMarketCandlesResponse,\n NuanzeServerMarketPositionsResponse,\n NuanzeServerMarketTradesResponse,\n NuanzeServerMarketsResponse,\n NuanzeServerNewsResponse,\n NuanzeServerOpenPositionsResponse,\n NuanzeServerPlatformSummaryResponse,\n NuanzeServerSubaccountLeaderboardPositionResponse,\n NuanzeServerSubaccountLeaderboardResponse,\n NuanzeServerSubaccountStatsResponse,\n NuanzeServerWalletLeaderboardPositionResponse,\n NuanzeServerWalletPnlResponse,\n NuanzeServerWalletPnlSeriesResponse,\n NuanzeServerWalletPositionsResponse,\n NuanzeServerWalletSummaryResponse,\n NuanzeServerWalletTradesResponse,\n isNuanzeServerFailureResponse,\n} from './types/serverQueryTypes';\n\n/**\n * Options for constructing a {@link NuanzeClient}.\n */\nexport interface NuanzeClientOpts {\n /**\n * Base URL of the Nuanze API, including the version segment, e.g. {@link NUANZE_CLIENT_ENDPOINTS}.\n */\n url: string;\n}\n\n/**\n * Client for the Nuanze public analytics API: markets, wallets, trades, candles, collateral flows,\n * and positioning.\n *\n * Read-only and credential-free, so unlike the other service clients it takes no wallet client or\n * linked signer. It also sends no `x-nado-client-type` header: Nuanze is a public API that does not\n * attribute traffic per client, and its `Access-Control-Allow-Headers` does not list the header, so\n * sending it would fail CORS preflight in the browser. All operations are GET.\n */\nexport class NuanzeClient {\n readonly opts: NuanzeClientOpts;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: NuanzeClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n // Nuanze is public and answers every origin with `Access-Control-Allow-Origin: *`, which\n // browsers reject for credentialed requests.\n withCredentials: false,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n // Repeatable `productId` must serialize as `productId=1&productId=2` (OpenAPI explode).\n paramsSerializer: { indexes: null },\n });\n }\n\n /**\n * Lists published editorial stories, sorted by `publishedAt` descending then `id` descending.\n * Ticker filters include every product for the asset without distinguishing spot from perpetual\n * markets; an optional product ID narrows to one exact product. The opaque cursor is exclusive\n * and bound to normalized filters. Raw article ingestion, scoring, queue, and newsdesk fields are\n * excluded.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getNews(\n params: GetNuanzeNewsParams = {},\n ): Promise<GetNuanzeNewsResponse> {\n return mapNuanzeNewsResponse(\n await this.getJson<NuanzeServerNewsResponse>('/news', params),\n );\n }\n\n /**\n * Gets the active market universe, ordered by `productId` ascending. Never truncated, so `count`\n * always equals the length of `markets`. Market metadata refreshes about every five minutes and\n * prices about every minute.\n *\n * @throws {NuanzeServerFailureError} With error code `BAD_REQUEST` if a filter value is not a\n * documented venue or tradability state.\n */\n async getMarkets(\n params: GetNuanzeMarketsParams = {},\n ): Promise<GetNuanzeMarketsResponse> {\n return mapNuanzeMarketsResponse(\n await this.getJson<NuanzeServerMarketsResponse>('/markets', params),\n );\n }\n\n /**\n * Resolves a market by {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`;\n * when both are given, `productId` is used for the path segment and `ticker` is ignored.\n * Ticker lookup is case-insensitive and accepts canonical tickers or legacy source symbols.\n * An explicit unavailable venue returns `MARKET_NOT_FOUND`. With no venue, `strictVenue=true`\n * returns `AMBIGUOUS_MARKET` for multi-venue assets; otherwise the primary venue is used.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid\n * selectors, and `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketByTicker(\n params: GetNuanzeMarketByTickerParams,\n ): Promise<GetNuanzeMarketByTickerResponse> {\n return mapNuanzeMarketByTickerResponse(\n await this.getMarketJson<NuanzeServerMarketByTickerResponse>(params),\n );\n }\n\n /**\n * Lists the latest funding observation per active perpetual market, refreshed about every five\n * minutes.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getFundingRates(\n params: GetNuanzeFundingRatesParams = {},\n ): Promise<GetNuanzeFundingRatesResponse> {\n return mapNuanzeFundingRatesResponse(\n await this.getJson<NuanzeServerFundingRatesResponse>(\n '/funding/rates',\n params,\n ),\n );\n }\n\n /**\n * Gets the account PnL leaderboard. Equity-basis account PnL includes realized and unrealized\n * movement plus funding and is not realized PnL. Pass `viewAs` with an EVM address to also\n * receive that wallet's full row plus rank as `viewer`, computed in the same request without\n * altering pagination; `viewer` is null when `viewAs` is omitted or has no source row.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when `viewAs` is malformed.\n */\n async getLeaderboard(\n params: GetNuanzeLeaderboardParams = {},\n ): Promise<GetNuanzeLeaderboardResponse> {\n return mapNuanzeLeaderboardResponse(\n await this.getJson<NuanzeServerLeaderboardResponse>(\n '/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one wallet's leaderboard position by explicit EVM address. Equity-basis account PnL\n * includes realized and unrealized movement plus funding and is not realized PnL. `item` is\n * null only when the wallet leaderboard source row is absent; `rank` is the global rank in\n * the unfiltered leaderboard, independent of collection `limit` and `offset`. For an inline\n * lookup scoped to a ranked page, `getLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid, or\n * `INVALID_ADDRESS` when the address is malformed.\n */\n async getWalletLeaderboardPosition(\n params: GetNuanzeWalletLeaderboardPositionParams,\n ): Promise<GetNuanzeWalletLeaderboardPositionResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletLeaderboardPositionResponse(\n await this.getJson<NuanzeServerWalletLeaderboardPositionResponse>(\n `/leaderboard/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets the global public leaderboard of subaccounts. Results are sorted by equity-basis account\n * PnL descending with nulls last. Username, display name, and avatar URL are null when\n * unavailable.\n * `globalRank` is independent of the active privacy and trading filters, while each item's\n * `filteredRank` is its position under them, counted across pages. Pagination uses a\n * filter-bound opaque cursor. Pass `viewAs` with a bytes32 subaccount hex to also receive that\n * subaccount's `filteredRank` plus full item as `viewer` without altering pagination: `viewer`\n * is null when `viewAs` is omitted or has no source row, and a filter-excluded row keeps its\n * item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when filters, the cursor, or `viewAs`\n * are invalid.\n */\n async getSubaccountLeaderboard(\n params: GetNuanzeSubaccountLeaderboardParams = {},\n ): Promise<GetNuanzeSubaccountLeaderboardResponse> {\n return mapNuanzeSubaccountLeaderboardResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardResponse>(\n '/leaderboard/subaccounts',\n params,\n ),\n );\n }\n\n /**\n * Gets one subaccount's leaderboard position by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form). `item.globalRank` reflects the subaccount's true position\n * across the full leaderboard, independent of the `includePrivate`, `includeUntraded`, and\n * `includeUnclaimed` filters, while `filteredRank` uses the request's active filters: an\n * absent source row yields `filteredRank` null with `item` null, an existing but\n * filter-excluded row keeps its full item with `filteredRank` null, and an included row\n * carries both ranks. For an inline lookup scoped to a ranked page,\n * `getSubaccountLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when filters are invalid, or\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed.\n */\n async getSubaccountLeaderboardPosition(\n params: GetNuanzeSubaccountLeaderboardPositionParams,\n ): Promise<GetNuanzeSubaccountLeaderboardPositionResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountLeaderboardPositionResponse(\n await this.getJson<NuanzeServerSubaccountLeaderboardPositionResponse>(\n `/leaderboard/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets every trader stat card for one subaccount by explicit bytes32 subaccount hex\n * (the SDK `subaccountToHex` form): leaderboard rank and window PnL, snapshot volume,\n * average leverage over current isolated perp legs, best/worst close-event trade in the\n * window, point-in-time long/short bias from current open perp legs, and the most-traded\n * market. Best/worst trade, leverage, bias percentages, and most-traded market are null\n * when the subaccount has no closes, isolated margin, open positions, or activity rows\n * respectively.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe is invalid,\n * `INVALID_SUBACCOUNT` when the subaccount hex is malformed, or `WALLET_NOT_FOUND` when\n * the hex is unknown.\n */\n async getSubaccountStats(\n params: GetNuanzeSubaccountStatsParams,\n ): Promise<GetNuanzeSubaccountStatsResponse> {\n const { subaccountHex, ...query } = params;\n return mapNuanzeSubaccountStatsResponse(\n await this.getJson<NuanzeServerSubaccountStatsResponse>(\n `/subaccounts/${encodeURIComponent(subaccountHex)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets platform activity summary from five-minute aggregates.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if the window is not a documented value.\n */\n async getPlatformSummary(\n params: GetNuanzePlatformSummaryParams = {},\n ): Promise<GetNuanzePlatformSummaryResponse> {\n return mapNuanzePlatformSummaryResponse(\n await this.getJson<NuanzeServerPlatformSummaryResponse>(\n '/platform/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets the six fixed wallet cohorts of the nuanze.co cohorts page. Every wallet that has traded\n * belongs to exactly one, chosen by its lifetime equity-basis account PnL summed across its\n * subaccounts: `extremely_profitable` [1,000,000, +inf), `very_profitable` [100,000, 1,000,000),\n * `profitable` [0, 100,000), `unprofitable` [-100,000, 0), `very_unprofitable` [-1,000,000,\n * -100,000), and `rekt` (-inf, -1,000,000), the same cohorts as `getMarketPositioning` with\n * `groupBy: 'cohort'`. All six are always returned in that order, each with PnL totals,\n * profit/loss wallet counts, lifetime trades, and the members' current open perp notional split\n * long/short; `longPct` and `shortPct` are null when the cohort is flat. `series` samples the\n * cohort's long percentage every four hours over the last 30 days, oldest first. Membership and\n * aggregates refresh about every five minutes, series points every four hours.\n */\n async getCohorts(): Promise<GetNuanzeCohortsResponse> {\n return mapNuanzeCohortsResponse(\n await this.getJson<NuanzeServerCohortsResponse>('/cohorts'),\n );\n }\n\n /**\n * Gets a keyset-paginated leaderboard for every subaccount a supplied bytes32 subaccount actively\n * follows, sorted by PnL descending with nulls last. The follower does not need a claimed\n * username. Subaccounts with no PnL in the window are included by default with null PnL/rank,\n * zero counts, and no products. Private subaccounts are excluded unless `includePrivate=true`.\n * Each item's `filteredRank` is its position among the follower's filter-passing followed\n * subaccounts, counted across pages; `globalRank` stays global. Pass `viewAs` with a bytes32 subaccount hex to also receive that followed subaccount's\n * `filteredRank` (counted among the follower's filter-passing followed subaccounts) plus full\n * item as `viewer` without altering pagination: `viewer` is null when `viewAs` is omitted or\n * the follower does not actively follow that subaccount, and a filter-excluded followed row\n * keeps its item with `filteredRank` null.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `INVALID_SUBACCOUNT` when params, the cursor, the follower\n * hex, or `viewAs` are invalid.\n */\n async getFollowedLeaderboard(\n params: GetNuanzeFollowedLeaderboardParams,\n ): Promise<GetNuanzeFollowedLeaderboardResponse> {\n return mapNuanzeFollowedLeaderboardResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardResponse>(\n '/wallets/leaderboard',\n params,\n ),\n );\n }\n\n /**\n * Gets one followed subaccount's position within a follower's leaderboard. `subaccountHex`\n * identifies the follower whose active follow graph is ranked and `viewAs` the followed\n * subaccount to position, both as bytes32 subaccount hex (the SDK `subaccountToHex` form).\n * `item.globalRank` reflects the subaccount's true position across the full global subaccount\n * leaderboard, independent of the follow graph and of the `includeUntraded`, `includePrivate`,\n * and `includeUnclaimed` filters, while `filteredRank` counts only the follower's followed\n * subaccounts passing the request's active filters: a subaccount the follower does not follow\n * yields `filteredRank` null with `item` null, an existing but filter-excluded followed row\n * keeps its full item with `filteredRank` null, and an included row carries both ranks. For an\n * inline lookup scoped to a ranked page, `getFollowedLeaderboard` accepts `viewAs` instead.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when the timeframe or filters are\n * invalid, or `INVALID_SUBACCOUNT` when either subaccount hex is malformed.\n */\n async getFollowedLeaderboardPosition(\n params: GetNuanzeFollowedLeaderboardPositionParams,\n ): Promise<GetNuanzeFollowedLeaderboardPositionResponse> {\n const { viewAs, ...query } = params;\n return mapNuanzeFollowedLeaderboardPositionResponse(\n await this.getJson<NuanzeServerFollowedLeaderboardPositionResponse>(\n `/wallets/leaderboard/followed/${encodeURIComponent(viewAs)}`,\n query,\n ),\n );\n }\n\n /**\n * Gets replica-backed wallet analytics. Without `subaccountName`, latest cumulative values are\n * selected per known subaccount and then summed. The response is a snapshot and does not claim\n * live health, withdrawable collateral, open-order, or signer state.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletSummary(\n params: GetNuanzeWalletSummaryParams,\n ): Promise<GetNuanzeWalletSummaryResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletSummaryResponse(\n await this.getJson<NuanzeServerWalletSummaryResponse>(\n `/wallets/${encodeURIComponent(address)}`,\n query,\n ),\n );\n }\n\n /**\n * Lists at most 500 current replica position rows across all known subaccounts by default. Rows\n * remain per subaccount. Spot rows are excluded unless `includeSpot=true`. This is not an\n * execution-grade live feed.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPositions(\n params: GetNuanzeWalletPositionsParams,\n ): Promise<GetNuanzeWalletPositionsResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPositionsResponse(\n await this.getJson<NuanzeServerWalletPositionsResponse>(\n `/wallets/${encodeURIComponent(address)}/positions`,\n query,\n ),\n );\n }\n\n /**\n * Lists market trades for a {@link NuanzeMarketSelector}: one taker-side row per match, sorted\n * by `matchedAt` then `id` descending. Supply at least `ticker` or `productId`; when both are\n * given, `productId` is used for the path segment and `ticker` is ignored. The exclusive cursor\n * is bound to operation and normalized filters. `from` is inclusive and `to` exclusive. Wallet\n * identity is absent.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `MARKET_NOT_FOUND` when the selector does not resolve.\n */\n async getMarketTrades(\n params: GetNuanzeMarketTradesParams,\n ): Promise<GetNuanzeMarketTradesResponse> {\n return mapNuanzeMarketTradesResponse(\n await this.getMarketJson<NuanzeServerMarketTradesResponse>(\n params,\n '/trades',\n ),\n );\n }\n\n /**\n * Lists market candles for a {@link NuanzeMarketSelector}. Supply at least `ticker` or\n * `productId`; when both are given, `productId` is used for the path segment and `ticker` is\n * ignored. Source storage is 1h; 4h and 1d are UTC-aligned rollups and missing bars are not\n * interpolated. The newest `limit` matching bars are selected and returned oldest-to-newest,\n * at most 750, with no pagination. A current bucket has `complete=false`.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_INTERVAL`, `RANGE_TOO_LARGE`,\n * `AMBIGUOUS_MARKET`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve.\n */\n async getMarketCandles(\n params: GetNuanzeMarketCandlesParams,\n ): Promise<GetNuanzeMarketCandlesResponse> {\n return mapNuanzeMarketCandlesResponse(\n await this.getMarketJson<NuanzeServerMarketCandlesResponse>(\n params,\n '/candles',\n ),\n );\n }\n\n /**\n * Lists wallet-owned maker and taker execution rows, sorted by `matchedAt` then `id` descending.\n * The cursor is exclusive and filter-bound. `from` is inclusive and `to` exclusive.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and\n * `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletTrades(\n params: GetNuanzeWalletTradesParams,\n ): Promise<GetNuanzeWalletTradesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletTradesResponse(\n await this.getJson<NuanzeServerWalletTradesResponse>(\n `/wallets/${encodeURIComponent(address)}/trades`,\n query,\n ),\n );\n }\n\n /**\n * Gets wallet account PnL. 24h is rolling and uses hourly snapshots with a daily fallback\n * baseline. Longer windows use daily snapshots; `all` starts at earliest coverage. PnL includes\n * realized and unrealized movement plus funding.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnl(\n params: GetNuanzeWalletPnlParams,\n ): Promise<GetNuanzeWalletPnlResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlResponse(\n await this.getJson<NuanzeServerWalletPnlResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl`,\n query,\n ),\n );\n }\n\n /**\n * Gets a wallet account series of at most 1,000 deterministically sampled points ordered by\n * timestamp. Series contain a boundary anchor and a carried-forward request-time tip; synthetic\n * points are identified. Latest buckets may be provisional.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_ADDRESS` or `BAD_REQUEST` on invalid input,\n * and `WALLET_NOT_FOUND` when the address has no wallet data.\n */\n async getWalletPnlSeries(\n params: GetNuanzeWalletPnlSeriesParams,\n ): Promise<GetNuanzeWalletPnlSeriesResponse> {\n const { address, ...query } = params;\n return mapNuanzeWalletPnlSeriesResponse(\n await this.getJson<NuanzeServerWalletPnlSeriesResponse>(\n `/wallets/${encodeURIComponent(address)}/pnl/series`,\n query,\n ),\n );\n }\n\n /**\n * Lists public collateral events, sorted by timestamp then `id` descending. Repeated `productId`\n * uses OR semantics. `minUsd` excludes unvalued events; without it unvalued events remain.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor are invalid.\n */\n async getCollateralFlows(\n params: GetNuanzeCollateralFlowsParams = {},\n ): Promise<GetNuanzeCollateralFlowsResponse> {\n return mapNuanzeCollateralFlowsResponse(\n await this.getJson<NuanzeServerCollateralFlowsResponse>('/flows', params),\n );\n }\n\n /**\n * Gets collateral flow aggregates: deposited, withdrawn, net, and gross, with valuation coverage\n * and a prior equal-window comparison. `all` has no prior window.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\n */\n async getCollateralFlowSummary(\n params: GetNuanzeCollateralFlowSummaryParams = {},\n ): Promise<GetNuanzeCollateralFlowSummaryResponse> {\n return mapNuanzeCollateralFlowSummaryResponse(\n await this.getJson<NuanzeServerCollateralFlowSummaryResponse>(\n '/flows/summary',\n params,\n ),\n );\n }\n\n /**\n * Gets collateral flow series of at most 1,000 UTC buckets. Allowed timeframe/bucket pairs are\n * 24h/hour, 7d/hour or day (default hour), 30d/day, and all/day.\n *\n * @throws {NuanzeServerFailureError} With `UNSUPPORTED_BUCKET` or `BAD_REQUEST` when the pair or\n * filters are invalid.\n */\n async getCollateralFlowSeries(\n params: GetNuanzeCollateralFlowSeriesParams = {},\n ): Promise<GetNuanzeCollateralFlowSeriesResponse> {\n return mapNuanzeCollateralFlowSeriesResponse(\n await this.getJson<NuanzeServerCollateralFlowSeriesResponse>(\n '/flows/series',\n params,\n ),\n );\n }\n\n /**\n * Gets privacy-preserving aggregate positioning for an active perpetual identified by\n * {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`; when both are given,\n * `productId` is used for the path segment and `ticker` is ignored. Cross and isolated legs\n * are summed within owner/subaccount/product before direction classification. Every cell\n * requires at least 20 distinct contributing owners. No identity, individual position, entry\n * price, PnL, margin, or leverage fields are returned.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid input,\n * and `MARKET_NOT_FOUND` when the selector does not resolve to a perp.\n */\n async getMarketPositioning(\n params: GetNuanzeMarketPositioningParams,\n ): Promise<GetNuanzeMarketPositioningResponse> {\n return mapNuanzeMarketPositioningResponse(\n await this.getMarketJson<NuanzeServerMarketPositioningResponse>(\n params,\n '/positioning',\n ),\n );\n }\n\n /**\n * Lists open perpetual position legs for a market identified by {@link NuanzeMarketSelector}.\n * Supply at least `ticker` or `productId`; when both are given, `productId` is used for the\n * path segment and `ticker` is ignored. Results default to absolute notional descending and\n * can be ordered by signed unrealized PnL or absolute base amount in either direction. Spot\n * markets are not supported. Legs below $10 absolute notional are excluded. Wallet addresses,\n * nullable synced usernames, display names, and avatar URLs, and signed exact base amounts are\n * returned.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,\n * `CURSOR_FILTER_MISMATCH`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the\n * selector does not resolve to a perp.\n */\n async getMarketPositions(\n params: GetNuanzeMarketPositionsParams,\n ): Promise<GetNuanzeMarketPositionsResponse> {\n return mapNuanzeMarketPositionsResponse(\n await this.getMarketJson<NuanzeServerMarketPositionsResponse>(\n params,\n '/positions',\n ),\n );\n }\n\n /**\n * Lists current open perpetual position legs across every market by signed unrealized PnL.\n * Descending returns the largest gainers and ascending returns the largest losers. This is a\n * latest indexed snapshot with no timeframe. Legs below $10 absolute notional are excluded.\n * Private subaccounts are excluded unless `includePrivate=true`. Each row includes market\n * identity, nullable synced username, display name, and avatar URL, and its source snapshot\n * timestamp.\n * Isolated positions include effective leverage computed by Nuanze; cross positions return\n * null leverage.\n *\n * @throws {NuanzeServerFailureError} With `INVALID_CURSOR`, `CURSOR_FILTER_MISMATCH`, or\n * `BAD_REQUEST` when the query or cursor is invalid.\n */\n async getOpenPositions(\n params: GetNuanzeOpenPositionsParams = {},\n ): Promise<GetNuanzeOpenPositionsResponse> {\n return mapNuanzeOpenPositionsResponse(\n await this.getJson<NuanzeServerOpenPositionsResponse>(\n '/positions',\n params,\n ),\n );\n }\n\n /**\n * Performs a GET against `{baseUrl}{path}` and classifies the status before returning the body.\n */\n private async getJson<T>(path: string, params?: object): Promise<T> {\n return this.requestJson<T>(path, { params });\n }\n\n private async getMarketJson<T>(\n params: NuanzeMarketSelector & object,\n suffix = '',\n ): Promise<T> {\n const { productId, ticker, ...query } = params;\n const selector = productId ?? ticker;\n if (selector === undefined) {\n throw new Error('A market ticker or productId is required.');\n }\n return this.getJson<T>(\n `/markets/${encodeURIComponent(selector.toString())}${suffix}`,\n query,\n );\n }\n\n private async requestJson<T>(\n path: string,\n config: { params?: object } = {},\n ): Promise<T> {\n const response = await this.axiosInstance.request<T>({\n method: 'GET',\n url: `${this.opts.url}${path}`,\n ...config,\n });\n this.checkResponseStatus(response);\n return response.data;\n }\n\n /**\n * Validates the HTTP status before interpreting the body. Nuanze maps every domain failure onto a\n * non-2xx status carrying a failure envelope, so anything else is a transport-level error.\n */\n private checkResponseStatus(response: AxiosResponse<unknown>) {\n if (response.status >= 200 && response.status < 300) {\n return;\n }\n if (isNuanzeServerFailureResponse(response.data)) {\n throw new NuanzeServerFailureError(response.data, response.status);\n }\n throw new Error(\n `Unexpected response from Nuanze: ${response.status} ${response.statusText}. Data: ${JSON.stringify(response.data)}`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAqIA,IAAa,eAAb,MAA0B;CAIxB,YAAY,MAAwB;EAClC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAM,OAAO;GAGhC,iBAAiB;GAEjB,sBAAsB;GAEtB,kBAAkB,EAAE,SAAS,KAAK;EACpC,CAAC;CACH;;;;;;;;;;;CAYA,MAAM,QACJ,SAA8B,CAAC,GACC;EAChC,OAAO,sBACL,MAAM,KAAK,QAAkC,SAAS,MAAM,CAC9D;CACF;;;;;;;;;CAUA,MAAM,WACJ,SAAiC,CAAC,GACC;EACnC,OAAO,yBACL,MAAM,KAAK,QAAqC,YAAY,MAAM,CACpE;CACF;;;;;;;;;;;CAYA,MAAM,kBACJ,QAC0C;EAC1C,OAAO,gCACL,MAAM,KAAK,cAAkD,MAAM,CACrE;CACF;;;;;;;CAQA,MAAM,gBACJ,SAAsC,CAAC,GACC;EACxC,OAAO,8BACL,MAAM,KAAK,QACT,kBACA,MACF,CACF;CACF;;;;;;;;;;CAWA,MAAM,eACJ,SAAqC,CAAC,GACC;EACvC,OAAO,6BACL,MAAM,KAAK,QACT,gBACA,MACF,CACF;CACF;;;;;;;;;;;CAYA,MAAM,6BACJ,QACqD;EACrD,MAAM,EAAE,SAAS,GAAG,UAAU;EAC9B,OAAO,2CACL,MAAM,KAAK,QACT,wBAAwB,mBAAmB,OAAO,KAClD,KACF,CACF;CACF;;;;;;;;;;;;;;;;CAiBA,MAAM,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,YAAe,MAAM,EAAE,OAAO,CAAC;CAC7C;CAEA,MAAc,cACZ,QACA,SAAS,IACG;EACZ,MAAM,EAAE,WAAW,QAAQ,GAAG,UAAU;EACxC,MAAM,WAAW,aAAa;EAC9B,IAAI,aAAa,KAAA,GACf,MAAM,IAAI,MAAM,2CAA2C;EAE7D,OAAO,KAAK,QACV,YAAY,mBAAmB,SAAS,SAAS,CAAC,IAAI,UACtD,KACF;CACF;CAEA,MAAc,YACZ,MACA,SAA8B,CAAC,GACnB;EACZ,MAAM,WAAW,MAAM,KAAK,cAAc,QAAW;GACnD,QAAQ;GACR,KAAK,GAAG,KAAK,KAAK,MAAM;GACxB,GAAG;EACL,CAAC;EACD,KAAK,oBAAoB,QAAQ;EACjC,OAAO,SAAS;CAClB;;;;;CAMA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAI,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAI,yBAAyB,SAAS,MAAM,SAAS,MAAM;EAEnE,MAAM,IAAI,MACR,oCAAoC,SAAS,OAAO,GAAG,SAAS,WAAW,UAAU,KAAK,UAAU,SAAS,IAAI,GACnH;CACF;AACF"}
|
package/dist/{NuanzeServerFailureError-D6KPGUg9.d.ts → NuanzeServerFailureError-BeiAW2Uo.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as NuanzeErrorCode } from "./nuanzeErrorCodes-DWzJGzaI.js";
|
|
2
|
-
import { a as NuanzeServerFailureResponse } from "./serverQueryTypes-
|
|
2
|
+
import { a as NuanzeServerFailureResponse } from "./serverQueryTypes-CO9GCAfM.js";
|
|
3
3
|
|
|
4
4
|
//#region src/types/NuanzeServerFailureError.d.ts
|
|
5
5
|
/**
|
|
@@ -26,4 +26,4 @@ declare class NuanzeServerFailureError extends Error {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
export { NuanzeServerFailureError as t };
|
|
29
|
-
//# sourceMappingURL=NuanzeServerFailureError-
|
|
29
|
+
//# sourceMappingURL=NuanzeServerFailureError-BeiAW2Uo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-BeiAW2Uo.d.ts","names":[],"sources":["../src/types/src/types/NuanzeServerFailureError.ts"],"mappings":";;;;;;AAQA;;;cAAa,wBAAA,SAAiC,KAAA;EAAA,SAkBjC,YAAA,EAAc,2BAAA;EAAA;;;;EAAA,SAbhB,SAAA,EAAW,eAAA;EAaT;;;EAAA,SARF,UAAA;EAAA;;;EAAA,SAKA,SAAA;cAGE,YAAA,EAAc,2BAAA,EACvB,UAAA;AAAA"}
|
package/dist/{NuanzeServerFailureError-BvCgAQBY.d.cts → NuanzeServerFailureError-CQOL2fxe.d.cts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as NuanzeErrorCode } from "./nuanzeErrorCodes-DWzJGzaI.cjs";
|
|
2
|
-
import { a as NuanzeServerFailureResponse } from "./serverQueryTypes-
|
|
2
|
+
import { a as NuanzeServerFailureResponse } from "./serverQueryTypes-BRxcYfpb.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/types/NuanzeServerFailureError.d.ts
|
|
5
5
|
/**
|
|
@@ -26,4 +26,4 @@ declare class NuanzeServerFailureError extends Error {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
export { NuanzeServerFailureError as t };
|
|
29
|
-
//# sourceMappingURL=NuanzeServerFailureError-
|
|
29
|
+
//# sourceMappingURL=NuanzeServerFailureError-CQOL2fxe.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-CQOL2fxe.d.cts","names":[],"sources":["../src/types/src/types/NuanzeServerFailureError.ts"],"mappings":";;;;;;AAQA;;;cAAa,wBAAA,SAAiC,KAAA;EAAA,SAkBjC,YAAA,EAAc,2BAAA;EAAA;;;;EAAA,SAbhB,SAAA,EAAW,eAAA;EAaT;;;EAAA,SARF,UAAA;EAAA;;;EAAA,SAKA,SAAA;cAGE,YAAA,EAAc,2BAAA,EACvB,UAAA;AAAA"}
|
|
@@ -570,6 +570,14 @@ interface NuanzeFollowedLeaderboardItem {
|
|
|
570
570
|
* the subaccount has no PnL in the window.
|
|
571
571
|
*/
|
|
572
572
|
globalRank: number | null;
|
|
573
|
+
/**
|
|
574
|
+
* Position among the follower's followed subaccounts that pass the request's
|
|
575
|
+
* `includeUntraded`, `includePrivate`, and `includeUnclaimed` filters, in collection order
|
|
576
|
+
* (`1` = highest), counted across cursor pages rather than within one. Set on every
|
|
577
|
+
* collection row; on a `viewer` or position item it equals the enclosing `filteredRank`, so it
|
|
578
|
+
* is null when the filters exclude that subaccount.
|
|
579
|
+
*/
|
|
580
|
+
filteredRank: number | null;
|
|
573
581
|
/**
|
|
574
582
|
* Perp plus spot volume in the timeframe, from the same account snapshots and window bounds as
|
|
575
583
|
* `pnl`, or null when the subaccount has no account snapshot at the window's grain.
|
|
@@ -659,6 +667,13 @@ interface NuanzeSubaccountLeaderboardItem {
|
|
|
659
667
|
* subaccount has no PnL in the window.
|
|
660
668
|
*/
|
|
661
669
|
globalRank: number | null;
|
|
670
|
+
/**
|
|
671
|
+
* Position among the subaccounts that pass the request's `includePrivate`, `includeUntraded`,
|
|
672
|
+
* and `includeUnclaimed` filters, in collection order (`1` = highest), counted across cursor
|
|
673
|
+
* pages rather than within one. Set on every collection row; on a `viewer` or position item it
|
|
674
|
+
* equals the enclosing `filteredRank`, so it is null when the filters exclude that subaccount.
|
|
675
|
+
*/
|
|
676
|
+
filteredRank: number | null;
|
|
662
677
|
/**
|
|
663
678
|
* Perp plus spot volume in the timeframe, from the same account snapshots and window bounds as
|
|
664
679
|
* `pnl` (and as `windowVolume` on `GET /subaccounts/{subaccountHex}`), or null when the
|
|
@@ -1106,4 +1121,4 @@ interface NuanzeMarketPositioningNotionalBucketResponse extends NuanzeMarketPosi
|
|
|
1106
1121
|
}
|
|
1107
1122
|
//#endregion
|
|
1108
1123
|
export { NuanzeLeaderboardItem as $, NuanzeCandle as A, NuanzePointsTier as At, NuanzeFlowEventType as B, NuanzeSubaccountCloseTrade as Bt, NUANZE_PNL_WINDOWS as C, NuanzeNotionalBucket as Ct, NUANZE_SERIES_METRICS as D, NuanzePlatformDeltas as Dt, NUANZE_POSITION_SIDES as E, NuanzeOpenPositionSortDirection as Et, NuanzeCohortSeriesPoint as F, NuanzeSeriesMetric as Ft, NuanzeFundamentalsKeyData as G, NuanzeWalletPosition as Gt, NuanzeFlowTags as H, NuanzeSubaccountLongShortBias as Ht, NuanzeCollateralFlow as I, NuanzeSeriesPoint as It, NuanzeFundamentalsSource as J, NuanzeFundamentalsPerformance as K, NuanzeWalletTrade as Kt, NuanzeCollateralFlowPoint as L, NuanzeSidePositioningCell as Lt, NuanzeCohort as M, NuanzePositioningCellBase as Mt, NuanzeCohortKey as N, NuanzePositioningGroupBy as Nt, NUANZE_SOURCE_INTERVALS as O, NuanzePlatformWindow as Ot, NuanzeCohortPositioningCell as P, NuanzePositioningTotals as Pt, NuanzeLatestTicker as Q, NuanzeCoverage as R, NuanzeSourceInterval as Rt, NUANZE_PLATFORM_WINDOWS as S, NuanzeNewsTier as St, NUANZE_POSITIONING_GROUP_BYS as T, NuanzeOpenPosition as Tt, NuanzeFlowTimeframe as U, NuanzeSubaccountMostTradedMarket as Ut, NuanzeFlowEventTypeFilter as V, NuanzeSubaccountLeaderboardItem as Vt, NuanzeFollowedLeaderboardItem as W, NuanzeTradeSide as Wt, NuanzeFundingObservation as X, NuanzeFundamentalsValuation as Y, NuanzeFundingRate as Z, NUANZE_NEWS_EVENT_TYPES as _, NuanzeNewsEntity as _t, NUANZE_FLOW_EVENT_TYPES as a, NuanzeMarketIdentity as at, NUANZE_NOTIONAL_BUCKETS as b, NuanzeNewsSentiment as bt, NUANZE_FUNDAMENTALS_SOURCES as c, NuanzeMarketPositionSortDirection as ct, NUANZE_MARKET_POSITION_SORT_BYS as d, NuanzeMarketPositioningNotionalBucketResponse as dt, NuanzeLeaderboardTimeframe as et, NUANZE_MARKET_POSITION_SORT_DIRECTIONS as f, NuanzeMarketPositioningSideResponse as ft, NUANZE_NEWS_ENTITY_ROLES as g, NuanzeMinPositionUsd as gt, NUANZE_MIN_POSITION_USDS as h, NuanzeMarketVenue as ht, NUANZE_FLOW_BUCKETS as i, NuanzeMarketDetail as it, NuanzeCandleInterval as j, NuanzePositionSide as jt, NUANZE_TRADE_SIDES as k, NuanzePnlWindow as kt, NUANZE_LEADERBOARD_TIMEFRAMES as l, NuanzeMarketPositioningBase as lt, NUANZE_MARKET_VENUES as m, NuanzeMarketTradingStatus as mt, NUANZE_COHORT_KEYS as n, NuanzeMarket as nt, NUANZE_FLOW_EVENT_TYPE_FILTERS as o, NuanzeMarketPosition as ot, NUANZE_MARKET_TRADING_STATUSES as p, NuanzeMarketTrade as pt, NuanzeFundamentalsSocial as q, NUANZE_COVERAGES as r, NuanzeMarketComponentUpdatedAt as rt, NUANZE_FLOW_TIMEFRAMES as s, NuanzeMarketPositionSortBy as st, NUANZE_CANDLE_INTERVALS as t, NuanzeMarginKind as tt, NUANZE_MARGIN_KINDS as u, NuanzeMarketPositioningCohortResponse as ut, NUANZE_NEWS_SENTIMENTS as v, NuanzeNewsEntityRole as vt, NUANZE_POINTS_TIERS as w, NuanzeNotionalBucketPositioningCell as wt, NUANZE_OPEN_POSITION_SORT_DIRECTIONS as x, NuanzeNewsStory as xt, NUANZE_NEWS_TIERS as y, NuanzeNewsEventType as yt, NuanzeFlowBucket as z, NuanzeStockFundamentals as zt };
|
|
1109
|
-
//# sourceMappingURL=clientModelTypes-
|
|
1124
|
+
//# sourceMappingURL=clientModelTypes-C0LBnfWU.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientModelTypes-C0LBnfWU.d.cts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;EAlCtF;EAoCA,OAAA;EApCoB;EAsCpB,KAAA,EAAO,yBAAA;AAAA;;;;UAMQ,qCAAA,SAA8C,2BAA2B;EAnCxF;EAqCA,OAAA;EArCyB;EAuCzB,KAAA,EAAO,2BAAA;AAAA;;;;UAMQ,6CAAA,SAAsD,2BAA2B;EAtC7C;EAwCnD,OAAA;EAxCuE;EA0CvE,KAAA,EAAO,mCAAA;AAAA"}
|
|
@@ -570,6 +570,14 @@ interface NuanzeFollowedLeaderboardItem {
|
|
|
570
570
|
* the subaccount has no PnL in the window.
|
|
571
571
|
*/
|
|
572
572
|
globalRank: number | null;
|
|
573
|
+
/**
|
|
574
|
+
* Position among the follower's followed subaccounts that pass the request's
|
|
575
|
+
* `includeUntraded`, `includePrivate`, and `includeUnclaimed` filters, in collection order
|
|
576
|
+
* (`1` = highest), counted across cursor pages rather than within one. Set on every
|
|
577
|
+
* collection row; on a `viewer` or position item it equals the enclosing `filteredRank`, so it
|
|
578
|
+
* is null when the filters exclude that subaccount.
|
|
579
|
+
*/
|
|
580
|
+
filteredRank: number | null;
|
|
573
581
|
/**
|
|
574
582
|
* Perp plus spot volume in the timeframe, from the same account snapshots and window bounds as
|
|
575
583
|
* `pnl`, or null when the subaccount has no account snapshot at the window's grain.
|
|
@@ -659,6 +667,13 @@ interface NuanzeSubaccountLeaderboardItem {
|
|
|
659
667
|
* subaccount has no PnL in the window.
|
|
660
668
|
*/
|
|
661
669
|
globalRank: number | null;
|
|
670
|
+
/**
|
|
671
|
+
* Position among the subaccounts that pass the request's `includePrivate`, `includeUntraded`,
|
|
672
|
+
* and `includeUnclaimed` filters, in collection order (`1` = highest), counted across cursor
|
|
673
|
+
* pages rather than within one. Set on every collection row; on a `viewer` or position item it
|
|
674
|
+
* equals the enclosing `filteredRank`, so it is null when the filters exclude that subaccount.
|
|
675
|
+
*/
|
|
676
|
+
filteredRank: number | null;
|
|
662
677
|
/**
|
|
663
678
|
* Perp plus spot volume in the timeframe, from the same account snapshots and window bounds as
|
|
664
679
|
* `pnl` (and as `windowVolume` on `GET /subaccounts/{subaccountHex}`), or null when the
|
|
@@ -1106,4 +1121,4 @@ interface NuanzeMarketPositioningNotionalBucketResponse extends NuanzeMarketPosi
|
|
|
1106
1121
|
}
|
|
1107
1122
|
//#endregion
|
|
1108
1123
|
export { NuanzeLeaderboardItem as $, NuanzeCandle as A, NuanzePointsTier as At, NuanzeFlowEventType as B, NuanzeSubaccountCloseTrade as Bt, NUANZE_PNL_WINDOWS as C, NuanzeNotionalBucket as Ct, NUANZE_SERIES_METRICS as D, NuanzePlatformDeltas as Dt, NUANZE_POSITION_SIDES as E, NuanzeOpenPositionSortDirection as Et, NuanzeCohortSeriesPoint as F, NuanzeSeriesMetric as Ft, NuanzeFundamentalsKeyData as G, NuanzeWalletPosition as Gt, NuanzeFlowTags as H, NuanzeSubaccountLongShortBias as Ht, NuanzeCollateralFlow as I, NuanzeSeriesPoint as It, NuanzeFundamentalsSource as J, NuanzeFundamentalsPerformance as K, NuanzeWalletTrade as Kt, NuanzeCollateralFlowPoint as L, NuanzeSidePositioningCell as Lt, NuanzeCohort as M, NuanzePositioningCellBase as Mt, NuanzeCohortKey as N, NuanzePositioningGroupBy as Nt, NUANZE_SOURCE_INTERVALS as O, NuanzePlatformWindow as Ot, NuanzeCohortPositioningCell as P, NuanzePositioningTotals as Pt, NuanzeLatestTicker as Q, NuanzeCoverage as R, NuanzeSourceInterval as Rt, NUANZE_PLATFORM_WINDOWS as S, NuanzeNewsTier as St, NUANZE_POSITIONING_GROUP_BYS as T, NuanzeOpenPosition as Tt, NuanzeFlowTimeframe as U, NuanzeSubaccountMostTradedMarket as Ut, NuanzeFlowEventTypeFilter as V, NuanzeSubaccountLeaderboardItem as Vt, NuanzeFollowedLeaderboardItem as W, NuanzeTradeSide as Wt, NuanzeFundingObservation as X, NuanzeFundamentalsValuation as Y, NuanzeFundingRate as Z, NUANZE_NEWS_EVENT_TYPES as _, NuanzeNewsEntity as _t, NUANZE_FLOW_EVENT_TYPES as a, NuanzeMarketIdentity as at, NUANZE_NOTIONAL_BUCKETS as b, NuanzeNewsSentiment as bt, NUANZE_FUNDAMENTALS_SOURCES as c, NuanzeMarketPositionSortDirection as ct, NUANZE_MARKET_POSITION_SORT_BYS as d, NuanzeMarketPositioningNotionalBucketResponse as dt, NuanzeLeaderboardTimeframe as et, NUANZE_MARKET_POSITION_SORT_DIRECTIONS as f, NuanzeMarketPositioningSideResponse as ft, NUANZE_NEWS_ENTITY_ROLES as g, NuanzeMinPositionUsd as gt, NUANZE_MIN_POSITION_USDS as h, NuanzeMarketVenue as ht, NUANZE_FLOW_BUCKETS as i, NuanzeMarketDetail as it, NuanzeCandleInterval as j, NuanzePositionSide as jt, NUANZE_TRADE_SIDES as k, NuanzePnlWindow as kt, NUANZE_LEADERBOARD_TIMEFRAMES as l, NuanzeMarketPositioningBase as lt, NUANZE_MARKET_VENUES as m, NuanzeMarketTradingStatus as mt, NUANZE_COHORT_KEYS as n, NuanzeMarket as nt, NUANZE_FLOW_EVENT_TYPE_FILTERS as o, NuanzeMarketPosition as ot, NUANZE_MARKET_TRADING_STATUSES as p, NuanzeMarketTrade as pt, NuanzeFundamentalsSocial as q, NUANZE_COVERAGES as r, NuanzeMarketComponentUpdatedAt as rt, NUANZE_FLOW_TIMEFRAMES as s, NuanzeMarketPositionSortBy as st, NUANZE_CANDLE_INTERVALS as t, NuanzeMarginKind as tt, NUANZE_MARGIN_KINDS as u, NuanzeMarketPositioningCohortResponse as ut, NUANZE_NEWS_SENTIMENTS as v, NuanzeNewsEntityRole as vt, NUANZE_POINTS_TIERS as w, NuanzeNotionalBucketPositioningCell as wt, NUANZE_OPEN_POSITION_SORT_DIRECTIONS as x, NuanzeNewsStory as xt, NUANZE_NEWS_TIERS as y, NuanzeNewsEventType as yt, NuanzeFlowBucket as z, NuanzeStockFundamentals as zt };
|
|
1109
|
-
//# sourceMappingURL=clientModelTypes-
|
|
1124
|
+
//# sourceMappingURL=clientModelTypes-C0LBnfWU.d.ts.map
|