@nadohq/nuanze-client 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -7
- package/dist/{NuanzeClient-DK1Y8O_6.cjs → NuanzeClient-Tl_Dke8Z.cjs} +59 -2
- package/dist/NuanzeClient-Tl_Dke8Z.cjs.map +1 -0
- package/dist/NuanzeClient.cjs +1 -1
- package/dist/NuanzeClient.d.cts +50 -2
- package/dist/NuanzeClient.d.cts.map +1 -1
- package/dist/NuanzeClient.d.ts +50 -2
- package/dist/NuanzeClient.d.ts.map +1 -1
- package/dist/NuanzeClient.js +59 -2
- package/dist/NuanzeClient.js.map +1 -1
- package/dist/{NuanzeServerFailureError-DNZobL5e.d.ts → NuanzeServerFailureError-DpJbwqx9.d.ts} +2 -2
- package/dist/{NuanzeServerFailureError-DNZobL5e.d.ts.map → NuanzeServerFailureError-DpJbwqx9.d.ts.map} +1 -1
- package/dist/{NuanzeServerFailureError-BhwISexo.d.cts → NuanzeServerFailureError-Du6XnrqA.d.cts} +2 -2
- package/dist/{NuanzeServerFailureError-BhwISexo.d.cts.map → NuanzeServerFailureError-Du6XnrqA.d.cts.map} +1 -1
- package/dist/{clientTypes-Dn_aEMkq.d.cts → clientTypes-CX6Rpkyf.d.cts} +126 -2
- package/dist/clientTypes-CX6Rpkyf.d.cts.map +1 -0
- package/dist/{clientTypes-o_pl9igJ.d.ts → clientTypes-Dm5-t7pz.d.ts} +126 -2
- package/dist/clientTypes-Dm5-t7pz.d.ts.map +1 -0
- package/dist/dataMappers.cjs +49 -2
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +24 -4
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +24 -4
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +46 -2
- package/dist/dataMappers.js.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/{serverQueryTypes-CumC-LaJ.d.cts → serverQueryTypes-0DJc4-Oo.d.cts} +32 -2
- package/dist/serverQueryTypes-0DJc4-Oo.d.cts.map +1 -0
- package/dist/{serverQueryTypes-BZPjG_2U.d.ts → serverQueryTypes-qJw753VN.d.ts} +32 -2
- package/dist/serverQueryTypes-qJw753VN.d.ts.map +1 -0
- package/dist/types/NuanzeServerFailureError.d.cts +1 -1
- package/dist/types/NuanzeServerFailureError.d.ts +1 -1
- package/dist/types/clientTypes.d.cts +2 -2
- package/dist/types/clientTypes.d.ts +2 -2
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -2
- package/dist/types/serverQueryTypes.d.ts +2 -2
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/package.json +3 -3
- package/src/NuanzeClient.ts +94 -1
- package/src/dataMappers.ts +72 -1
- package/src/types/clientTypes.ts +132 -0
- package/src/types/serverQueryTypes.ts +33 -0
- package/dist/NuanzeClient-DK1Y8O_6.cjs.map +0 -1
- package/dist/clientTypes-Dn_aEMkq.d.cts.map +0 -1
- package/dist/clientTypes-o_pl9igJ.d.ts.map +0 -1
- package/dist/serverQueryTypes-BZPjG_2U.d.ts.map +0 -1
- package/dist/serverQueryTypes-CumC-LaJ.d.cts.map +0 -1
package/dist/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 mapNuanzeCollateralFlowSeriesResponse,\n mapNuanzeCollateralFlowSummaryResponse,\n mapNuanzeCollateralFlowsResponse,\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 mapNuanzeSubaccountLeaderboardResponse,\n mapNuanzeWalletPnlResponse,\n mapNuanzeWalletPnlSeriesResponse,\n mapNuanzeWalletPositionsResponse,\n mapNuanzeWalletSummaryResponse,\n mapNuanzeWalletTradesResponse,\n} from './dataMappers';\nimport {\n GetNuanzeCollateralFlowSeriesParams,\n GetNuanzeCollateralFlowSeriesResponse,\n GetNuanzeCollateralFlowSummaryParams,\n GetNuanzeCollateralFlowSummaryResponse,\n GetNuanzeCollateralFlowsParams,\n GetNuanzeCollateralFlowsResponse,\n GetNuanzeFollowedLeaderboardParams,\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 GetNuanzeSubaccountLeaderboardResponse,\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 NuanzeServerCollateralFlowSeriesResponse,\n NuanzeServerCollateralFlowSummaryResponse,\n NuanzeServerCollateralFlowsResponse,\n NuanzeServerFollowedLeaderboardResponse,\n NuanzeServerFundingRatesResponse,\n NuanzeServerLeaderboardResponse,\n NuanzeServerMarketByTickerResponse,\n NuanzeServerMarketCandlesResponse,\n NuanzeServerMarketPositionsResponse,\n NuanzeServerMarketTradesResponse,\n NuanzeServerMarketsResponse,\n NuanzeServerNewsResponse,\n NuanzeServerOpenPositionsResponse,\n NuanzeServerPlatformSummaryResponse,\n NuanzeServerSubaccountLeaderboardResponse,\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 the global public leaderboard of subaccounts. Results are sorted by equity-basis account\n * PnL descending with nulls last. Username and display name are null when 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 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 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 *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` when params 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 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 and display names, and signed exact base amounts are 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 and display name, and its source snapshot 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":";;;;;;;;;;;;;;AAkHA,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;;;;;;;;;;;;;;CAeA,MAAM,yBACJ,SAA+C,CAAC,GACC;EACjD,OAAO,uCACL,MAAM,KAAK,QACT,4BACA,MACF,CACF;CACF;;;;;;CAOA,MAAM,mBACJ,SAAyC,CAAC,GACC;EAC3C,OAAO,iCACL,MAAM,KAAK,QACT,qBACA,MACF,CACF;CACF;;;;;;;;;CAUA,MAAM,uBACJ,QAC+C;EAC/C,OAAO,qCACL,MAAM,KAAK,QACT,wBACA,MACF,CACF;CACF;;;;;;;;;CAUA,MAAM,iBACJ,QACyC;EACzC,MAAM,EAAE,SAAS,GAAG,UAAU;EAC9B,OAAO,+BACL,MAAM,KAAK,QACT,YAAY,mBAAmB,OAAO,KACtC,KACF,CACF;C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A,MAAM,mBACJ,QAC2C;EAC3C,OAAO,iCACL,MAAM,KAAK,cACT,QACA,YACF,CACF;CACF;;;;;;;;;;;;;CAcA,MAAM,iBACJ,SAAuC,CAAC,GACC;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 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 mapNuanzeWalletLeaderboardPositionResponse,\n mapNuanzeWalletPnlResponse,\n mapNuanzeWalletPnlSeriesResponse,\n mapNuanzeWalletPositionsResponse,\n mapNuanzeWalletSummaryResponse,\n mapNuanzeWalletTradesResponse,\n} from './dataMappers';\nimport {\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 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 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 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 and display name are null when 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 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 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 and display names, and signed exact base amounts are 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 and display name, and its source snapshot 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":";;;;;;;;;;;;;;AA8HA,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;;;;;;;;;;;;;;CAeA,MAAM,yBACJ,SAA+C,CAAC,GACC;EACjD,OAAO,uCACL,MAAM,KAAK,QACT,4BACA,MACF,CACF;CACF;;;;;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AAM,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-DNZobL5e.d.ts → NuanzeServerFailureError-DpJbwqx9.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as NuanzeErrorCode } from "./nuanzeErrorCodes-BXfbZV_p.js";
|
|
2
|
-
import { i as NuanzeServerFailureResponse } from "./serverQueryTypes-
|
|
2
|
+
import { i as NuanzeServerFailureResponse } from "./serverQueryTypes-qJw753VN.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-DpJbwqx9.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-DpJbwqx9.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-BhwISexo.d.cts → NuanzeServerFailureError-Du6XnrqA.d.cts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as NuanzeErrorCode } from "./nuanzeErrorCodes-BJA7C7xg.cjs";
|
|
2
|
-
import { i as NuanzeServerFailureResponse } from "./serverQueryTypes-
|
|
2
|
+
import { i as NuanzeServerFailureResponse } from "./serverQueryTypes-0DJc4-Oo.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-Du6XnrqA.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-Du6XnrqA.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"}
|
|
@@ -154,6 +154,29 @@ interface GetNuanzeLeaderboardResponse {
|
|
|
154
154
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
155
155
|
asOf: string;
|
|
156
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Params for `NuanzeClient.getWalletLeaderboardPosition`.
|
|
159
|
+
*/
|
|
160
|
+
interface GetNuanzeWalletLeaderboardPositionParams {
|
|
161
|
+
/** Explicit public EVM wallet address (`0x` plus 40 hex characters) to look up. */
|
|
162
|
+
address: string;
|
|
163
|
+
/** Ranking window, default `30d`. */
|
|
164
|
+
timeframe?: NuanzeLeaderboardTimeframe;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Response of `NuanzeClient.getWalletLeaderboardPosition`.
|
|
168
|
+
*/
|
|
169
|
+
interface GetNuanzeWalletLeaderboardPositionResponse {
|
|
170
|
+
/** Echoed timeframe. */
|
|
171
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
172
|
+
/**
|
|
173
|
+
* Global leaderboard row for the address, independent of collection pagination. Null only
|
|
174
|
+
* when the wallet leaderboard source row is absent.
|
|
175
|
+
*/
|
|
176
|
+
item: NuanzeLeaderboardItem | null;
|
|
177
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
178
|
+
asOf: string;
|
|
179
|
+
}
|
|
157
180
|
/**
|
|
158
181
|
* Params for `NuanzeClient.getSubaccountLeaderboard`.
|
|
159
182
|
*/
|
|
@@ -208,6 +231,44 @@ interface GetNuanzeSubaccountLeaderboardResponse {
|
|
|
208
231
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
209
232
|
asOf: string;
|
|
210
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Params for `NuanzeClient.getSubaccountLeaderboardPosition`.
|
|
236
|
+
*/
|
|
237
|
+
interface GetNuanzeSubaccountLeaderboardPositionParams {
|
|
238
|
+
/**
|
|
239
|
+
* Explicit public bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK
|
|
240
|
+
* `subaccountToHex` form) to look up.
|
|
241
|
+
*/
|
|
242
|
+
subaccountHex: string;
|
|
243
|
+
/** Ranking window, default `30d`. */
|
|
244
|
+
timeframe?: NuanzeLeaderboardTimeframe;
|
|
245
|
+
/** Include subaccounts with Private Mode enabled in the filtered-rank population, default false. */
|
|
246
|
+
includePrivate?: boolean;
|
|
247
|
+
/** Include subaccounts with no PnL in the requested window in the filtered-rank population, default false. */
|
|
248
|
+
includeUntraded?: boolean;
|
|
249
|
+
/** Include subaccounts without a claimed username in the filtered-rank population, default true. */
|
|
250
|
+
includeUnclaimed?: boolean;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Response of `NuanzeClient.getSubaccountLeaderboardPosition`.
|
|
254
|
+
*/
|
|
255
|
+
interface GetNuanzeSubaccountLeaderboardPositionResponse {
|
|
256
|
+
/** Echoed timeframe. */
|
|
257
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
258
|
+
/**
|
|
259
|
+
* Rank within the filter-defined population. Null when the source row is absent or when the
|
|
260
|
+
* existing row is excluded by the active privacy, trading, or username-claim filters.
|
|
261
|
+
*/
|
|
262
|
+
filteredRank: number | null;
|
|
263
|
+
/**
|
|
264
|
+
* Full subaccount leaderboard source row, including the filter-independent `globalRank`. Null
|
|
265
|
+
* only when no source row exists for the subaccount; an existing but filter-excluded row
|
|
266
|
+
* keeps its full item with `filteredRank` null.
|
|
267
|
+
*/
|
|
268
|
+
item: NuanzeSubaccountLeaderboardItem | null;
|
|
269
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
270
|
+
asOf: string;
|
|
271
|
+
}
|
|
211
272
|
/**
|
|
212
273
|
* Params for `NuanzeClient.getFollowedLeaderboard`. `timeframe` is required and applies to
|
|
213
274
|
* every per-subaccount figure.
|
|
@@ -230,6 +291,15 @@ interface GetNuanzeFollowedLeaderboardParams {
|
|
|
230
291
|
* filters and must be returned unchanged.
|
|
231
292
|
*/
|
|
232
293
|
cursor?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Optional bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK `subaccountToHex`
|
|
296
|
+
* form) selecting the viewer perspective within the follower's graph. It is an
|
|
297
|
+
* unauthenticated explicit-identifier claim: it selects whose row is returned in `viewer`
|
|
298
|
+
* and proves nothing about who is asking. The viewer lookup uses the same timeframe and
|
|
299
|
+
* active filters as the page but is independent of `limit` and `cursor` and never alters
|
|
300
|
+
* pagination.
|
|
301
|
+
*/
|
|
302
|
+
viewAs?: string;
|
|
233
303
|
}
|
|
234
304
|
/**
|
|
235
305
|
* Response of `NuanzeClient.getFollowedLeaderboard`.
|
|
@@ -241,6 +311,60 @@ interface GetNuanzeFollowedLeaderboardResponse {
|
|
|
241
311
|
items: NuanzeFollowedLeaderboardItem[];
|
|
242
312
|
/** Opaque cursor for the next page, or null when this is the final page. */
|
|
243
313
|
nextCursor: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Viewer for the `viewAs` subaccount, or null when `viewAs` was omitted or the follower has
|
|
316
|
+
* no active follow edge to that subaccount. An existing but filter-excluded followed row
|
|
317
|
+
* keeps its full `item` (including `globalRank`, which is filter-independent) with
|
|
318
|
+
* `filteredRank` null; an included row carries both ranks, with `filteredRank` counted among
|
|
319
|
+
* the follower's filter-passing followed subaccounts only.
|
|
320
|
+
*/
|
|
321
|
+
viewer: {
|
|
322
|
+
/** Rank among the follower's filter-passing followed subaccounts, or null when excluded. */filteredRank: number | null; /** Full followed leaderboard row. */
|
|
323
|
+
item: NuanzeFollowedLeaderboardItem | null;
|
|
324
|
+
} | null;
|
|
325
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
326
|
+
asOf: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Params for `NuanzeClient.getFollowedLeaderboardPosition`. `timeframe` is required, as on the
|
|
330
|
+
* followed collection.
|
|
331
|
+
*/
|
|
332
|
+
interface GetNuanzeFollowedLeaderboardPositionParams {
|
|
333
|
+
/** Lowercase or mixed-case bytes32 hex of the follower subaccount whose active graph is ranked. */
|
|
334
|
+
subaccountHex: string;
|
|
335
|
+
/**
|
|
336
|
+
* Bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK `subaccountToHex` form) of the
|
|
337
|
+
* followed subaccount to position within the follower's leaderboard. Both identifiers are
|
|
338
|
+
* unauthenticated explicit-identifier claims and prove nothing about who is asking.
|
|
339
|
+
*/
|
|
340
|
+
viewAs: string;
|
|
341
|
+
/** Ranking window for every per-subaccount figure. */
|
|
342
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
343
|
+
/** Include followed subaccounts with no PnL in the requested window in the filtered-rank population, default true. */
|
|
344
|
+
includeUntraded?: boolean;
|
|
345
|
+
/** Include followed subaccounts with Private Mode enabled in the filtered-rank population, default false. */
|
|
346
|
+
includePrivate?: boolean;
|
|
347
|
+
/** Include followed subaccounts without a claimed username in the filtered-rank population, default true. */
|
|
348
|
+
includeUnclaimed?: boolean;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Response of `NuanzeClient.getFollowedLeaderboardPosition`.
|
|
352
|
+
*/
|
|
353
|
+
interface GetNuanzeFollowedLeaderboardPositionResponse {
|
|
354
|
+
/** Echoed timeframe. */
|
|
355
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
356
|
+
/**
|
|
357
|
+
* Rank among the follower's filter-passing followed subaccounts. Null when the follower does
|
|
358
|
+
* not actively follow the subaccount or when the followed row is excluded by the active
|
|
359
|
+
* trading, privacy, or username-claim filters.
|
|
360
|
+
*/
|
|
361
|
+
filteredRank: number | null;
|
|
362
|
+
/**
|
|
363
|
+
* Full followed leaderboard row, including the filter-independent global `globalRank`. Null
|
|
364
|
+
* only when the follower has no active follow edge to the subaccount; a filter-excluded
|
|
365
|
+
* followed row keeps its full item with `filteredRank` null.
|
|
366
|
+
*/
|
|
367
|
+
item: NuanzeFollowedLeaderboardItem | null;
|
|
244
368
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
245
369
|
asOf: string;
|
|
246
370
|
}
|
|
@@ -706,5 +830,5 @@ interface GetNuanzeOpenPositionsResponse {
|
|
|
706
830
|
asOf: string;
|
|
707
831
|
}
|
|
708
832
|
//#endregion
|
|
709
|
-
export {
|
|
710
|
-
//# sourceMappingURL=clientTypes-
|
|
833
|
+
export { GetNuanzeOpenPositionsResponse as A, GetNuanzeWalletPnlResponse as B, GetNuanzeMarketTradesParams as C, GetNuanzeNewsParams as D, GetNuanzeMarketsResponse as E, GetNuanzeSubaccountLeaderboardPositionResponse as F, GetNuanzeWalletSummaryParams as G, GetNuanzeWalletPnlSeriesResponse as H, GetNuanzeSubaccountLeaderboardResponse as I, GetNuanzeWalletTradesResponse as J, GetNuanzeWalletSummaryResponse as K, GetNuanzeWalletLeaderboardPositionParams as L, GetNuanzePlatformSummaryResponse as M, GetNuanzeSubaccountLeaderboardParams as N, GetNuanzeNewsResponse as O, GetNuanzeSubaccountLeaderboardPositionParams as P, GetNuanzeWalletLeaderboardPositionResponse as R, GetNuanzeMarketPositionsResponse as S, GetNuanzeMarketsParams as T, GetNuanzeWalletPositionsParams as U, GetNuanzeWalletPnlSeriesParams as V, GetNuanzeWalletPositionsResponse as W, NuanzeMarketSelector as Y, GetNuanzeMarketCandlesParams as _, GetNuanzeCollateralFlowsParams as a, GetNuanzeMarketPositioningResponse as b, GetNuanzeFollowedLeaderboardPositionParams as c, GetNuanzeFundingRatesParams as d, GetNuanzeFundingRatesResponse as f, GetNuanzeMarketByTickerResponse as g, GetNuanzeMarketByTickerParams as h, GetNuanzeCollateralFlowSummaryResponse as i, GetNuanzePlatformSummaryParams as j, GetNuanzeOpenPositionsParams as k, GetNuanzeFollowedLeaderboardPositionResponse as l, GetNuanzeLeaderboardResponse as m, GetNuanzeCollateralFlowSeriesResponse as n, GetNuanzeCollateralFlowsResponse as o, GetNuanzeLeaderboardParams as p, GetNuanzeWalletTradesParams as q, GetNuanzeCollateralFlowSummaryParams as r, GetNuanzeFollowedLeaderboardParams as s, GetNuanzeCollateralFlowSeriesParams as t, GetNuanzeFollowedLeaderboardResponse as u, GetNuanzeMarketCandlesResponse as v, GetNuanzeMarketTradesResponse as w, GetNuanzeMarketPositionsParams as x, GetNuanzeMarketPositioningParams as y, GetNuanzeWalletPnl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KAMQ,8BAAA,GAAiC,oBAAA;2CAE3C,KAAA;EAEA,KAAA;;;;;EAKA,MAAA,GAAS,0BAAA;EAET,aAAA,GAAgB,iCAAA;EAEhB,MAAA;AAAA;;;;UAMe,gCAAA;;EAEf,SAAA;;EAEA,MAAA;;EAEA,MAAA;;EAEA,KAAA,EAAO,iBAAA;;EAEP,SAAA,EAAW,oBAAoB;;EAE/B,UAAA;;EAEA,aAAA;;EAEA,IAAA;AAAA;;;;;UAOe,4BAAA;;EAEf,KAAA;;EAEA,aAAA,GAAgB,+BAA+B;;EAE/C,cAAA;;EAEA,MAAA;AAAA;;;;UAMe,8BAAA;;EAEf,SAAA,EAAW,kBAAkB;;EAE7B,UAAA;;EAEA,aAAA;;EAEA,IAAA;AAAA"}
|
|
@@ -154,6 +154,29 @@ interface GetNuanzeLeaderboardResponse {
|
|
|
154
154
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
155
155
|
asOf: string;
|
|
156
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Params for `NuanzeClient.getWalletLeaderboardPosition`.
|
|
159
|
+
*/
|
|
160
|
+
interface GetNuanzeWalletLeaderboardPositionParams {
|
|
161
|
+
/** Explicit public EVM wallet address (`0x` plus 40 hex characters) to look up. */
|
|
162
|
+
address: string;
|
|
163
|
+
/** Ranking window, default `30d`. */
|
|
164
|
+
timeframe?: NuanzeLeaderboardTimeframe;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Response of `NuanzeClient.getWalletLeaderboardPosition`.
|
|
168
|
+
*/
|
|
169
|
+
interface GetNuanzeWalletLeaderboardPositionResponse {
|
|
170
|
+
/** Echoed timeframe. */
|
|
171
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
172
|
+
/**
|
|
173
|
+
* Global leaderboard row for the address, independent of collection pagination. Null only
|
|
174
|
+
* when the wallet leaderboard source row is absent.
|
|
175
|
+
*/
|
|
176
|
+
item: NuanzeLeaderboardItem | null;
|
|
177
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
178
|
+
asOf: string;
|
|
179
|
+
}
|
|
157
180
|
/**
|
|
158
181
|
* Params for `NuanzeClient.getSubaccountLeaderboard`.
|
|
159
182
|
*/
|
|
@@ -208,6 +231,44 @@ interface GetNuanzeSubaccountLeaderboardResponse {
|
|
|
208
231
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
209
232
|
asOf: string;
|
|
210
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Params for `NuanzeClient.getSubaccountLeaderboardPosition`.
|
|
236
|
+
*/
|
|
237
|
+
interface GetNuanzeSubaccountLeaderboardPositionParams {
|
|
238
|
+
/**
|
|
239
|
+
* Explicit public bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK
|
|
240
|
+
* `subaccountToHex` form) to look up.
|
|
241
|
+
*/
|
|
242
|
+
subaccountHex: string;
|
|
243
|
+
/** Ranking window, default `30d`. */
|
|
244
|
+
timeframe?: NuanzeLeaderboardTimeframe;
|
|
245
|
+
/** Include subaccounts with Private Mode enabled in the filtered-rank population, default false. */
|
|
246
|
+
includePrivate?: boolean;
|
|
247
|
+
/** Include subaccounts with no PnL in the requested window in the filtered-rank population, default false. */
|
|
248
|
+
includeUntraded?: boolean;
|
|
249
|
+
/** Include subaccounts without a claimed username in the filtered-rank population, default true. */
|
|
250
|
+
includeUnclaimed?: boolean;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Response of `NuanzeClient.getSubaccountLeaderboardPosition`.
|
|
254
|
+
*/
|
|
255
|
+
interface GetNuanzeSubaccountLeaderboardPositionResponse {
|
|
256
|
+
/** Echoed timeframe. */
|
|
257
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
258
|
+
/**
|
|
259
|
+
* Rank within the filter-defined population. Null when the source row is absent or when the
|
|
260
|
+
* existing row is excluded by the active privacy, trading, or username-claim filters.
|
|
261
|
+
*/
|
|
262
|
+
filteredRank: number | null;
|
|
263
|
+
/**
|
|
264
|
+
* Full subaccount leaderboard source row, including the filter-independent `globalRank`. Null
|
|
265
|
+
* only when no source row exists for the subaccount; an existing but filter-excluded row
|
|
266
|
+
* keeps its full item with `filteredRank` null.
|
|
267
|
+
*/
|
|
268
|
+
item: NuanzeSubaccountLeaderboardItem | null;
|
|
269
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
270
|
+
asOf: string;
|
|
271
|
+
}
|
|
211
272
|
/**
|
|
212
273
|
* Params for `NuanzeClient.getFollowedLeaderboard`. `timeframe` is required and applies to
|
|
213
274
|
* every per-subaccount figure.
|
|
@@ -230,6 +291,15 @@ interface GetNuanzeFollowedLeaderboardParams {
|
|
|
230
291
|
* filters and must be returned unchanged.
|
|
231
292
|
*/
|
|
232
293
|
cursor?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Optional bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK `subaccountToHex`
|
|
296
|
+
* form) selecting the viewer perspective within the follower's graph. It is an
|
|
297
|
+
* unauthenticated explicit-identifier claim: it selects whose row is returned in `viewer`
|
|
298
|
+
* and proves nothing about who is asking. The viewer lookup uses the same timeframe and
|
|
299
|
+
* active filters as the page but is independent of `limit` and `cursor` and never alters
|
|
300
|
+
* pagination.
|
|
301
|
+
*/
|
|
302
|
+
viewAs?: string;
|
|
233
303
|
}
|
|
234
304
|
/**
|
|
235
305
|
* Response of `NuanzeClient.getFollowedLeaderboard`.
|
|
@@ -241,6 +311,60 @@ interface GetNuanzeFollowedLeaderboardResponse {
|
|
|
241
311
|
items: NuanzeFollowedLeaderboardItem[];
|
|
242
312
|
/** Opaque cursor for the next page, or null when this is the final page. */
|
|
243
313
|
nextCursor: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Viewer for the `viewAs` subaccount, or null when `viewAs` was omitted or the follower has
|
|
316
|
+
* no active follow edge to that subaccount. An existing but filter-excluded followed row
|
|
317
|
+
* keeps its full `item` (including `globalRank`, which is filter-independent) with
|
|
318
|
+
* `filteredRank` null; an included row carries both ranks, with `filteredRank` counted among
|
|
319
|
+
* the follower's filter-passing followed subaccounts only.
|
|
320
|
+
*/
|
|
321
|
+
viewer: {
|
|
322
|
+
/** Rank among the follower's filter-passing followed subaccounts, or null when excluded. */filteredRank: number | null; /** Full followed leaderboard row. */
|
|
323
|
+
item: NuanzeFollowedLeaderboardItem | null;
|
|
324
|
+
} | null;
|
|
325
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
326
|
+
asOf: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Params for `NuanzeClient.getFollowedLeaderboardPosition`. `timeframe` is required, as on the
|
|
330
|
+
* followed collection.
|
|
331
|
+
*/
|
|
332
|
+
interface GetNuanzeFollowedLeaderboardPositionParams {
|
|
333
|
+
/** Lowercase or mixed-case bytes32 hex of the follower subaccount whose active graph is ranked. */
|
|
334
|
+
subaccountHex: string;
|
|
335
|
+
/**
|
|
336
|
+
* Bytes32 subaccount hex (`0x` plus 64 hex characters, the SDK `subaccountToHex` form) of the
|
|
337
|
+
* followed subaccount to position within the follower's leaderboard. Both identifiers are
|
|
338
|
+
* unauthenticated explicit-identifier claims and prove nothing about who is asking.
|
|
339
|
+
*/
|
|
340
|
+
viewAs: string;
|
|
341
|
+
/** Ranking window for every per-subaccount figure. */
|
|
342
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
343
|
+
/** Include followed subaccounts with no PnL in the requested window in the filtered-rank population, default true. */
|
|
344
|
+
includeUntraded?: boolean;
|
|
345
|
+
/** Include followed subaccounts with Private Mode enabled in the filtered-rank population, default false. */
|
|
346
|
+
includePrivate?: boolean;
|
|
347
|
+
/** Include followed subaccounts without a claimed username in the filtered-rank population, default true. */
|
|
348
|
+
includeUnclaimed?: boolean;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Response of `NuanzeClient.getFollowedLeaderboardPosition`.
|
|
352
|
+
*/
|
|
353
|
+
interface GetNuanzeFollowedLeaderboardPositionResponse {
|
|
354
|
+
/** Echoed timeframe. */
|
|
355
|
+
timeframe: NuanzeLeaderboardTimeframe;
|
|
356
|
+
/**
|
|
357
|
+
* Rank among the follower's filter-passing followed subaccounts. Null when the follower does
|
|
358
|
+
* not actively follow the subaccount or when the followed row is excluded by the active
|
|
359
|
+
* trading, privacy, or username-claim filters.
|
|
360
|
+
*/
|
|
361
|
+
filteredRank: number | null;
|
|
362
|
+
/**
|
|
363
|
+
* Full followed leaderboard row, including the filter-independent global `globalRank`. Null
|
|
364
|
+
* only when the follower has no active follow edge to the subaccount; a filter-excluded
|
|
365
|
+
* followed row keeps its full item with `filteredRank` null.
|
|
366
|
+
*/
|
|
367
|
+
item: NuanzeFollowedLeaderboardItem | null;
|
|
244
368
|
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
245
369
|
asOf: string;
|
|
246
370
|
}
|
|
@@ -706,5 +830,5 @@ interface GetNuanzeOpenPositionsResponse {
|
|
|
706
830
|
asOf: string;
|
|
707
831
|
}
|
|
708
832
|
//#endregion
|
|
709
|
-
export {
|
|
710
|
-
//# sourceMappingURL=clientTypes-
|
|
833
|
+
export { GetNuanzeOpenPositionsResponse as A, GetNuanzeWalletPnlResponse as B, GetNuanzeMarketTradesParams as C, GetNuanzeNewsParams as D, GetNuanzeMarketsResponse as E, GetNuanzeSubaccountLeaderboardPositionResponse as F, GetNuanzeWalletSummaryParams as G, GetNuanzeWalletPnlSeriesResponse as H, GetNuanzeSubaccountLeaderboardResponse as I, GetNuanzeWalletTradesResponse as J, GetNuanzeWalletSummaryResponse as K, GetNuanzeWalletLeaderboardPositionParams as L, GetNuanzePlatformSummaryResponse as M, GetNuanzeSubaccountLeaderboardParams as N, GetNuanzeNewsResponse as O, GetNuanzeSubaccountLeaderboardPositionParams as P, GetNuanzeWalletLeaderboardPositionResponse as R, GetNuanzeMarketPositionsResponse as S, GetNuanzeMarketsParams as T, GetNuanzeWalletPositionsParams as U, GetNuanzeWalletPnlSeriesParams as V, GetNuanzeWalletPositionsResponse as W, NuanzeMarketSelector as Y, GetNuanzeMarketCandlesParams as _, GetNuanzeCollateralFlowsParams as a, GetNuanzeMarketPositioningResponse as b, GetNuanzeFollowedLeaderboardPositionParams as c, GetNuanzeFundingRatesParams as d, GetNuanzeFundingRatesResponse as f, GetNuanzeMarketByTickerResponse as g, GetNuanzeMarketByTickerParams as h, GetNuanzeCollateralFlowSummaryResponse as i, GetNuanzePlatformSummaryParams as j, GetNuanzeOpenPositionsParams as k, GetNuanzeFollowedLeaderboardPositionResponse as l, GetNuanzeLeaderboardResponse as m, GetNuanzeCollateralFlowSeriesResponse as n, GetNuanzeCollateralFlowsResponse as o, GetNuanzeLeaderboardParams as p, GetNuanzeWalletTradesParams as q, GetNuanzeCollateralFlowSummaryParams as r, GetNuanzeFollowedLeaderboardParams as s, GetNuanzeCollateralFlowSeriesParams as t, GetNuanzeFollowedLeaderboardResponse as u, GetNuanzeMarketCandlesResponse as v, GetNuanzeMarketTradesResponse as w, GetNuanzeMarketPositionsParams as x, GetNuanzeMarketPositioningParams as y, GetNuanzeWalletPnlParams as z };
|
|
834
|
+
//# sourceMappingURL=clientTypes-Dm5-t7pz.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientTypes-Dm5-t7pz.d.ts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;AA8CA;UAAiB,sBAAA;;EAEf,KAAA,GAAQ,iBAAA;EAAR;EAEA,aAAA,GAAgB,yBAAyB;EAAzC;EAEA,MAAA;AAAA;;AAAM;AAMR;UAAiB,wBAAA;;;;;EAKf,OAAA,EAAS,YAAY;EAIrB;EAFA,KAAA;EAEI;EAAJ,IAAA;AAAA;;;;UAMe,mBAAA;EASf;EAPA,KAAA;EASY;;;;EAJZ,MAAA;EAUM;EARN,SAAA;EAce;EAZf,SAAA,GAAY,mBAAA;;EAEZ,SAAA,GAAY,mBAAmB;EAY/B;EAVA,YAAA;EAYA;EAVA,MAAA;AAAA;AAYI;AASN;;AATM,UANW,qBAAA;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NuanzeClient-
|
|
2
|
+
require("./NuanzeClient-Tl_Dke8Z.cjs");
|
|
3
3
|
let _nadohq_shared = require("@nadohq/shared");
|
|
4
4
|
//#region src/dataMappers.ts
|
|
5
5
|
function mapNuanzeDecimal(value) {
|
|
@@ -210,6 +210,17 @@ function mapNuanzeLeaderboardResponse(server) {
|
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
|
+
* Maps a server-side `GET /leaderboard/wallets/{address}` response. The item is null only when
|
|
214
|
+
* the wallet leaderboard source row is absent.
|
|
215
|
+
*/
|
|
216
|
+
function mapNuanzeWalletLeaderboardPositionResponse(server) {
|
|
217
|
+
return {
|
|
218
|
+
timeframe: server.timeframe,
|
|
219
|
+
item: server.item === null ? null : mapNuanzeLeaderboardItem(server.item),
|
|
220
|
+
asOf: server.asOf
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
213
224
|
* Maps a server-side followed-leaderboard row.
|
|
214
225
|
*/
|
|
215
226
|
function mapNuanzeFollowedLeaderboardItem(server) {
|
|
@@ -264,13 +275,46 @@ function mapNuanzeSubaccountLeaderboardResponse(server) {
|
|
|
264
275
|
};
|
|
265
276
|
}
|
|
266
277
|
/**
|
|
267
|
-
* Maps a server-side `GET /
|
|
278
|
+
* Maps a server-side `GET /leaderboard/subaccounts/{subaccountHex}` response. An absent source
|
|
279
|
+
* row maps to `filteredRank` null with `item` null; an existing but filter-excluded row keeps
|
|
280
|
+
* its full item (including `globalRank`) with `filteredRank` null.
|
|
281
|
+
*/
|
|
282
|
+
function mapNuanzeSubaccountLeaderboardPositionResponse(server) {
|
|
283
|
+
return {
|
|
284
|
+
timeframe: server.timeframe,
|
|
285
|
+
filteredRank: server.filteredRank,
|
|
286
|
+
item: server.item === null ? null : mapNuanzeSubaccountLeaderboardItem(server.item),
|
|
287
|
+
asOf: server.asOf
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Maps a server-side `GET /wallets/leaderboard` response, including the nullable `viewAs`
|
|
292
|
+
* viewer. A filter-excluded followed viewer keeps its full item with `filteredRank` null; a
|
|
293
|
+
* viewer the follower does not follow maps to null.
|
|
268
294
|
*/
|
|
269
295
|
function mapNuanzeFollowedLeaderboardResponse(server) {
|
|
270
296
|
return {
|
|
271
297
|
timeframe: server.timeframe,
|
|
272
298
|
items: server.items.map(mapNuanzeFollowedLeaderboardItem),
|
|
273
299
|
nextCursor: server.nextCursor,
|
|
300
|
+
viewer: server.viewer === null ? null : {
|
|
301
|
+
filteredRank: server.viewer.filteredRank,
|
|
302
|
+
item: server.viewer.item === null ? null : mapNuanzeFollowedLeaderboardItem(server.viewer.item)
|
|
303
|
+
},
|
|
304
|
+
asOf: server.asOf
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Maps a server-side `GET /wallets/leaderboard/followed/{viewAs}` response. A subaccount the
|
|
309
|
+
* follower does not follow maps to `filteredRank` null with `item` null; an existing but
|
|
310
|
+
* filter-excluded followed row keeps its full item (including `globalRank`) with `filteredRank`
|
|
311
|
+
* null.
|
|
312
|
+
*/
|
|
313
|
+
function mapNuanzeFollowedLeaderboardPositionResponse(server) {
|
|
314
|
+
return {
|
|
315
|
+
timeframe: server.timeframe,
|
|
316
|
+
filteredRank: server.filteredRank,
|
|
317
|
+
item: server.item === null ? null : mapNuanzeFollowedLeaderboardItem(server.item),
|
|
274
318
|
asOf: server.asOf
|
|
275
319
|
};
|
|
276
320
|
}
|
|
@@ -698,6 +742,7 @@ exports.mapNuanzeCollateralFlowSeriesResponse = mapNuanzeCollateralFlowSeriesRes
|
|
|
698
742
|
exports.mapNuanzeCollateralFlowSummaryResponse = mapNuanzeCollateralFlowSummaryResponse;
|
|
699
743
|
exports.mapNuanzeCollateralFlowsResponse = mapNuanzeCollateralFlowsResponse;
|
|
700
744
|
exports.mapNuanzeFollowedLeaderboardItem = mapNuanzeFollowedLeaderboardItem;
|
|
745
|
+
exports.mapNuanzeFollowedLeaderboardPositionResponse = mapNuanzeFollowedLeaderboardPositionResponse;
|
|
701
746
|
exports.mapNuanzeFollowedLeaderboardResponse = mapNuanzeFollowedLeaderboardResponse;
|
|
702
747
|
exports.mapNuanzeFundingObservation = mapNuanzeFundingObservation;
|
|
703
748
|
exports.mapNuanzeFundingRate = mapNuanzeFundingRate;
|
|
@@ -722,7 +767,9 @@ exports.mapNuanzePlatformSummaryResponse = mapNuanzePlatformSummaryResponse;
|
|
|
722
767
|
exports.mapNuanzeSeriesPoint = mapNuanzeSeriesPoint;
|
|
723
768
|
exports.mapNuanzeStockFundamentals = mapNuanzeStockFundamentals;
|
|
724
769
|
exports.mapNuanzeSubaccountLeaderboardItem = mapNuanzeSubaccountLeaderboardItem;
|
|
770
|
+
exports.mapNuanzeSubaccountLeaderboardPositionResponse = mapNuanzeSubaccountLeaderboardPositionResponse;
|
|
725
771
|
exports.mapNuanzeSubaccountLeaderboardResponse = mapNuanzeSubaccountLeaderboardResponse;
|
|
772
|
+
exports.mapNuanzeWalletLeaderboardPositionResponse = mapNuanzeWalletLeaderboardPositionResponse;
|
|
726
773
|
exports.mapNuanzeWalletPnlResponse = mapNuanzeWalletPnlResponse;
|
|
727
774
|
exports.mapNuanzeWalletPnlSeriesResponse = mapNuanzeWalletPnlSeriesResponse;
|
|
728
775
|
exports.mapNuanzeWalletPosition = mapNuanzeWalletPosition;
|