@nadohq/nuanze-client 0.43.1 → 0.44.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 +21 -0
- package/dist/{NuanzeClient-BrjXP2Sz.cjs → NuanzeClient-C707zWgg.cjs} +51 -43
- package/dist/NuanzeClient-C707zWgg.cjs.map +1 -0
- package/dist/NuanzeClient.cjs +1 -1
- package/dist/NuanzeClient.d.cts +41 -33
- package/dist/NuanzeClient.d.cts.map +1 -1
- package/dist/NuanzeClient.d.ts +41 -33
- package/dist/NuanzeClient.d.ts.map +1 -1
- package/dist/NuanzeClient.js +50 -42
- package/dist/NuanzeClient.js.map +1 -1
- package/dist/{NuanzeServerFailureError-DQp7Lca2.d.ts → NuanzeServerFailureError-BS6Gvwoy.d.ts} +2 -2
- package/dist/{NuanzeServerFailureError-DQp7Lca2.d.ts.map → NuanzeServerFailureError-BS6Gvwoy.d.ts.map} +1 -1
- package/dist/{NuanzeServerFailureError-DMdmlNpW.d.cts → NuanzeServerFailureError-Bn2iKpoY.d.cts} +2 -2
- package/dist/{NuanzeServerFailureError-DMdmlNpW.d.cts.map → NuanzeServerFailureError-Bn2iKpoY.d.cts.map} +1 -1
- package/dist/{clientTypes-DfQsJWmx.d.cts → clientTypes-BAfxfhmA.d.cts} +55 -72
- package/dist/clientTypes-BAfxfhmA.d.cts.map +1 -0
- package/dist/{clientTypes-BPlIXBRh.d.ts → clientTypes-vIgldUM_.d.ts} +55 -72
- package/dist/clientTypes-vIgldUM_.d.ts.map +1 -0
- package/dist/dataMappers.cjs +1 -1
- package/dist/dataMappers.d.cts +2 -2
- package/dist/dataMappers.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/{serverQueryTypes-D5-euf7o.d.ts → serverQueryTypes-D8xcBytZ.d.ts} +9 -5
- package/dist/serverQueryTypes-D8xcBytZ.d.ts.map +1 -0
- package/dist/{serverQueryTypes-d03JU0mr.d.cts → serverQueryTypes-wuju0Njg.d.cts} +9 -5
- package/dist/serverQueryTypes-wuju0Njg.d.cts.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 +1 -1
- package/dist/types/serverQueryTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/package.json +3 -3
- package/src/NuanzeClient.ts +68 -53
- package/src/types/clientTypes.ts +42 -36
- package/src/types/serverQueryTypes.ts +8 -4
- package/dist/NuanzeClient-BrjXP2Sz.cjs.map +0 -1
- package/dist/clientTypes-BPlIXBRh.d.ts.map +0 -1
- package/dist/clientTypes-DfQsJWmx.d.cts.map +0 -1
- package/dist/serverQueryTypes-D5-euf7o.d.ts.map +0 -1
- package/dist/serverQueryTypes-d03JU0mr.d.cts.map +0 -1
package/dist/NuanzeClient.js
CHANGED
|
@@ -44,17 +44,17 @@ var NuanzeClient = class {
|
|
|
44
44
|
return mapNuanzeMarketsResponse(await this.getJson("/markets", params));
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Resolves a market by
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
47
|
+
* Resolves a market by {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`;
|
|
48
|
+
* when both are given, `productId` is used for the path segment and `ticker` is ignored.
|
|
49
|
+
* Ticker lookup is case-insensitive and accepts canonical tickers or legacy source symbols.
|
|
50
|
+
* An explicit unavailable venue returns `MARKET_NOT_FOUND`. With no venue, `strictVenue=true`
|
|
51
|
+
* returns `AMBIGUOUS_MARKET` for multi-venue assets; otherwise the primary venue is used.
|
|
51
52
|
*
|
|
52
|
-
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET
|
|
53
|
-
*
|
|
53
|
+
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid
|
|
54
|
+
* selectors, and `MARKET_NOT_FOUND` when the selector does not resolve.
|
|
54
55
|
*/
|
|
55
56
|
async getMarketByTicker(params) {
|
|
56
|
-
|
|
57
|
-
return mapNuanzeMarketByTickerResponse(await this.getJson(`/markets/${encodeURIComponent(ticker)}`, query));
|
|
57
|
+
return mapNuanzeMarketByTickerResponse(await this.getMarketJson(params));
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Lists the latest funding observation per active perpetual market, refreshed about every five
|
|
@@ -130,30 +130,32 @@ var NuanzeClient = class {
|
|
|
130
130
|
return mapNuanzeWalletPositionsResponse(await this.getJson(`/wallets/${encodeURIComponent(address)}/positions`, query));
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
|
-
* Lists market trades: one taker-side row per match, sorted
|
|
134
|
-
*
|
|
135
|
-
* `
|
|
133
|
+
* Lists market trades for a {@link NuanzeMarketSelector}: one taker-side row per match, sorted
|
|
134
|
+
* by `matchedAt` then `id` descending. Supply at least `ticker` or `productId`; when both are
|
|
135
|
+
* given, `productId` is used for the path segment and `ticker` is ignored. The exclusive cursor
|
|
136
|
+
* is bound to operation and normalized filters. `from` is inclusive and `to` exclusive. Wallet
|
|
137
|
+
* identity is absent.
|
|
136
138
|
*
|
|
137
|
-
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `
|
|
138
|
-
* `
|
|
139
|
-
*
|
|
139
|
+
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,
|
|
140
|
+
* `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid input, and
|
|
141
|
+
* `MARKET_NOT_FOUND` when the selector does not resolve.
|
|
140
142
|
*/
|
|
141
143
|
async getMarketTrades(params) {
|
|
142
|
-
|
|
143
|
-
return mapNuanzeMarketTradesResponse(await this.getJson(`/markets/${encodeURIComponent(ticker)}/trades`, query));
|
|
144
|
+
return mapNuanzeMarketTradesResponse(await this.getMarketJson(params, "/trades"));
|
|
144
145
|
}
|
|
145
146
|
/**
|
|
146
|
-
* Lists market candles
|
|
147
|
-
*
|
|
148
|
-
*
|
|
147
|
+
* Lists market candles for a {@link NuanzeMarketSelector}. Supply at least `ticker` or
|
|
148
|
+
* `productId`; when both are given, `productId` is used for the path segment and `ticker` is
|
|
149
|
+
* ignored. Source storage is 1h; 4h and 1d are UTC-aligned rollups and missing bars are not
|
|
150
|
+
* interpolated. The newest `limit` matching bars are selected and returned oldest-to-newest,
|
|
151
|
+
* at most 750, with no pagination. A current bucket has `complete=false`.
|
|
149
152
|
*
|
|
150
153
|
* @throws {NuanzeServerFailureError} With `UNSUPPORTED_INTERVAL`, `RANGE_TOO_LARGE`,
|
|
151
|
-
* `AMBIGUOUS_MARKET`,
|
|
152
|
-
*
|
|
154
|
+
* `AMBIGUOUS_MARKET`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the
|
|
155
|
+
* selector does not resolve.
|
|
153
156
|
*/
|
|
154
157
|
async getMarketCandles(params) {
|
|
155
|
-
|
|
156
|
-
return mapNuanzeMarketCandlesResponse(await this.getJson(`/markets/${encodeURIComponent(ticker)}/candles`, query));
|
|
158
|
+
return mapNuanzeMarketCandlesResponse(await this.getMarketJson(params, "/candles"));
|
|
157
159
|
}
|
|
158
160
|
/**
|
|
159
161
|
* Lists wallet-owned maker and taker execution rows, sorted by `matchedAt` then `id` descending.
|
|
@@ -221,33 +223,33 @@ var NuanzeClient = class {
|
|
|
221
223
|
return mapNuanzeCollateralFlowSeriesResponse(await this.getJson("/flows/series", params));
|
|
222
224
|
}
|
|
223
225
|
/**
|
|
224
|
-
* Gets privacy-preserving aggregate positioning for an active perpetual
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
226
|
+
* Gets privacy-preserving aggregate positioning for an active perpetual identified by
|
|
227
|
+
* {@link NuanzeMarketSelector}. Supply at least `ticker` or `productId`; when both are given,
|
|
228
|
+
* `productId` is used for the path segment and `ticker` is ignored. Cross and isolated legs
|
|
229
|
+
* are summed within owner/subaccount/product before direction classification. Every cell
|
|
230
|
+
* requires at least 20 distinct contributing owners. No identity, individual position, entry
|
|
231
|
+
* price, PnL, margin, or leverage fields are returned.
|
|
228
232
|
*
|
|
229
|
-
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET
|
|
230
|
-
*
|
|
231
|
-
* perp.
|
|
233
|
+
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET` or `BAD_REQUEST` on invalid input,
|
|
234
|
+
* and `MARKET_NOT_FOUND` when the selector does not resolve to a perp.
|
|
232
235
|
*/
|
|
233
236
|
async getMarketPositioning(params) {
|
|
234
|
-
|
|
235
|
-
return mapNuanzeMarketPositioningResponse(await this.getJson(`/markets/${encodeURIComponent(ticker)}/positioning`, query));
|
|
237
|
+
return mapNuanzeMarketPositioningResponse(await this.getMarketJson(params, "/positioning"));
|
|
236
238
|
}
|
|
237
239
|
/**
|
|
238
|
-
* Lists open perpetual position legs for
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* are
|
|
240
|
+
* Lists open perpetual position legs for a market identified by {@link NuanzeMarketSelector}.
|
|
241
|
+
* Supply at least `ticker` or `productId`; when both are given, `productId` is used for the
|
|
242
|
+
* path segment and `ticker` is ignored. Results default to absolute notional descending and
|
|
243
|
+
* can be ordered by signed unrealized PnL or absolute base amount in either direction. Spot
|
|
244
|
+
* markets are not supported. Legs below $10 absolute notional are excluded. Wallet addresses,
|
|
245
|
+
* nullable synced usernames and display names, and signed exact base amounts are returned.
|
|
243
246
|
*
|
|
244
|
-
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `
|
|
245
|
-
* `
|
|
246
|
-
*
|
|
247
|
+
* @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `INVALID_CURSOR`,
|
|
248
|
+
* `CURSOR_FILTER_MISMATCH`, or `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the
|
|
249
|
+
* selector does not resolve to a perp.
|
|
247
250
|
*/
|
|
248
251
|
async getMarketPositions(params) {
|
|
249
|
-
|
|
250
|
-
return mapNuanzeMarketPositionsResponse(await this.getJson(`/markets/${encodeURIComponent(ticker)}/positions`, query));
|
|
252
|
+
return mapNuanzeMarketPositionsResponse(await this.getMarketJson(params, "/positions"));
|
|
251
253
|
}
|
|
252
254
|
/**
|
|
253
255
|
* Lists current open perpetual position legs across every market by signed unrealized PnL.
|
|
@@ -268,6 +270,12 @@ var NuanzeClient = class {
|
|
|
268
270
|
async getJson(path, params) {
|
|
269
271
|
return this.requestJson(path, { params });
|
|
270
272
|
}
|
|
273
|
+
async getMarketJson(params, suffix = "") {
|
|
274
|
+
const { productId, ticker, ...query } = params;
|
|
275
|
+
const selector = productId ?? ticker;
|
|
276
|
+
if (selector === void 0) throw new Error("A market ticker or productId is required.");
|
|
277
|
+
return this.getJson(`/markets/${encodeURIComponent(selector.toString())}${suffix}`, query);
|
|
278
|
+
}
|
|
271
279
|
async requestJson(path, config = {}) {
|
|
272
280
|
const response = await this.axiosInstance.request({
|
|
273
281
|
method: "GET",
|
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} 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 * The opaque cursor is exclusive and bound to normalized filters. Raw article ingestion, scoring,\n * queue, and newsdesk fields are 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 ticker. Lookup is case-insensitive and accepts canonical tickers or\n * legacy source symbols. An explicit unavailable venue returns `MARKET_NOT_FOUND`. With no\n * venue, `strictVenue=true` returns `AMBIGUOUS_MARKET` for multi-venue assets; otherwise the\n * primary venue is used.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `MARKET_SELECTOR_MISMATCH`, or\n * `BAD_REQUEST` on invalid selectors, and `MARKET_NOT_FOUND` when the ticker does not resolve.\n */\n async getMarketByTicker(\n params: GetNuanzeMarketByTickerParams,\n ): Promise<GetNuanzeMarketByTickerResponse> {\n const { ticker, ...query } = params;\n return mapNuanzeMarketByTickerResponse(\n await this.getJson<NuanzeServerMarketByTickerResponse>(\n `/markets/${encodeURIComponent(ticker)}`,\n query,\n ),\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.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\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.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor 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: one taker-side row per match, sorted by `matchedAt` then `id` descending.\n * The exclusive cursor is bound to operation and normalized filters. `from` is inclusive and\n * `to` exclusive. Wallet identity is absent.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `MARKET_SELECTOR_MISMATCH`,\n * `INVALID_CURSOR`, `CURSOR_FILTER_MISMATCH`, `RANGE_TOO_LARGE`, or `BAD_REQUEST` on invalid\n * input, and `MARKET_NOT_FOUND` when the ticker does not resolve.\n */\n async getMarketTrades(\n params: GetNuanzeMarketTradesParams,\n ): Promise<GetNuanzeMarketTradesResponse> {\n const { ticker, ...query } = params;\n return mapNuanzeMarketTradesResponse(\n await this.getJson<NuanzeServerMarketTradesResponse>(\n `/markets/${encodeURIComponent(ticker)}/trades`,\n query,\n ),\n );\n }\n\n /**\n * Lists market candles. Source storage is 1h; 4h and 1d are UTC-aligned rollups and missing bars\n * are not interpolated. The newest `limit` matching bars are selected and returned\n * oldest-to-newest, 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`, `MARKET_SELECTOR_MISMATCH`, or `BAD_REQUEST` on invalid input, and\n * `MARKET_NOT_FOUND` when the ticker does not resolve.\n */\n async getMarketCandles(\n params: GetNuanzeMarketCandlesParams,\n ): Promise<GetNuanzeMarketCandlesResponse> {\n const { ticker, ...query } = params;\n return mapNuanzeMarketCandlesResponse(\n await this.getJson<NuanzeServerMarketCandlesResponse>(\n `/markets/${encodeURIComponent(ticker)}/candles`,\n query,\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. Cross and isolated legs\n * are summed within owner/subaccount/product before direction classification. Every cell requires\n * at least 20 distinct contributing owners. No identity, individual position, entry price, PnL,\n * margin, or leverage fields are returned.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `MARKET_SELECTOR_MISMATCH`, or\n * `BAD_REQUEST` on invalid input, and `MARKET_NOT_FOUND` when the ticker does not resolve to a\n * perp.\n */\n async getMarketPositioning(\n params: GetNuanzeMarketPositioningParams,\n ): Promise<GetNuanzeMarketPositioningResponse> {\n const { ticker, ...query } = params;\n return mapNuanzeMarketPositioningResponse(\n await this.getJson<NuanzeServerMarketPositioningResponse>(\n `/markets/${encodeURIComponent(ticker)}/positioning`,\n query,\n ),\n );\n }\n\n /**\n * Lists open perpetual position legs for the resolved market. Results default to absolute\n * notional descending and can be ordered by signed unrealized PnL or absolute base amount in\n * either direction. Spot markets are not supported. Legs below $10 absolute notional are excluded.\n * Wallet addresses, nullable synced usernames and display names, and signed exact base amounts\n * are returned.\n *\n * @throws {NuanzeServerFailureError} With `AMBIGUOUS_MARKET`, `MARKET_SELECTOR_MISMATCH`,\n * `INVALID_CURSOR`, `CURSOR_FILTER_MISMATCH`, or `BAD_REQUEST` on invalid input, and\n * `MARKET_NOT_FOUND` when the ticker does not resolve to a perp.\n */\n async getMarketPositions(\n params: GetNuanzeMarketPositionsParams,\n ): Promise<GetNuanzeMarketPositionsResponse> {\n const { ticker, ...query } = params;\n return mapNuanzeMarketPositionsResponse(\n await this.getJson<NuanzeServerMarketPositionsResponse>(\n `/markets/${encodeURIComponent(ticker)}/positions`,\n query,\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 *\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 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":";;;;;;;;;;;;;;AAiHA,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;;;;;;;;;CAUA,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;;;;;;;;;;CAWA,MAAM,kBACJ,QAC0C;EAC1C,MAAM,EAAE,QAAQ,GAAG,UAAU;EAC7B,OAAO,gCACL,MAAM,KAAK,QACT,YAAY,mBAAmB,MAAM,KACrC,KACF,CACF;CACF;;;;;;;CAQA,MAAM,gBACJ,SAAsC,CAAC,GACC;EACxC,OAAO,8BACL,MAAM,KAAK,QACT,kBACA,MACF,CACF;CACF;;;;;;;CAQA,MAAM,eACJ,SAAqC,CAAC,G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;;;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 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 * The opaque cursor is exclusive and bound to normalized filters. Raw article ingestion, scoring,\n * queue, and newsdesk fields are 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.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST` if a filter value is invalid.\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.\n *\n * @throws {NuanzeServerFailureError} With `BAD_REQUEST`, `INVALID_CURSOR`, or\n * `CURSOR_FILTER_MISMATCH` when filters or the cursor 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 *\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 *\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;;;;;;;;;CAUA,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;;;;;;;CAQA,MAAM,eACJ,SAAqC,CAAC,GACC;EACvC,OAAO,6BACL,MAAM,KAAK,QACT,gBACA,MACF,CACF;CACF;;;;;;;;;;CAWA,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,MA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aA,MAAM,qBACJ,QAC6C;EAC7C,OAAO,mCACL,MAAM,KAAK,cACT,QACA,cACF,CACF;CACF;;;;;;;;;;;;;CAcA,MAAM,mBACJ,QAC2C;EAC3C,OAAO,iCACL,MAAM,KAAK,cACT,QACA,YACF,CACF;CACF;;;;;;;;;;;CAYA,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"}
|
package/dist/{NuanzeServerFailureError-DQp7Lca2.d.ts → NuanzeServerFailureError-BS6Gvwoy.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-D8xcBytZ.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-BS6Gvwoy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-BS6Gvwoy.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-DMdmlNpW.d.cts → NuanzeServerFailureError-Bn2iKpoY.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-wuju0Njg.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-Bn2iKpoY.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NuanzeServerFailureError-
|
|
1
|
+
{"version":3,"file":"NuanzeServerFailureError-Bn2iKpoY.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"}
|
|
@@ -54,23 +54,37 @@ interface GetNuanzeNewsResponse {
|
|
|
54
54
|
asOf: string;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Selects a market for scoped GET operations under `/markets/{ticker}`. The `{ticker}` path
|
|
58
|
+
* segment accepts a canonical ticker, legacy source symbol, or numeric product ID. At least one
|
|
59
|
+
* of `ticker` or `productId` is required. When both are supplied, `productId` is encoded as the
|
|
60
|
+
* path segment and `ticker` is ignored (neither field is sent as a query parameter).
|
|
58
61
|
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
62
|
+
type NuanzeMarketSelector = {
|
|
63
|
+
/**
|
|
64
|
+
* Canonical ticker or legacy source symbol. Case-insensitive. Used as the path segment when
|
|
65
|
+
* `productId` is omitted; ignored when `productId` is supplied.
|
|
66
|
+
*/
|
|
61
67
|
ticker: string;
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Public product ID. When supplied, used as the path segment and `ticker` is ignored.
|
|
70
|
+
*/
|
|
65
71
|
productId?: number;
|
|
72
|
+
} | {
|
|
73
|
+
ticker?: string; /** Public product ID used as the path segment. */
|
|
74
|
+
productId: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Params for `NuanzeClient.getMarketByTicker`. Requires {@link NuanzeMarketSelector}.
|
|
78
|
+
*/
|
|
79
|
+
type GetNuanzeMarketByTickerParams = NuanzeMarketSelector & {
|
|
80
|
+
/** Restrict to one venue. Omit to use the asset's primary venue. */venue?: NuanzeMarketVenue;
|
|
66
81
|
/**
|
|
67
82
|
* When true and `venue` is omitted, reject a multi-venue canonical ticker with
|
|
68
83
|
* `AMBIGUOUS_MARKET`. Default false.
|
|
69
84
|
*/
|
|
70
|
-
strictVenue?: boolean;
|
|
71
|
-
/** Max published stories to include, 1-30, default 12. */
|
|
85
|
+
strictVenue?: boolean; /** Max published stories to include, 1-30, default 12. */
|
|
72
86
|
newsLimit?: number;
|
|
73
|
-
}
|
|
87
|
+
};
|
|
74
88
|
/**
|
|
75
89
|
* Response of `NuanzeClient.getMarketByTicker`.
|
|
76
90
|
*/
|
|
@@ -297,29 +311,20 @@ interface GetNuanzeWalletPositionsResponse {
|
|
|
297
311
|
asOf: string;
|
|
298
312
|
}
|
|
299
313
|
/**
|
|
300
|
-
* Params for `NuanzeClient.getMarketTrades`.
|
|
314
|
+
* Params for `NuanzeClient.getMarketTrades`. Requires {@link NuanzeMarketSelector}.
|
|
301
315
|
*/
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
ticker: string;
|
|
305
|
-
/** Restrict to one venue. Omit to use the asset's primary venue. */
|
|
306
|
-
venue?: NuanzeMarketVenue;
|
|
307
|
-
/** Pin an exact product; must match ticker and venue. */
|
|
308
|
-
productId?: number;
|
|
316
|
+
type GetNuanzeMarketTradesParams = NuanzeMarketSelector & {
|
|
317
|
+
/** Restrict to one venue. Omit to use the asset's primary venue. */venue?: NuanzeMarketVenue;
|
|
309
318
|
/**
|
|
310
319
|
* When true and `venue` is omitted, reject a multi-venue canonical ticker with
|
|
311
320
|
* `AMBIGUOUS_MARKET`. Default false.
|
|
312
321
|
*/
|
|
313
|
-
strictVenue?: boolean;
|
|
314
|
-
/**
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
from?: string;
|
|
318
|
-
/** Exclusive end as a UTC ISO 8601 string. */
|
|
319
|
-
to?: string;
|
|
320
|
-
/** Opaque exclusive cursor bound to the normalized filters. */
|
|
322
|
+
strictVenue?: boolean; /** Page size, 1-200, default 50. */
|
|
323
|
+
limit?: number; /** Inclusive start as a UTC ISO 8601 string. */
|
|
324
|
+
from?: string; /** Exclusive end as a UTC ISO 8601 string. */
|
|
325
|
+
to?: string; /** Opaque exclusive cursor bound to the normalized filters. */
|
|
321
326
|
cursor?: string;
|
|
322
|
-
}
|
|
327
|
+
};
|
|
323
328
|
/**
|
|
324
329
|
* Response of `NuanzeClient.getMarketTrades`.
|
|
325
330
|
*/
|
|
@@ -340,29 +345,20 @@ interface GetNuanzeMarketTradesResponse {
|
|
|
340
345
|
asOf: string;
|
|
341
346
|
}
|
|
342
347
|
/**
|
|
343
|
-
* Params for `NuanzeClient.getMarketCandles`.
|
|
348
|
+
* Params for `NuanzeClient.getMarketCandles`. Requires {@link NuanzeMarketSelector}.
|
|
344
349
|
*/
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
ticker: string;
|
|
348
|
-
/** Restrict to one venue. Omit to use the asset's primary venue. */
|
|
349
|
-
venue?: NuanzeMarketVenue;
|
|
350
|
-
/** Pin an exact product; must match ticker and venue. */
|
|
351
|
-
productId?: number;
|
|
350
|
+
type GetNuanzeMarketCandlesParams = NuanzeMarketSelector & {
|
|
351
|
+
/** Restrict to one venue. Omit to use the asset's primary venue. */venue?: NuanzeMarketVenue;
|
|
352
352
|
/**
|
|
353
353
|
* When true and `venue` is omitted, reject a multi-venue canonical ticker with
|
|
354
354
|
* `AMBIGUOUS_MARKET`. Default false.
|
|
355
355
|
*/
|
|
356
|
-
strictVenue?: boolean;
|
|
357
|
-
/**
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
from?: string;
|
|
361
|
-
/** Exclusive end as a UTC ISO 8601 string. */
|
|
362
|
-
to?: string;
|
|
363
|
-
/** Newest matching bars to return, 1-750, default 200. Returned oldest-to-newest. */
|
|
356
|
+
strictVenue?: boolean; /** Bar interval, default `1h`. */
|
|
357
|
+
interval?: NuanzeCandleInterval; /** Inclusive start as a UTC ISO 8601 string. */
|
|
358
|
+
from?: string; /** Exclusive end as a UTC ISO 8601 string. */
|
|
359
|
+
to?: string; /** Newest matching bars to return, 1-750, default 200. Returned oldest-to-newest. */
|
|
364
360
|
limit?: number;
|
|
365
|
-
}
|
|
361
|
+
};
|
|
366
362
|
/**
|
|
367
363
|
* Response of `NuanzeClient.getMarketCandles`.
|
|
368
364
|
*/
|
|
@@ -587,51 +583,38 @@ interface GetNuanzeCollateralFlowSeriesResponse {
|
|
|
587
583
|
asOf: string;
|
|
588
584
|
}
|
|
589
585
|
/**
|
|
590
|
-
* Params for `NuanzeClient.getMarketPositioning`.
|
|
586
|
+
* Params for `NuanzeClient.getMarketPositioning`. Requires {@link NuanzeMarketSelector}. Resolves
|
|
587
|
+
* only an active perpetual.
|
|
591
588
|
*/
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
ticker: string;
|
|
595
|
-
/** If supplied, only `perp` is valid. */
|
|
596
|
-
venue?: 'perp';
|
|
597
|
-
/** Pin an exact product; must match ticker and venue. */
|
|
598
|
-
productId?: number;
|
|
589
|
+
type GetNuanzeMarketPositioningParams = NuanzeMarketSelector & {
|
|
590
|
+
/** If supplied, only `perp` is valid. */venue?: 'perp';
|
|
599
591
|
/**
|
|
600
592
|
* When true and `venue` is omitted, reject a multi-venue canonical ticker with
|
|
601
593
|
* `AMBIGUOUS_MARKET`. Default false.
|
|
602
594
|
*/
|
|
603
|
-
strictVenue?: boolean;
|
|
604
|
-
/**
|
|
605
|
-
groupBy?: NuanzePositioningGroupBy;
|
|
606
|
-
/** Inclusion threshold as a USD string, default `'10'`. */
|
|
595
|
+
strictVenue?: boolean; /** Cell grouping, default `side`. */
|
|
596
|
+
groupBy?: NuanzePositioningGroupBy; /** Inclusion threshold as a USD string, default `'10'`. */
|
|
607
597
|
minPositionUsd?: NuanzeMinPositionUsd;
|
|
608
|
-
}
|
|
598
|
+
};
|
|
609
599
|
/**
|
|
610
600
|
* Response of `NuanzeClient.getMarketPositioning`. Discriminated by `groupBy`.
|
|
611
601
|
*/
|
|
612
602
|
type GetNuanzeMarketPositioningResponse = NuanzeMarketPositioningSideResponse | NuanzeMarketPositioningCohortResponse | NuanzeMarketPositioningNotionalBucketResponse;
|
|
613
603
|
/**
|
|
614
|
-
* Params for `NuanzeClient.getMarketPositions`.
|
|
604
|
+
* Params for `NuanzeClient.getMarketPositions`. Requires {@link NuanzeMarketSelector}. Resolves
|
|
605
|
+
* only an active perpetual.
|
|
615
606
|
*/
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
ticker: string;
|
|
619
|
-
/** If supplied, only `perp` is valid. */
|
|
620
|
-
venue?: 'perp';
|
|
621
|
-
/** Pin an exact product; must match ticker and venue. */
|
|
622
|
-
productId?: number;
|
|
623
|
-
/** Page size, 1-200, default 50. */
|
|
607
|
+
type GetNuanzeMarketPositionsParams = NuanzeMarketSelector & {
|
|
608
|
+
/** If supplied, only `perp` is valid. */venue?: 'perp'; /** Page size, 1-200, default 50. */
|
|
624
609
|
limit?: number;
|
|
625
610
|
/**
|
|
626
611
|
* Primary ordering field, default `notional`. Notional and amount use absolute values; PnL remains
|
|
627
612
|
* signed.
|
|
628
613
|
*/
|
|
629
|
-
sortBy?: NuanzeMarketPositionSortBy;
|
|
630
|
-
/**
|
|
631
|
-
sortDirection?: NuanzeMarketPositionSortDirection;
|
|
632
|
-
/** Opaque exclusive cursor bound to the resolved product. */
|
|
614
|
+
sortBy?: NuanzeMarketPositionSortBy; /** Primary ordering direction, default `desc`. */
|
|
615
|
+
sortDirection?: NuanzeMarketPositionSortDirection; /** Opaque exclusive cursor bound to the resolved product. */
|
|
633
616
|
cursor?: string;
|
|
634
|
-
}
|
|
617
|
+
};
|
|
635
618
|
/**
|
|
636
619
|
* Response of `NuanzeClient.getMarketPositions`.
|
|
637
620
|
*/
|
|
@@ -681,5 +664,5 @@ interface GetNuanzeOpenPositionsResponse {
|
|
|
681
664
|
asOf: string;
|
|
682
665
|
}
|
|
683
666
|
//#endregion
|
|
684
|
-
export { GetNuanzePlatformSummaryResponse as A, GetNuanzeWalletSummaryResponse as B, GetNuanzeMarketsParams as C, GetNuanzeOpenPositionsParams as D, GetNuanzeNewsResponse as E, GetNuanzeWalletPnlSeriesParams as F, GetNuanzeWalletTradesResponse as H, GetNuanzeWalletPnlSeriesResponse as I, GetNuanzeWalletPositionsParams as L, GetNuanzeSubaccountLeaderboardResponse as M, GetNuanzeWalletPnlParams as N, GetNuanzeOpenPositionsResponse as O, GetNuanzeWalletPnlResponse as P, GetNuanzeWalletPositionsResponse as R, GetNuanzeMarketTradesResponse as S, GetNuanzeNewsParams as T, GetNuanzeWalletTradesParams as V, GetNuanzeMarketPositioningParams as _, GetNuanzeCollateralFlowsParams as a, GetNuanzeMarketPositionsResponse as b, GetNuanzeFollowedLeaderboardResponse as c, GetNuanzeLeaderboardParams as d, GetNuanzeLeaderboardResponse as f, GetNuanzeMarketCandlesResponse as g, GetNuanzeMarketCandlesParams as h, GetNuanzeCollateralFlowSummaryResponse as i, GetNuanzeSubaccountLeaderboardParams as j, GetNuanzePlatformSummaryParams as k, GetNuanzeFundingRatesParams as l, GetNuanzeMarketByTickerResponse as m, GetNuanzeCollateralFlowSeriesResponse as n, GetNuanzeCollateralFlowsResponse as o, GetNuanzeMarketByTickerParams as p, GetNuanzeCollateralFlowSummaryParams as r, GetNuanzeFollowedLeaderboardParams as s, GetNuanzeCollateralFlowSeriesParams as t, GetNuanzeFundingRatesResponse as u, GetNuanzeMarketPositioningResponse as v, GetNuanzeMarketsResponse as w, GetNuanzeMarketTradesParams as x, GetNuanzeMarketPositionsParams as y, GetNuanzeWalletSummaryParams as z };
|
|
685
|
-
//# sourceMappingURL=clientTypes-
|
|
667
|
+
export { GetNuanzePlatformSummaryResponse as A, GetNuanzeWalletSummaryResponse as B, GetNuanzeMarketsParams as C, GetNuanzeOpenPositionsParams as D, GetNuanzeNewsResponse as E, GetNuanzeWalletPnlSeriesParams as F, GetNuanzeWalletTradesResponse as H, GetNuanzeWalletPnlSeriesResponse as I, GetNuanzeWalletPositionsParams as L, GetNuanzeSubaccountLeaderboardResponse as M, GetNuanzeWalletPnlParams as N, GetNuanzeOpenPositionsResponse as O, GetNuanzeWalletPnlResponse as P, GetNuanzeWalletPositionsResponse as R, GetNuanzeMarketTradesResponse as S, GetNuanzeNewsParams as T, NuanzeMarketSelector as U, GetNuanzeWalletTradesParams as V, GetNuanzeMarketPositioningParams as _, GetNuanzeCollateralFlowsParams as a, GetNuanzeMarketPositionsResponse as b, GetNuanzeFollowedLeaderboardResponse as c, GetNuanzeLeaderboardParams as d, GetNuanzeLeaderboardResponse as f, GetNuanzeMarketCandlesResponse as g, GetNuanzeMarketCandlesParams as h, GetNuanzeCollateralFlowSummaryResponse as i, GetNuanzeSubaccountLeaderboardParams as j, GetNuanzePlatformSummaryParams as k, GetNuanzeFundingRatesParams as l, GetNuanzeMarketByTickerResponse as m, GetNuanzeCollateralFlowSeriesResponse as n, GetNuanzeCollateralFlowsResponse as o, GetNuanzeMarketByTickerParams as p, GetNuanzeCollateralFlowSummaryParams as r, GetNuanzeFollowedLeaderboardParams as s, GetNuanzeCollateralFlowSeriesParams as t, GetNuanzeFundingRatesResponse as u, GetNuanzeMarketPositioningResponse as v, GetNuanzeMarketsResponse as w, GetNuanzeMarketTradesParams as x, GetNuanzeMarketPositionsParams as y, GetNuanzeWalletSummaryParams as z };
|
|
668
|
+
//# sourceMappingURL=clientTypes-BAfxfhmA.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientTypes-BAfxfhmA.d.cts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"m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