@nadohq/indexer-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.
Files changed (71) hide show
  1. package/dist/{IndexerBaseClient-CSn4twzz.cjs → IndexerBaseClient-DG3Tf9Cv.cjs} +26 -1
  2. package/dist/IndexerBaseClient-DG3Tf9Cv.cjs.map +1 -0
  3. package/dist/IndexerBaseClient.cjs +1 -1
  4. package/dist/IndexerBaseClient.d.cts +21 -2
  5. package/dist/IndexerBaseClient.d.cts.map +1 -1
  6. package/dist/IndexerBaseClient.d.ts +21 -2
  7. package/dist/IndexerBaseClient.d.ts.map +1 -1
  8. package/dist/IndexerBaseClient.js +26 -1
  9. package/dist/IndexerBaseClient.js.map +1 -1
  10. package/dist/IndexerClient.cjs +1 -1
  11. package/dist/IndexerClient.d.cts +1 -1
  12. package/dist/IndexerClient.d.ts +1 -1
  13. package/dist/{IndexerServerFailureError-D-KNqVt3.d.cts → IndexerServerFailureError-Bk16b7Th.d.cts} +2 -2
  14. package/dist/{IndexerServerFailureError-D-KNqVt3.d.cts.map → IndexerServerFailureError-Bk16b7Th.d.cts.map} +1 -1
  15. package/dist/{IndexerServerFailureError-BoGd4gih.d.ts → IndexerServerFailureError-BroKB4zm.d.ts} +2 -2
  16. package/dist/{IndexerServerFailureError-BoGd4gih.d.ts.map → IndexerServerFailureError-BroKB4zm.d.ts.map} +1 -1
  17. package/dist/{clientTypes-DS2w6Osq.d.cts → clientTypes-DaHLUQvU.d.cts} +41 -3
  18. package/dist/clientTypes-DaHLUQvU.d.cts.map +1 -0
  19. package/dist/{clientTypes-CnswaLwH.d.ts → clientTypes-DgXbxuRD.d.ts} +41 -3
  20. package/dist/clientTypes-DgXbxuRD.d.ts.map +1 -0
  21. package/dist/dataMappers.cjs +17 -1
  22. package/dist/dataMappers.cjs.map +1 -1
  23. package/dist/dataMappers.d.cts +4 -3
  24. package/dist/dataMappers.d.cts.map +1 -1
  25. package/dist/dataMappers.d.ts +4 -3
  26. package/dist/dataMappers.d.ts.map +1 -1
  27. package/dist/dataMappers.js +16 -1
  28. package/dist/dataMappers.js.map +1 -1
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.d.cts +6 -6
  31. package/dist/index.d.ts +6 -6
  32. package/dist/{indexerBalanceValue-yMyf537D.d.cts → indexerBalanceValue-D9mAeuLq.d.cts} +2 -2
  33. package/dist/{indexerBalanceValue-yMyf537D.d.cts.map → indexerBalanceValue-D9mAeuLq.d.cts.map} +1 -1
  34. package/dist/{indexerBalanceValue-DV3dtvyV.d.ts → indexerBalanceValue-nkhpF6M1.d.ts} +2 -2
  35. package/dist/{indexerBalanceValue-DV3dtvyV.d.ts.map → indexerBalanceValue-nkhpF6M1.d.ts.map} +1 -1
  36. package/dist/{paginatedEventsTypes-BT--OHd5.d.ts → paginatedEventsTypes-BX6kXeBg.d.ts} +2 -2
  37. package/dist/{paginatedEventsTypes-BT--OHd5.d.ts.map → paginatedEventsTypes-BX6kXeBg.d.ts.map} +1 -1
  38. package/dist/{paginatedEventsTypes-DZllHmqY.d.cts → paginatedEventsTypes-BjMDecWY.d.cts} +2 -2
  39. package/dist/{paginatedEventsTypes-DZllHmqY.d.cts.map → paginatedEventsTypes-BjMDecWY.d.cts.map} +1 -1
  40. package/dist/{serverTypes-CyqBF-nt.d.cts → serverTypes-Beex1AeJ.d.cts} +20 -2
  41. package/dist/serverTypes-Beex1AeJ.d.cts.map +1 -0
  42. package/dist/{serverTypes-Dod9cCEW.d.ts → serverTypes-CJvQ3yQx.d.ts} +20 -2
  43. package/dist/serverTypes-CJvQ3yQx.d.ts.map +1 -0
  44. package/dist/types/IndexerServerFailureError.cjs +1 -1
  45. package/dist/types/IndexerServerFailureError.d.cts +1 -1
  46. package/dist/types/IndexerServerFailureError.d.ts +1 -1
  47. package/dist/types/clientTypes.d.cts +2 -2
  48. package/dist/types/clientTypes.d.ts +2 -2
  49. package/dist/types/index.d.cts +5 -5
  50. package/dist/types/index.d.ts +5 -5
  51. package/dist/types/indexerErrorCodes.cjs +1 -1
  52. package/dist/types/paginatedEventsTypes.d.cts +1 -1
  53. package/dist/types/paginatedEventsTypes.d.ts +1 -1
  54. package/dist/types/serverTypes.cjs.map +1 -1
  55. package/dist/types/serverTypes.d.cts +2 -2
  56. package/dist/types/serverTypes.d.ts +2 -2
  57. package/dist/types/serverTypes.js.map +1 -1
  58. package/dist/utils/index.d.cts +1 -1
  59. package/dist/utils/index.d.ts +1 -1
  60. package/dist/utils/indexerBalanceValue.d.cts +1 -1
  61. package/dist/utils/indexerBalanceValue.d.ts +1 -1
  62. package/package.json +4 -4
  63. package/src/IndexerBaseClient.ts +33 -0
  64. package/src/dataMappers.ts +25 -0
  65. package/src/types/clientTypes.ts +45 -0
  66. package/src/types/serverTypes.ts +25 -0
  67. package/dist/IndexerBaseClient-CSn4twzz.cjs.map +0 -1
  68. package/dist/clientTypes-CnswaLwH.d.ts.map +0 -1
  69. package/dist/clientTypes-DS2w6Osq.d.cts.map +0 -1
  70. package/dist/serverTypes-CyqBF-nt.d.cts.map +0 -1
  71. package/dist/serverTypes-Dod9cCEW.d.ts.map +0 -1
@@ -154,6 +154,31 @@ var IndexerBaseClient = class {
154
154
  return require_dataMappers.mapIndexerPortfolio(await this.query("portfolio", { subaccount: (0, _nadohq_shared.subaccountToHex)(params.subaccount) }));
155
155
  }
156
156
  /**
157
+ * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and
158
+ * markets traded between `startTime` and `endTime` (inclusive), split into
159
+ * `spot` and `perp` scopes. The value aggregates the cross-margin account plus
160
+ * every isolated child; the queried subaccount must be cross-margin.
161
+ *
162
+ * Use this for calendar/heat-map style views of daily performance. For
163
+ * continuous time series, use `getPortfolio` instead.
164
+ *
165
+ * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range
166
+ * is capped at 500 days. Days before the subaccount's first recorded activity
167
+ * return zeroed entries; days after the latest available data are omitted, so
168
+ * a range ending in the future stops at today. The current (partial) day is
169
+ * measured up to the latest available snapshot, which can be up to ~20
170
+ * minutes stale.
171
+ *
172
+ * @param params
173
+ */
174
+ async getPortfolioCalendar(params) {
175
+ return require_dataMappers.mapIndexerPortfolioCalendar(await this.query("portfolio_calendar", {
176
+ subaccount: (0, _nadohq_shared.subaccountToHex)(params.subaccount),
177
+ start_time: params.startTime,
178
+ end_time: params.endTime
179
+ }));
180
+ }
181
+ /**
157
182
  * Retrieves latest mark/index price for a perp product
158
183
  * @param params
159
184
  */
@@ -789,4 +814,4 @@ Object.defineProperty(exports, "__toESM", {
789
814
  }
790
815
  });
791
816
 
792
- //# sourceMappingURL=IndexerBaseClient-CSn4twzz.cjs.map
817
+ //# sourceMappingURL=IndexerBaseClient-DG3Tf9Cv.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexerBaseClient-DG3Tf9Cv.cjs","names":["mapIndexerEvent","mapIndexerFundingRate","mapIndexerFundingRateHistory","mapIndexerPortfolio","mapIndexerPortfolioCalendar","mapIndexerPerpPrices","mapIndexerCandlesticks","mapIndexerServerProduct","mapIndexerEventWithTx","mapIndexerOrder","mapIndexerMatchEventBalances","mapIndexerPosition","mapIndexerProductPayment","mapSnapshotsIntervalToServerParams","mapIndexerMarketSnapshot","mapIndexerMakerStatistics","mapIndexerLeaderboardPosition","mapIndexerLeaderboardRegistration","mapIndexerLeaderboardContest","getValidatedHex","mapIndexerNlpSnapshot","mapIndexerV2Ticker","mapIndexerV2Symbols","WalletNotProvidedError","isIndexerServerFailureResponse","IndexerServerFailureError"],"sources":["../src/IndexerBaseClient.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationParams,\n EIP712LeaderboardAuthenticationValues,\n EIP712SocialAuthenticationParams,\n getDefaultRecvTime,\n getNadoClientTypeHeaders,\n getNadoEIP712Values,\n getSignedTransactionRequest,\n getValidatedAddress,\n getValidatedHex,\n mapValues,\n nowInSeconds,\n removeDecimals,\n SignableRequestType,\n SignableRequestTypeToParams,\n SignedTx,\n subaccountFromHex,\n subaccountToHex,\n toBigInt,\n toBigNumber,\n toIntegerString,\n WalletClientWithAccount,\n WalletNotProvidedError,\n} from '@nadohq/shared';\nimport axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapIndexerCandlesticks,\n mapIndexerEvent,\n mapIndexerEventWithTx,\n mapIndexerFundingRate,\n mapIndexerFundingRateHistory,\n mapIndexerLeaderboardContest,\n mapIndexerLeaderboardPosition,\n mapIndexerLeaderboardRegistration,\n mapIndexerMakerStatistics,\n mapIndexerMarketSnapshot,\n mapIndexerMatchEventBalances,\n mapIndexerNlpSnapshot,\n mapIndexerOrder,\n mapIndexerPerpPrices,\n mapIndexerPortfolio,\n mapIndexerPortfolioCalendar,\n mapIndexerPosition,\n mapIndexerProductPayment,\n mapIndexerServerProduct,\n mapIndexerV2Symbols,\n mapIndexerV2Ticker,\n mapSnapshotsIntervalToServerParams,\n} from './dataMappers';\nimport {\n ConnectSocialAccountParams,\n ConnectSocialAccountResponse,\n GetIndexerBacklogResponse,\n GetIndexerCandlesticksParams,\n GetIndexerCandlesticksResponse,\n GetIndexerCashIncentivesParams,\n GetIndexerCashIncentivesResponse,\n GetIndexerEdgeCandlesticksParams,\n GetIndexerEdgeCandlesticksResponse,\n GetIndexerEdgeMarketSnapshotResponse,\n GetIndexerEdgeMarketSnapshotsParams,\n GetIndexerEventsParams,\n GetIndexerEventsResponse,\n GetIndexerFastWithdrawalSignatureParams,\n GetIndexerFastWithdrawalSignatureResponse,\n GetIndexerFundingRateHistoryParams,\n GetIndexerFundingRateHistoryResponse,\n GetIndexerFundingRateParams,\n GetIndexerFundingRateResponse,\n GetIndexerInterestFundingPaymentsParams,\n GetIndexerInterestFundingPaymentsResponse,\n GetIndexerLeaderboardContestsParams,\n GetIndexerLeaderboardContestsResponse,\n GetIndexerLeaderboardParams,\n GetIndexerLeaderboardParticipantParams,\n GetIndexerLeaderboardParticipantResponse,\n GetIndexerLeaderboardRegistrationsParams,\n GetIndexerLeaderboardRegistrationsResponse,\n GetIndexerLeaderboardResponse,\n GetIndexerLinkedSignerParams,\n GetIndexerLinkedSignerResponse,\n GetIndexerMakerStatisticsParams,\n GetIndexerMakerStatisticsResponse,\n GetIndexerMarketSnapshotsParams,\n GetIndexerMarketSnapshotsResponse,\n GetIndexerMatchEventsParams,\n GetIndexerMatchEventsResponse,\n GetIndexerMultiProductFundingRatesParams,\n GetIndexerMultiProductFundingRatesResponse,\n GetIndexerMultiProductPerpPricesParams,\n GetIndexerMultiProductPerpPricesResponse,\n GetIndexerMultiProductSnapshotsParams,\n GetIndexerMultiProductSnapshotsResponse,\n GetIndexerMultiSubaccountSnapshotsParams,\n GetIndexerMultiSubaccountSnapshotsResponse,\n GetIndexerNlpSnapshotsParams,\n GetIndexerNlpSnapshotsResponse,\n GetIndexerOraclePricesParams,\n GetIndexerOraclePricesResponse,\n GetIndexerOrdersParams,\n GetIndexerOrdersResponse,\n GetIndexerPerpPricesParams,\n GetIndexerPerpPricesResponse,\n GetIndexerPointsParams,\n GetIndexerPointsResponse,\n GetIndexerPortfolioCalendarParams,\n GetIndexerPortfolioCalendarResponse,\n GetIndexerPortfolioParams,\n GetIndexerPortfolioResponse,\n GetIndexerPositionsParams,\n GetIndexerPositionsResponse,\n GetIndexerPrivateAlphaChoiceParams,\n GetIndexerPrivateAlphaChoiceResponse,\n GetIndexerProductSnapshotsParams,\n GetIndexerProductSnapshotsResponse,\n GetIndexerQuotePriceResponse,\n GetIndexerReferralCodeParams,\n GetIndexerReferralCodeResponse,\n GetIndexerSubaccountDDAParams,\n GetIndexerSubaccountDDAResponse,\n GetIndexerV2SymbolsParams,\n GetIndexerV2SymbolsResponse,\n GetIndexerV2TickersParams,\n GetIndexerV2TickersResponse,\n GetIndexerXPointsParams,\n GetIndexerXPointsResponse,\n IndexerEventWithTx,\n IndexerMatchEvent,\n IndexerOraclePrice,\n IndexerServerEventsParams,\n IndexerServerFailureError,\n IndexerServerQueryRequestByType,\n IndexerServerQueryRequestType,\n IndexerServerQueryResponseByType,\n IndexerServerV2SymbolsResponse,\n IndexerServerV2TickersResponse,\n IndexerSnapshotBalance,\n IndexerSubaccountSnapshot,\n isIndexerServerFailureResponse,\n ListIndexerSocialAccountsParams,\n ListIndexerSocialAccountsResponse,\n ListIndexerSubaccountsParams,\n ListIndexerSubaccountsResponse,\n RegisterLeaderboardParams,\n RegisterLeaderboardResponse,\n RevokeSocialAccountParams,\n RevokeSocialAccountResponse,\n} from './types';\n\nexport interface IndexerClientOpts {\n // Server base URL, without a version segment (ex. `https://api.prod.nado.xyz/archive`)\n url: string;\n // Rewards service base URL, including the version segment (ex. `https://api.prod.nado.xyz/rewards/v1`).\n // Defaults to `${url}/rewards/v1`.\n rewardsUrl?: string;\n // Wallet Client for EIP712 signing\n walletClient?: WalletClientWithAccount;\n // Linked signer registered through the engine, if provided, execute requests will use this signer\n linkedSignerWalletClient?: WalletClientWithAccount;\n // If provided, identifies the calling client, sent as a header with every request\n clientType?: string;\n}\n\ntype IndexerQueryRequestBody = Partial<IndexerServerQueryRequestByType>;\n\n/**\n * Base client for all indexer requests\n */\nexport class IndexerBaseClient {\n readonly opts: IndexerClientOpts;\n readonly v1Url: string;\n readonly v2Url: string;\n readonly rewardsUrl: string;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: IndexerClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n withCredentials: true,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n headers: getNadoClientTypeHeaders(opts.clientType),\n });\n this.v1Url = `${opts.url}/v1`;\n this.v2Url = `${opts.url}/v2`;\n this.rewardsUrl = opts.rewardsUrl ?? `${opts.url}/rewards/v1`;\n }\n\n /**\n * Sets the linked signer for execute requests\n *\n * @param linkedSignerWalletClient The linkedSigner to use for all signatures. Set to null to revert to the chain signer\n */\n public setLinkedSigner(\n linkedSignerWalletClient: WalletClientWithAccount | null,\n ) {\n this.opts.linkedSignerWalletClient = linkedSignerWalletClient ?? undefined;\n }\n\n /**\n * List all subaccounts\n *\n * @param params\n */\n async listSubaccounts(\n params: ListIndexerSubaccountsParams,\n ): Promise<ListIndexerSubaccountsResponse> {\n const baseResponse = await this.query('subaccounts', params);\n\n return baseResponse.subaccounts.map((item) => {\n const subaccount = subaccountFromHex(item.subaccount);\n return {\n hexId: item.subaccount,\n createdAt: Number(item.created_at),\n isolated: item.isolated,\n ...subaccount,\n };\n });\n }\n\n /**\n * Retrieve snapshots of multiple subaccounts at multiple points in time.\n * Each snapshot is a view of the subaccount's balances at this point in time, with tracked variables for interest, funding, etc.\n *\n * @param params\n */\n async getMultiSubaccountSnapshots(\n params: GetIndexerMultiSubaccountSnapshotsParams,\n ): Promise<GetIndexerMultiSubaccountSnapshotsResponse> {\n const subaccountHexIds = params.subaccounts.map(\n ({ subaccountOwner, subaccountName }) =>\n subaccountToHex({\n subaccountOwner,\n subaccountName,\n }),\n );\n\n const baseResponse = await this.query('account_snapshots', {\n subaccounts: subaccountHexIds,\n timestamps: params.timestamps,\n isolated: params.isolated,\n });\n\n const snapshotsBySubaccount = mapValues(\n baseResponse.snapshots,\n (balanceSnapshots) => {\n const snapshotByTimestamp: Record<string, IndexerSubaccountSnapshot> =\n {};\n\n Object.entries(balanceSnapshots).forEach(([timestamp, events]) => {\n const balances: IndexerSnapshotBalance[] =\n events.map(mapIndexerEvent);\n\n snapshotByTimestamp[timestamp] = {\n timestamp: toBigNumber(timestamp),\n balances,\n };\n });\n\n return snapshotByTimestamp;\n },\n );\n\n return {\n subaccountHexIds,\n snapshots: snapshotsBySubaccount,\n };\n }\n\n /**\n * Retrieves referral code for an address\n *\n * @param params\n */\n async getReferralCode(\n params: GetIndexerReferralCodeParams,\n ): Promise<GetIndexerReferralCodeResponse> {\n const baseResponse = await this.query('referral_code', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccount.subaccountOwner,\n subaccountName: params.subaccount.subaccountName,\n }),\n });\n\n return {\n referralCode: baseResponse.referral_code,\n };\n }\n\n /**\n * Retrieves funding rate for a product, where 1 = 100%\n * @param params\n */\n async getFundingRate(\n params: GetIndexerFundingRateParams,\n ): Promise<GetIndexerFundingRateResponse> {\n const baseResponse = await this.query('funding_rate', {\n product_id: params.productId,\n });\n\n return mapIndexerFundingRate(baseResponse);\n }\n\n /**\n * Retrieves funding rate for multiple products, where 1 = 100%\n * @param params\n */\n async getMultiProductFundingRates(\n params: GetIndexerMultiProductFundingRatesParams,\n ): Promise<GetIndexerMultiProductFundingRatesResponse> {\n const baseResponse = await this.query('funding_rates', {\n product_ids: params.productIds,\n });\n\n return mapValues(baseResponse, mapIndexerFundingRate);\n }\n\n /**\n * Retrieves a perp product's historical (realized hourly) funding rates,\n * ordered ascending by timestamp, where 1 = 100%.\n *\n * To paginate forward, pass the last entry's `timestamp + 1` as the next\n * request's `startTimeInclusive`.\n *\n * @param params\n */\n async getFundingRateHistory(\n params: GetIndexerFundingRateHistoryParams,\n ): Promise<GetIndexerFundingRateHistoryResponse> {\n const baseResponse = await this.query('funding_rate_history', {\n product_id: params.productId,\n start_time: params.startTimeInclusive,\n end_time: params.endTimeInclusive,\n limit: params.limit,\n });\n\n return baseResponse.funding_rates.map(mapIndexerFundingRateHistory);\n }\n\n /**\n * Retrieves a subaccount's account-value, PnL, traded-volume, average-trade-size,\n * and markets-traded history across all timeframes, keyed by period. The value\n * aggregates the cross-margin account plus every isolated child; the queried\n * subaccount must be cross-margin.\n *\n * Points are downsampled per timeframe, so the most recent point can be up to\n * ~20 minutes stale. For the exact live value, use the engine client's\n * `getSubaccountSummary` query instead.\n *\n * @param params\n */\n async getPortfolio(\n params: GetIndexerPortfolioParams,\n ): Promise<GetIndexerPortfolioResponse> {\n const baseResponse = await this.query('portfolio', {\n subaccount: subaccountToHex(params.subaccount),\n });\n\n return mapIndexerPortfolio(baseResponse);\n }\n\n /**\n * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and\n * markets traded between `startTime` and `endTime` (inclusive), split into\n * `spot` and `perp` scopes. The value aggregates the cross-margin account plus\n * every isolated child; the queried subaccount must be cross-margin.\n *\n * Use this for calendar/heat-map style views of daily performance. For\n * continuous time series, use `getPortfolio` instead.\n *\n * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range\n * is capped at 500 days. Days before the subaccount's first recorded activity\n * return zeroed entries; days after the latest available data are omitted, so\n * a range ending in the future stops at today. The current (partial) day is\n * measured up to the latest available snapshot, which can be up to ~20\n * minutes stale.\n *\n * @param params\n */\n async getPortfolioCalendar(\n params: GetIndexerPortfolioCalendarParams,\n ): Promise<GetIndexerPortfolioCalendarResponse> {\n const baseResponse = await this.query('portfolio_calendar', {\n subaccount: subaccountToHex(params.subaccount),\n start_time: params.startTime,\n end_time: params.endTime,\n });\n\n return mapIndexerPortfolioCalendar(baseResponse);\n }\n\n /**\n * Retrieves latest mark/index price for a perp product\n * @param params\n */\n async getPerpPrices(\n params: GetIndexerPerpPricesParams,\n ): Promise<GetIndexerPerpPricesResponse> {\n const baseResponse = await this.query('price', {\n product_id: params.productId,\n });\n\n return mapIndexerPerpPrices(baseResponse);\n }\n\n /**\n * Retrieves latest mark/index price for multiple perp products\n * @param params\n */\n async getMultiProductPerpPrices(\n params: GetIndexerMultiProductPerpPricesParams,\n ): Promise<GetIndexerMultiProductPerpPricesResponse> {\n const baseResponse = await this.query('perp_prices', {\n product_ids: params.productIds,\n });\n\n return mapValues(baseResponse, mapIndexerPerpPrices);\n }\n\n /**\n * Retrieves latest oracle prices for provided products\n * @param params\n */\n async getOraclePrices(\n params: GetIndexerOraclePricesParams,\n ): Promise<GetIndexerOraclePricesResponse> {\n const baseResponse = await this.query('oracle_price', {\n product_ids: params.productIds,\n });\n\n return baseResponse.prices.map((price): IndexerOraclePrice => {\n return {\n oraclePrice: removeDecimals(price.oracle_price_x18),\n updateTime: toBigNumber(price.update_time),\n productId: price.product_id,\n };\n });\n }\n\n /**\n * Retrieves candlesticks for a product\n * @param params\n */\n async getCandlesticks(\n params: GetIndexerCandlesticksParams,\n ): Promise<GetIndexerCandlesticksResponse> {\n const baseResponse = await this.query('candlesticks', {\n product_id: params.productId,\n max_time: params.maxTimeInclusive,\n limit: params.limit,\n granularity: params.period,\n });\n\n return baseResponse.candlesticks.map(mapIndexerCandlesticks);\n }\n\n /**\n * Retrieves candlesticks for a product from Edge\n * @param params\n */\n async getEdgeCandlesticks(\n params: GetIndexerEdgeCandlesticksParams,\n ): Promise<GetIndexerEdgeCandlesticksResponse> {\n const baseResponse = await this.query('edge_candlesticks', {\n product_id: params.productId,\n max_time: params.maxTimeInclusive,\n limit: params.limit,\n granularity: params.period,\n });\n\n return baseResponse.candlesticks.map(mapIndexerCandlesticks);\n }\n\n /**\n * Retrieves historical snapshots for a product\n * @param params\n */\n async getProductSnapshots(\n params: GetIndexerProductSnapshotsParams,\n ): Promise<GetIndexerProductSnapshotsResponse> {\n const baseResponse = await this.query('products', {\n product_id: params.productId,\n max_time: params.maxTimestampInclusive,\n limit: params.limit,\n idx: params.startCursor,\n });\n\n return baseResponse.products.map((product) => {\n return {\n ...mapIndexerServerProduct(product.product),\n submissionIndex: product.submission_idx,\n };\n });\n }\n\n /**\n * Retrieves historical snapshots for multiple products\n * @param params\n */\n async getMultiProductSnapshots(\n params: GetIndexerMultiProductSnapshotsParams,\n ): Promise<GetIndexerMultiProductSnapshotsResponse> {\n const timestampToProductsMap = await this.query('product_snapshots', {\n product_ids: params.productIds,\n max_time: params.maxTimestampInclusive ?? [nowInSeconds()],\n });\n\n return mapValues(timestampToProductsMap, (productIdToProduct) => {\n return mapValues(productIdToProduct, (indexerProduct) => {\n return {\n ...mapIndexerServerProduct(indexerProduct.product),\n submissionIndex: indexerProduct.submission_idx,\n };\n });\n });\n }\n\n /**\n * Retrieves historical events\n *\n * @param params\n */\n async getEvents(\n params: GetIndexerEventsParams,\n ): Promise<GetIndexerEventsResponse> {\n const serverLimit = ((): IndexerServerEventsParams['limit'] | undefined => {\n if (!params.limit) {\n return;\n }\n\n if (params.limit.type === 'events') {\n return {\n raw: params.limit.value,\n };\n }\n return {\n txs: params.limit.value,\n };\n })();\n\n const baseResponse = await this.query('events', {\n subaccounts: params.subaccounts?.map((subaccount) =>\n subaccountToHex({\n subaccountOwner: subaccount.subaccountOwner,\n subaccountName: subaccount.subaccountName,\n }),\n ),\n product_ids: params.productIds,\n isolated: params.isolated,\n event_types: params.eventTypes,\n max_time: params.maxTimestampInclusive,\n desc: params.desc,\n limit: serverLimit,\n idx: params.startCursor,\n });\n\n // Keep track of the last tx index, and go to the next one if the submission_idx for the currently processed event does not match\n // txs are ordered the same as events, so this should be correct\n let lastTxIdx = 0;\n return baseResponse.events.map((event): IndexerEventWithTx => {\n if (baseResponse.txs[lastTxIdx].submission_idx !== event.submission_idx) {\n lastTxIdx += 1;\n }\n const tx = baseResponse.txs[lastTxIdx];\n return mapIndexerEventWithTx(event, tx);\n });\n }\n\n /**\n * Retrieves historical orders\n * @param params\n */\n async getOrders(\n params: GetIndexerOrdersParams,\n ): Promise<GetIndexerOrdersResponse> {\n const baseResponse = await this.query('orders', {\n subaccounts: params?.subaccounts?.map((subaccount) =>\n subaccountToHex({\n subaccountOwner: subaccount.subaccountOwner,\n subaccountName: subaccount.subaccountName,\n }),\n ),\n product_ids: params.productIds,\n trigger_types: params.triggerTypes,\n isolated: params.isolated,\n digests: params.digests,\n max_time: params.maxTimestampInclusive,\n limit: params.limit,\n idx: params.startCursor,\n });\n\n return baseResponse.orders.map(mapIndexerOrder);\n }\n\n /**\n * Gets match order events, this will return the same events as the events query, but with additional information\n * to identify the order that was matched\n *\n * @param params\n */\n async getMatchEvents(\n params: GetIndexerMatchEventsParams,\n ): Promise<GetIndexerMatchEventsResponse> {\n const baseResponse = await this.query('matches', {\n subaccounts: params?.subaccounts?.map((subaccount) =>\n subaccountToHex({\n subaccountOwner: subaccount.subaccountOwner,\n subaccountName: subaccount.subaccountName,\n }),\n ),\n product_ids: params.productIds,\n isolated: params.isolated,\n max_time: params.maxTimestampInclusive,\n limit: params.limit,\n idx: params.startCursor,\n });\n\n // Same as logic in `getEvents`\n let lastTxIdx = 0;\n return baseResponse.matches.map((matchEvent): IndexerMatchEvent => {\n if (\n baseResponse.txs[lastTxIdx].submission_idx !== matchEvent.submission_idx\n ) {\n lastTxIdx += 1;\n }\n const { tx, timestamp } = baseResponse.txs[lastTxIdx];\n\n // We use this to derive the product ID for the match\n const postBalances = mapIndexerMatchEventBalances(\n matchEvent.post_balance,\n );\n\n return {\n productId: postBalances.base.productId,\n isolated: matchEvent.isolated,\n totalFee: toBigNumber(matchEvent.fee),\n sequencerFee: toBigNumber(matchEvent.sequencer_fee),\n builderFee: toBigNumber(matchEvent.builder_fee),\n baseFilled: toBigNumber(matchEvent.base_filled),\n quoteFilled: toBigNumber(matchEvent.quote_filled),\n cumulativeFee: toBigNumber(matchEvent.cumulative_fee),\n cumulativeBaseFilled: toBigNumber(matchEvent.cumulative_base_filled),\n cumulativeQuoteFilled: toBigNumber(matchEvent.cumulative_quote_filled),\n digest: matchEvent.digest,\n order: matchEvent.order,\n submissionIndex: matchEvent.submission_idx,\n timestamp: toBigNumber(timestamp),\n preEventTrackedVars: {\n netEntryUnrealized: toBigNumber(matchEvent.net_entry_unrealized),\n netEntryCumulative: toBigNumber(matchEvent.net_entry_cumulative),\n },\n preBalances: mapIndexerMatchEventBalances(matchEvent.pre_balance),\n postBalances,\n tx,\n isTaker: matchEvent.is_taker,\n realizedPnl: toBigNumber(matchEvent.realized_pnl),\n closedAmount: toBigNumber(matchEvent.closed_amount),\n closedNetEntry: toBigNumber(matchEvent.closed_net_entry),\n margin: matchEvent.margin ? toBigNumber(matchEvent.margin) : null,\n ...subaccountFromHex(matchEvent.order.sender),\n };\n });\n }\n\n /**\n * Retrieves a subaccount's historical positions, ordered descending by `openId`.\n * Positions are tracked for every product except the quote product.\n *\n * The response also includes the boundary events (with their transactions) at each\n * position's open and close, or open and latest update while still open; join them\n * to positions via `openId` / `closeId` / `submissionIndex`.\n *\n * To paginate, pass the last returned position's `openId - 1` as the next request's\n * `startCursor`.\n *\n * @param params\n */\n async getPositions(\n params: GetIndexerPositionsParams,\n ): Promise<GetIndexerPositionsResponse> {\n const baseResponse = await this.query('positions', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccount.subaccountOwner,\n subaccountName: params.subaccount.subaccountName,\n }),\n product_id: params.productId,\n isolated: params.isolated,\n open: params.open,\n idx: params.startCursor,\n limit: params.limit,\n });\n\n // Unlike `getEvents`, boundary events aren't strictly ordered against txs, so join by submission index\n const txsBySubmissionIdx = new Map(\n baseResponse.txs.map((tx) => [tx.submission_idx, tx]),\n );\n\n return {\n positions: baseResponse.positions.map(mapIndexerPosition),\n events: baseResponse.events.map((event) => {\n const tx = txsBySubmissionIdx.get(event.submission_idx);\n if (!tx) {\n throw Error(\n `No tx found for position boundary event with submission_idx ${event.submission_idx}`,\n );\n }\n return mapIndexerEventWithTx(event, tx);\n }),\n };\n }\n\n /**\n * Retrieves historical funding & interest payments.\n * NOTE: `limit` is an upperbound. If a user changes position size such that his position is 0 during each funding/interest tick,\n * then the indexer will return fewer than `limit` results per page. However, more events can be present. This means that\n * there isn't a reliable way to determine whether there is a next page. We just need to keep paginating until the next cursor is null.\n *\n * @param params\n */\n async getInterestFundingPayments(\n params: GetIndexerInterestFundingPaymentsParams,\n ): Promise<GetIndexerInterestFundingPaymentsResponse> {\n const baseResponse = await this.query('interest_and_funding', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccount.subaccountOwner,\n subaccountName: params.subaccount.subaccountName,\n }),\n product_ids: params.productIds,\n max_time: params.maxTimestampInclusive,\n limit: params.limit,\n max_idx: params.startCursor,\n });\n\n return {\n fundingPayments: baseResponse.funding_payments.map(\n mapIndexerProductPayment,\n ),\n interestPayments: baseResponse.interest_payments.map(\n mapIndexerProductPayment,\n ),\n nextCursor: baseResponse.next_idx,\n };\n }\n\n /**\n * Gets quote (USDT) price in terms of USD\n */\n async getQuotePrice(): Promise<GetIndexerQuotePriceResponse> {\n const baseResponse = await this.query('quote_price', {});\n return {\n price: removeDecimals(baseResponse.price_x18),\n };\n }\n\n /**\n * Fetches currently registered linked signer with the remaining txs allowed for the subaccount\n */\n async getLinkedSignerWithRateLimit(\n params: GetIndexerLinkedSignerParams,\n ): Promise<GetIndexerLinkedSignerResponse> {\n const baseResponse = await this.query('linked_signer_rate_limit', {\n subaccount: subaccountToHex(params.subaccount),\n });\n return {\n totalTxLimit: toBigNumber(baseResponse.total_tx_limit),\n remainingTxs: toBigNumber(baseResponse.remaining_tx),\n signer: baseResponse.signer,\n waitTimeUntilNextTx: toBigNumber(baseResponse.wait_time),\n };\n }\n\n /**\n * Retrieve historical market snapshots\n * @param params\n */\n async getMarketSnapshots(\n params: GetIndexerMarketSnapshotsParams,\n ): Promise<GetIndexerMarketSnapshotsResponse> {\n const baseResponse = await this.query('market_snapshots', {\n interval: mapSnapshotsIntervalToServerParams(params),\n product_ids: params.productIds,\n });\n\n return baseResponse.snapshots.map(mapIndexerMarketSnapshot);\n }\n\n /**\n * Retrieve historical market snapshots from Edge\n * @param params\n */\n async getEdgeMarketSnapshots(\n params: GetIndexerEdgeMarketSnapshotsParams,\n ): Promise<GetIndexerEdgeMarketSnapshotResponse> {\n const baseResponse = await this.query('edge_market_snapshots', {\n interval: mapSnapshotsIntervalToServerParams(params),\n });\n\n return mapValues(baseResponse.snapshots, (snapshots) =>\n snapshots.map(mapIndexerMarketSnapshot),\n );\n }\n\n /**\n * Retrieve maker statistics for a given epoch\n *\n * @param params\n */\n async getMakerStatistics(\n params: GetIndexerMakerStatisticsParams,\n ): Promise<GetIndexerMakerStatisticsResponse> {\n const baseResponse = await this.query('maker_statistics', {\n product_id: params.productId,\n epoch: params.epoch,\n interval: params.interval,\n });\n\n return {\n rewardCoefficient: toBigNumber(baseResponse.reward_coefficient),\n makers: baseResponse.makers.map(mapIndexerMakerStatistics),\n };\n }\n\n /**\n * Retrieve leaderboard stats for a given contest\n *\n * @param params\n */\n async getLeaderboard(\n params: GetIndexerLeaderboardParams,\n ): Promise<GetIndexerLeaderboardResponse> {\n const baseResponse = await this.rewardsQuery('leaderboard', {\n contest_id: params.contestId,\n rank_type: params.rankType,\n start: params.startCursor,\n limit: params.limit,\n order: params.order,\n });\n\n return {\n participants: baseResponse.positions.map(mapIndexerLeaderboardPosition),\n };\n }\n\n /**\n * Retrieve leaderboard ranking of a subaccount on a given contest\n *\n * @param params\n */\n async getLeaderboardParticipant(\n params: GetIndexerLeaderboardParticipantParams,\n ): Promise<GetIndexerLeaderboardParticipantResponse> {\n const baseResponse = await this.rewardsQuery('leaderboard_rank', {\n subaccount: subaccountToHex(params.subaccount),\n contest_ids: params.contestIds,\n });\n\n return {\n participant: mapValues(baseResponse.positions, (position) =>\n mapIndexerLeaderboardPosition(position),\n ),\n };\n }\n\n /**\n * Registers a subaccount for one or more contests. Requires EIP-712 signing.\n *\n * @param params - Registration parameters including contest IDs and signing config.\n */\n async registerLeaderboard(\n params: RegisterLeaderboardParams,\n ): Promise<RegisterLeaderboardResponse> {\n const signatureParams: EIP712LeaderboardAuthenticationParams = {\n expiration: toIntegerString(params.recvTime ?? getDefaultRecvTime()),\n subaccountName: params.subaccountName,\n subaccountOwner: params.subaccountOwner,\n contestIds: params.contestIds,\n };\n\n const tx = getNadoEIP712Values(\n 'leaderboard_authentication',\n signatureParams,\n );\n const signature = await this.sign(\n 'leaderboard_authentication',\n params.verifyingAddr,\n params.chainId,\n signatureParams,\n );\n\n const updateRegistrationTx: SignedTx<EIP712LeaderboardAuthenticationValues> =\n {\n tx,\n signature,\n };\n\n const baseResponse = await this.rewardsQuery('leaderboard_register', {\n update_registration: updateRegistrationTx,\n });\n\n return {\n registrations: baseResponse.registrations.map(\n mapIndexerLeaderboardRegistration,\n ),\n };\n }\n\n /**\n * Retrieves contest registrations for a subaccount. Supports batch lookup\n * across multiple contests with an optional active filter.\n *\n * @param params - Query parameters including subaccount and contest IDs.\n */\n async getLeaderboardRegistrations(\n params: GetIndexerLeaderboardRegistrationsParams,\n ): Promise<GetIndexerLeaderboardRegistrationsResponse> {\n const baseResponse = await this.rewardsQuery('leaderboard_registrations', {\n subaccount: subaccountToHex(params.subaccount),\n contest_ids: params.contestIds,\n active: params.active,\n });\n\n return {\n registrations: baseResponse.registrations.map(\n mapIndexerLeaderboardRegistration,\n ),\n };\n }\n\n /**\n * Retrieve metadata of provided leaderboard contests\n *\n * @param params\n */\n async getLeaderboardContests(\n params: GetIndexerLeaderboardContestsParams,\n ): Promise<GetIndexerLeaderboardContestsResponse> {\n const baseResponse = await this.rewardsQuery('leaderboard_contests', {\n contest_ids: params.contestIds,\n active: params.active,\n });\n\n return {\n contests: baseResponse.contests.map(mapIndexerLeaderboardContest),\n };\n }\n\n /**\n * Retrieve signature and tx to submit a fast withdrawal\n *\n * @param params\n */\n async getFastWithdrawalSignature(\n params: GetIndexerFastWithdrawalSignatureParams,\n ): Promise<GetIndexerFastWithdrawalSignatureResponse> {\n const baseResponse = await this.query('fast_withdrawal_signature', params);\n return {\n idx: toBigInt(baseResponse.idx),\n tx: baseResponse.tx,\n txV2: baseResponse.tx_v2,\n txBytes: getValidatedHex(baseResponse.tx_bytes),\n signatures: baseResponse.signatures.map(getValidatedHex),\n };\n }\n\n async getNlpSnapshots(\n params: GetIndexerNlpSnapshotsParams,\n ): Promise<GetIndexerNlpSnapshotsResponse> {\n const baseResponse = await this.query('nlp_snapshots', {\n interval: {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n },\n });\n\n return {\n snapshots: baseResponse.snapshots.map(mapIndexerNlpSnapshot),\n };\n }\n\n /**\n * Retrieves the subaccount's DDA (Direct Deposit Address)\n * @param params\n */\n async getSubaccountDDA(\n params: GetIndexerSubaccountDDAParams,\n ): Promise<GetIndexerSubaccountDDAResponse> {\n const baseResponse = await this.query('direct_deposit_address', {\n subaccount: subaccountToHex(params.subaccount),\n });\n\n return {\n address: getValidatedAddress(baseResponse.v1_address),\n };\n }\n\n async getSequencerBacklog(): Promise<GetIndexerBacklogResponse> {\n const baseResponse = await this.query('backlog', {});\n\n return {\n totalTxs: toBigNumber(baseResponse.total_txs),\n totalSubmissions: toBigNumber(baseResponse.total_submissions),\n backlogSize: toBigNumber(baseResponse.backlog_size),\n updatedAt: toBigNumber(baseResponse.updated_at),\n backlogEtaInSeconds: baseResponse.backlog_eta_in_seconds\n ? toBigNumber(baseResponse.backlog_eta_in_seconds)\n : null,\n txsPerSecond: baseResponse.txs_per_second\n ? toBigNumber(baseResponse.txs_per_second)\n : null,\n };\n }\n\n /**\n * Retrieves private alpha choice information for a given address\n * @param params\n */\n async getPrivateAlphaChoice(\n params: GetIndexerPrivateAlphaChoiceParams,\n ): Promise<GetIndexerPrivateAlphaChoiceResponse> {\n const baseResponse = await this.rewardsQuery('private_alpha_choice', {\n address: params.address,\n });\n\n return {\n points: toBigNumber(baseResponse.points),\n feeRefund: toBigNumber(baseResponse.fee_refund),\n nftEligibility: baseResponse.nft_eligibility,\n };\n }\n\n /**\n * Retrieves points information for a given address, including points per epoch and all-time points\n * @param params\n */\n async getPoints(\n params: GetIndexerPointsParams,\n ): Promise<GetIndexerPointsResponse> {\n const baseResponse = await this.rewardsQuery('nado_points', {\n address: params.address,\n });\n\n return {\n pointsPerEpoch: baseResponse.points_per_epoch.map((epoch) => ({\n epoch: epoch.epoch,\n description: epoch.description,\n startTime: toBigNumber(epoch.start_time),\n endTime: toBigNumber(epoch.end_time),\n totalPoints: toBigNumber(epoch.total_points),\n points: toBigNumber(epoch.points),\n rank: epoch.rank,\n tier: epoch.tier,\n })),\n allTimePoints: {\n points: toBigNumber(baseResponse.all_time_points.points),\n rank: baseResponse.all_time_points.rank,\n tier: baseResponse.all_time_points.tier,\n },\n };\n }\n\n /**\n * Retrieves xPoints information (Nado x xStocks points program) for a given address,\n * including per-epoch points, all-time points, and per-quest breakdowns.\n * @param params\n */\n async getXPoints(\n params: GetIndexerXPointsParams,\n ): Promise<GetIndexerXPointsResponse> {\n const baseResponse = await this.rewardsQuery('nado_xpoints', {\n address: params.address,\n });\n\n const mapQuests = (\n quests: typeof baseResponse.all_time_points.quests,\n ): GetIndexerXPointsResponse['allTimePoints']['quests'] =>\n quests.map((quest) => ({\n questType: quest.quest_type,\n points: toBigNumber(quest.points),\n }));\n\n return {\n pointsPerEpoch: baseResponse.points_per_epoch.map((epoch) => ({\n epoch: epoch.epoch,\n description: epoch.description,\n startTime: toBigNumber(epoch.start_time),\n endTime: toBigNumber(epoch.end_time),\n totalPoints: toBigNumber(epoch.total_points),\n rank: epoch.rank,\n quests: mapQuests(epoch.quests),\n })),\n allTimePoints: {\n totalPoints: toBigNumber(baseResponse.all_time_points.total_points),\n rank: baseResponse.all_time_points.rank,\n quests: mapQuests(baseResponse.all_time_points.quests),\n },\n };\n }\n\n /**\n * Retrieves cash incentives information for a given wallet address: per-event platform volume,\n * unlocked rewards, and `wallet.claim`, which carries the claim status plus the merkle proof when\n * that status is `claimable`.\n * @param params\n */\n async getCashIncentives(\n params: GetIndexerCashIncentivesParams,\n ): Promise<GetIndexerCashIncentivesResponse> {\n const baseResponse = await this.rewardsQuery('cash_incentives', {\n wallet_address: params.address,\n });\n\n return {\n events: baseResponse.events.map((event) => ({\n metadata: {\n eventId: event.metadata.event_id,\n description: event.metadata.description,\n epochStart: toBigNumber(event.metadata.epoch_start),\n epochEnd: toBigNumber(event.metadata.epoch_end),\n maxVolume: removeDecimals(event.metadata.max_volume),\n maxReward: removeDecimals(event.metadata.max_reward),\n minVolume: removeDecimals(event.metadata.min_volume),\n minReward: removeDecimals(event.metadata.min_reward),\n },\n platform: {\n platformVolume: removeDecimals(event.platform.platform_volume),\n unlockedReward: removeDecimals(event.platform.unlocked_reward),\n },\n wallet: {\n reward: removeDecimals(event.wallet.reward),\n claim:\n event.wallet.claim.status === 'claimable'\n ? {\n status: 'claimable',\n airdropAddress: getValidatedAddress(\n event.wallet.claim.airdrop_address,\n ),\n week: event.wallet.claim.week,\n // Kept in raw token units so it can be passed to the airdrop contract unchanged\n totalAmount: toBigNumber(event.wallet.claim.total_amount),\n proof: event.wallet.claim.proof.map(getValidatedHex),\n }\n : { status: event.wallet.claim.status },\n },\n })),\n walletSummary: {\n totalReward: removeDecimals(baseResponse.wallet_summary.total_reward),\n claimableReward: removeDecimals(\n baseResponse.wallet_summary.claimable_reward,\n ),\n },\n };\n }\n\n /**\n * Initiates a social account connection flow. Returns a URL the user must visit to complete the OAuth flow.\n * Requires EIP-712 signing.\n *\n * @param params - Connection parameters including provider and signing config.\n */\n async connectSocialAccount(\n params: ConnectSocialAccountParams,\n ): Promise<ConnectSocialAccountResponse> {\n const signatureParams: EIP712SocialAuthenticationParams = {\n expiration: toIntegerString(params.recvTime ?? getDefaultRecvTime()),\n subaccountName: params.subaccountName,\n subaccountOwner: params.subaccountOwner,\n provider: params.provider,\n };\n\n const tx = getNadoEIP712Values('social_authentication', signatureParams);\n const signature = await this.sign(\n 'social_authentication',\n params.verifyingAddr,\n params.chainId,\n signatureParams,\n );\n\n const baseResponse = await this.rewardsQuery('social_connect', {\n update_social_account: { tx, signature },\n });\n\n return { url: baseResponse.url };\n }\n\n /**\n * Lists linked social accounts for a given address.\n *\n * @param params - Query parameters including the wallet address.\n */\n async listSocialAccounts(\n params: ListIndexerSocialAccountsParams,\n ): Promise<ListIndexerSocialAccountsResponse> {\n const baseResponse = await this.rewardsQuery('list_social_accounts', {\n address: params.address,\n });\n\n return {\n accounts: baseResponse.accounts.map((a) => ({\n provider: a.provider,\n username: a.username,\n displayName: a.display_name,\n profileImageUrl: a.profile_image_url,\n })),\n };\n }\n\n /**\n * Revokes a linked social account. Requires EIP-712 signing.\n *\n * @param params - Revocation parameters including provider and signing config.\n */\n async revokeSocialAccount(\n params: RevokeSocialAccountParams,\n ): Promise<RevokeSocialAccountResponse> {\n const signatureParams: EIP712SocialAuthenticationParams = {\n expiration: toIntegerString(params.recvTime ?? getDefaultRecvTime()),\n subaccountName: params.subaccountName,\n subaccountOwner: params.subaccountOwner,\n provider: params.provider,\n };\n\n const tx = getNadoEIP712Values('social_authentication', signatureParams);\n const signature = await this.sign(\n 'social_authentication',\n params.verifyingAddr,\n params.chainId,\n signatureParams,\n );\n\n const baseResponse = await this.rewardsQuery('revoke_social_account', {\n update_social_account: { tx, signature },\n });\n\n return {\n accounts: baseResponse.accounts.map((a) => ({\n provider: a.provider,\n username: a.username,\n displayName: a.display_name,\n profileImageUrl: a.profile_image_url,\n })),\n };\n }\n\n /**\n * Get tickers from the v2 indexer endpoint\n * @param params\n */\n async getV2Tickers(\n params: GetIndexerV2TickersParams,\n ): Promise<GetIndexerV2TickersResponse> {\n const response =\n await this.axiosInstance.get<IndexerServerV2TickersResponse>(\n `${this.v2Url}/tickers`,\n { params },\n );\n\n this.checkResponseStatus(response);\n\n return mapValues(response.data, mapIndexerV2Ticker);\n }\n\n /**\n * Get symbols with market hours from the v2 indexer endpoint\n * @param params\n */\n async getV2Symbols(\n params?: GetIndexerV2SymbolsParams,\n ): Promise<GetIndexerV2SymbolsResponse> {\n const response =\n await this.axiosInstance.get<IndexerServerV2SymbolsResponse>(\n `${this.v2Url}/symbols`,\n {\n params: {\n product_type: params?.productType,\n product_ids: params?.productIds,\n },\n },\n );\n\n this.checkResponseStatus(response);\n\n return mapValues(response.data, mapIndexerV2Symbols);\n }\n\n protected query<TRequestType extends IndexerServerQueryRequestType>(\n requestType: TRequestType,\n params: IndexerServerQueryRequestByType[TRequestType],\n ): Promise<IndexerServerQueryResponseByType[TRequestType]> {\n return this.queryWithUrl(this.v1Url, requestType, params);\n }\n\n /**\n * Runs a query against the rewards endpoint, which serves leaderboard, points,\n * cash incentives, private alpha, and social account queries\n */\n protected rewardsQuery<TRequestType extends IndexerServerQueryRequestType>(\n requestType: TRequestType,\n params: IndexerServerQueryRequestByType[TRequestType],\n ): Promise<IndexerServerQueryResponseByType[TRequestType]> {\n return this.queryWithUrl(this.rewardsUrl, requestType, params);\n }\n\n private async queryWithUrl<\n TRequestType extends IndexerServerQueryRequestType,\n >(\n url: string,\n requestType: TRequestType,\n params: IndexerServerQueryRequestByType[TRequestType],\n ): Promise<IndexerServerQueryResponseByType[TRequestType]> {\n const reqBody: IndexerQueryRequestBody = {\n [requestType]: params,\n };\n const response = await this.axiosInstance.post<\n IndexerServerQueryResponseByType[TRequestType]\n >(url, reqBody);\n\n this.checkResponseStatus(response);\n\n return response.data;\n }\n\n protected async sign<T extends SignableRequestType>(\n requestType: T,\n verifyingContract: string,\n chainId: number,\n params: SignableRequestTypeToParams[T],\n ) {\n const walletClient =\n this.opts.linkedSignerWalletClient ?? this.opts.walletClient;\n\n if (!walletClient) {\n throw new WalletNotProvidedError();\n }\n\n return getSignedTransactionRequest({\n chainId,\n requestParams: params,\n requestType,\n walletClient,\n verifyingContract,\n });\n }\n\n private checkResponseStatus(response: AxiosResponse) {\n if (isIndexerServerFailureResponse(response.data)) {\n throw new IndexerServerFailureError(response.data, response.status);\n }\n if (response.status !== 200 || !response.data) {\n throw Error(\n `Unexpected response from server: ${response.status} ${response.statusText}`,\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKA,IAAa,oBAAb,MAA+B;CAO7B,YAAY,MAAyB;EACnC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAA,QAAM,OAAO;GAChC,iBAAiB;GAEjB,sBAAsB;GACtB,UAAA,GAAA,eAAA,0BAAkC,KAAK,UAAU;EACnD,CAAC;EACD,KAAK,QAAQ,GAAG,KAAK,IAAI;EACzB,KAAK,QAAQ,GAAG,KAAK,IAAI;EACzB,KAAK,aAAa,KAAK,cAAc,GAAG,KAAK,IAAI;CACnD;;;;;;CAOA,gBACE,0BACA;EACA,KAAK,KAAK,2BAA2B,4BAA4B,KAAA;CACnE;;;;;;CAOA,MAAM,gBACJ,QACyC;EAGzC,QAAO,MAFoB,KAAK,MAAM,eAAe,MAAM,GAEvC,YAAY,KAAK,SAAS;GAC5C,MAAM,cAAA,GAAA,eAAA,mBAA+B,KAAK,UAAU;GACpD,OAAO;IACL,OAAO,KAAK;IACZ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WAAW,MAAM,KAAK,cAAc,KAExC,KAAK,OAAO;EAEd,KAAK,oBAAoB,QAAQ;EAEjC,OAAO,SAAS;CAClB;CAEA,MAAgB,KACd,aACA,mBACA,SACA,QACA;EACA,MAAM,eACJ,KAAK,KAAK,4BAA4B,KAAK,KAAK;EAElD,IAAI,CAAC,cACH,MAAM,IAAIC,eAAAA,uBAAuB;EAGnC,QAAA,GAAA,eAAA,6BAAmC;GACjC;GACA,eAAe;GACf;GACA;GACA;EACF,CAAC;CACH;CAEA,oBAA4B,UAAyB;EACnD,IAAIC,0BAAAA,+BAA+B,SAAS,IAAI,GAC9C,MAAM,IAAIC,wCAAAA,0BAA0B,SAAS,MAAM,SAAS,MAAM;EAEpE,IAAI,SAAS,WAAW,OAAO,CAAC,SAAS,MACvC,MAAM,MACJ,oCAAoC,SAAS,OAAO,GAAG,SAAS,YAClE;CAEJ;AACF"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_IndexerBaseClient = require("./IndexerBaseClient-CSn4twzz.cjs");
2
+ const require_IndexerBaseClient = require("./IndexerBaseClient-DG3Tf9Cv.cjs");
3
3
  exports.IndexerBaseClient = require_IndexerBaseClient.IndexerBaseClient;
@@ -1,5 +1,5 @@
1
- import { Ft as IndexerServerQueryRequestType, It as IndexerServerQueryResponseByType, Pt as IndexerServerQueryRequestByType } from "./serverTypes-CyqBF-nt.cjs";
2
- import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, Cn as ListIndexerSubaccountsResponse, D as GetIndexerLeaderboardParticipantParams, Dn as RevokeSocialAccountResponse, E as GetIndexerLeaderboardParams, En as RevokeSocialAccountParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, Sn as ListIndexerSubaccountsParams, St as GetIndexerXPointsResponse, T as GetIndexerLeaderboardContestsResponse, Tn as RegisterLeaderboardResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _t as GetIndexerV2SymbolsParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as ListIndexerSocialAccountsParams, bt as GetIndexerV2TickersResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerPrivateAlphaChoiceParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerProductSnapshotsResponse, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerQuotePriceResponse, g as GetIndexerFastWithdrawalSignatureParams, gt as GetIndexerSubaccountDDAResponse, h as GetIndexerEventsResponse, ht as GetIndexerSubaccountDDAParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerPrivateAlphaChoiceResponse, m as GetIndexerEventsParams, mt as GetIndexerReferralCodeResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPositionsParams, pt as GetIndexerReferralCodeParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPositionsResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerProductSnapshotsParams, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerV2SymbolsResponse, w as GetIndexerLeaderboardContestsParams, wn as RegisterLeaderboardParams, x as GetIndexerFundingRateResponse, xn as ListIndexerSocialAccountsResponse, xt as GetIndexerXPointsParams, y as GetIndexerFundingRateHistoryResponse, yt as GetIndexerV2TickersParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DS2w6Osq.cjs";
1
+ import { Lt as IndexerServerQueryRequestByType, Rt as IndexerServerQueryRequestType, zt as IndexerServerQueryResponseByType } from "./serverTypes-Beex1AeJ.cjs";
2
+ import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, An as RevokeSocialAccountResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, Cn as ListIndexerSocialAccountsParams, Ct as GetIndexerXPointsParams, D as GetIndexerLeaderboardParticipantParams, Dn as RegisterLeaderboardParams, E as GetIndexerLeaderboardParams, En as ListIndexerSubaccountsResponse, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, On as RegisterLeaderboardResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, St as GetIndexerV2TickersResponse, T as GetIndexerLeaderboardContestsResponse, Tn as ListIndexerSubaccountsParams, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _t as GetIndexerSubaccountDDAParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioCalendarResponse, b as GetIndexerFundingRateParams, bt as GetIndexerV2SymbolsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerPositionsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerPrivateAlphaChoiceResponse, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerProductSnapshotsParams, g as GetIndexerFastWithdrawalSignatureParams, gt as GetIndexerReferralCodeResponse, h as GetIndexerEventsResponse, ht as GetIndexerReferralCodeParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioCalendarParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, kn as RevokeSocialAccountParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerPositionsResponse, m as GetIndexerEventsParams, mt as GetIndexerQuotePriceResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPortfolioParams, pt as GetIndexerProductSnapshotsResponse, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPortfolioResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerPrivateAlphaChoiceParams, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerSubaccountDDAResponse, w as GetIndexerLeaderboardContestsParams, wn as ListIndexerSocialAccountsResponse, wt as GetIndexerXPointsResponse, x as GetIndexerFundingRateResponse, xt as GetIndexerV2TickersParams, y as GetIndexerFundingRateHistoryResponse, yt as GetIndexerV2SymbolsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DaHLUQvU.cjs";
3
3
  import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
4
4
  import { AxiosInstance } from "axios";
5
5
 
@@ -79,6 +79,25 @@ declare class IndexerBaseClient {
79
79
  * @param params
80
80
  */
81
81
  getPortfolio(params: GetIndexerPortfolioParams): Promise<GetIndexerPortfolioResponse>;
82
+ /**
83
+ * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and
84
+ * markets traded between `startTime` and `endTime` (inclusive), split into
85
+ * `spot` and `perp` scopes. The value aggregates the cross-margin account plus
86
+ * every isolated child; the queried subaccount must be cross-margin.
87
+ *
88
+ * Use this for calendar/heat-map style views of daily performance. For
89
+ * continuous time series, use `getPortfolio` instead.
90
+ *
91
+ * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range
92
+ * is capped at 500 days. Days before the subaccount's first recorded activity
93
+ * return zeroed entries; days after the latest available data are omitted, so
94
+ * a range ending in the future stops at today. The current (partial) day is
95
+ * measured up to the latest available snapshot, which can be up to ~20
96
+ * minutes stale.
97
+ *
98
+ * @param params
99
+ */
100
+ getPortfolioCalendar(params: GetIndexerPortfolioCalendarParams): Promise<GetIndexerPortfolioCalendarResponse>;
82
101
  /**
83
102
  * Retrieves latest mark/index price for a perp product
84
103
  * @param params
@@ -1 +1 @@
1
- {"version":3,"file":"IndexerBaseClient.d.cts","names":[],"sources":["../src/src/IndexerBaseClient.ts"],"mappings":";;;;;;UAkJiB,iBAAA;EAEf,GAAA;EAGA,UAAA;EAEA,YAAA,GAAe,uBAAA;EAEf,wBAAA,GAA2B,uBAAuB;EAElD,UAAA;AAAA;;;;cAQW,iBAAA;EAAA,SACF,IAAA,EAAM,iBAAA;EAAA,SACN,KAAA;EAAA,SACA,KAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,iBAAA;EAPP;;;;;EAyBJ,eAAA,CACL,wBAAA,EAA0B,uBAAA;EAAA;;;;;EAUtB,eAAA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AAA,CAAQ,2BAAA;EAzfL;;;;EAygBA,YAAA,CACJ,MAAA,GAAS,yBAAA,GACR,OAAA,CAAQ,2BAAA;EAAA,UAiBD,KAAA,sBAA2B,6BAAA,CAAA,CACnC,WAAA,EAAa,YAAA,EACb,MAAA,EAAQ,+BAAA,CAAgC,YAAA,IACvC,OAAA,CAAQ,gCAAA,CAAiC,YAAA;EAnhBzC;;;;EAAA,UA2hBO,YAAA,sBAAkC,6BAAA,CAAA,CAC1C,WAAA,EAAa,YAAA,EACb,MAAA,EAAQ,+BAAA,CAAgC,YAAA,IACvC,OAAA,CAAQ,gCAAA,CAAiC,YAAA;EAAA,QAI9B,YAAA;EAAA,UAmBE,IAAA,WAAe,mBAAA,CAAA,CAC7B,WAAA,EAAa,CAAA,EACb,iBAAA,UACA,OAAA,UACA,MAAA,EAAQ,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,QAkBhC,mBAAA;AAAA"}
@@ -1,5 +1,5 @@
1
- import { Ft as IndexerServerQueryRequestType, It as IndexerServerQueryResponseByType, Pt as IndexerServerQueryRequestByType } from "./serverTypes-Dod9cCEW.js";
2
- import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, Cn as ListIndexerSubaccountsResponse, D as GetIndexerLeaderboardParticipantParams, Dn as RevokeSocialAccountResponse, E as GetIndexerLeaderboardParams, En as RevokeSocialAccountParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, Sn as ListIndexerSubaccountsParams, St as GetIndexerXPointsResponse, T as GetIndexerLeaderboardContestsResponse, Tn as RegisterLeaderboardResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _t as GetIndexerV2SymbolsParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as ListIndexerSocialAccountsParams, bt as GetIndexerV2TickersResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerPrivateAlphaChoiceParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerProductSnapshotsResponse, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerQuotePriceResponse, g as GetIndexerFastWithdrawalSignatureParams, gt as GetIndexerSubaccountDDAResponse, h as GetIndexerEventsResponse, ht as GetIndexerSubaccountDDAParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerPrivateAlphaChoiceResponse, m as GetIndexerEventsParams, mt as GetIndexerReferralCodeResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPositionsParams, pt as GetIndexerReferralCodeParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPositionsResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerProductSnapshotsParams, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerV2SymbolsResponse, w as GetIndexerLeaderboardContestsParams, wn as RegisterLeaderboardParams, x as GetIndexerFundingRateResponse, xn as ListIndexerSocialAccountsResponse, xt as GetIndexerXPointsParams, y as GetIndexerFundingRateHistoryResponse, yt as GetIndexerV2TickersParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-CnswaLwH.js";
1
+ import { Lt as IndexerServerQueryRequestByType, Rt as IndexerServerQueryRequestType, zt as IndexerServerQueryResponseByType } from "./serverTypes-CJvQ3yQx.js";
2
+ import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, An as RevokeSocialAccountResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, Cn as ListIndexerSocialAccountsParams, Ct as GetIndexerXPointsParams, D as GetIndexerLeaderboardParticipantParams, Dn as RegisterLeaderboardParams, E as GetIndexerLeaderboardParams, En as ListIndexerSubaccountsResponse, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, On as RegisterLeaderboardResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, St as GetIndexerV2TickersResponse, T as GetIndexerLeaderboardContestsResponse, Tn as ListIndexerSubaccountsParams, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _t as GetIndexerSubaccountDDAParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioCalendarResponse, b as GetIndexerFundingRateParams, bt as GetIndexerV2SymbolsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerPositionsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerPrivateAlphaChoiceResponse, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerProductSnapshotsParams, g as GetIndexerFastWithdrawalSignatureParams, gt as GetIndexerReferralCodeResponse, h as GetIndexerEventsResponse, ht as GetIndexerReferralCodeParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioCalendarParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, kn as RevokeSocialAccountParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerPositionsResponse, m as GetIndexerEventsParams, mt as GetIndexerQuotePriceResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPortfolioParams, pt as GetIndexerProductSnapshotsResponse, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPortfolioResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerPrivateAlphaChoiceParams, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerSubaccountDDAResponse, w as GetIndexerLeaderboardContestsParams, wn as ListIndexerSocialAccountsResponse, wt as GetIndexerXPointsResponse, x as GetIndexerFundingRateResponse, xt as GetIndexerV2TickersParams, y as GetIndexerFundingRateHistoryResponse, yt as GetIndexerV2SymbolsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DgXbxuRD.js";
3
3
  import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
4
4
  import { AxiosInstance } from "axios";
5
5
 
@@ -79,6 +79,25 @@ declare class IndexerBaseClient {
79
79
  * @param params
80
80
  */
81
81
  getPortfolio(params: GetIndexerPortfolioParams): Promise<GetIndexerPortfolioResponse>;
82
+ /**
83
+ * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and
84
+ * markets traded between `startTime` and `endTime` (inclusive), split into
85
+ * `spot` and `perp` scopes. The value aggregates the cross-margin account plus
86
+ * every isolated child; the queried subaccount must be cross-margin.
87
+ *
88
+ * Use this for calendar/heat-map style views of daily performance. For
89
+ * continuous time series, use `getPortfolio` instead.
90
+ *
91
+ * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range
92
+ * is capped at 500 days. Days before the subaccount's first recorded activity
93
+ * return zeroed entries; days after the latest available data are omitted, so
94
+ * a range ending in the future stops at today. The current (partial) day is
95
+ * measured up to the latest available snapshot, which can be up to ~20
96
+ * minutes stale.
97
+ *
98
+ * @param params
99
+ */
100
+ getPortfolioCalendar(params: GetIndexerPortfolioCalendarParams): Promise<GetIndexerPortfolioCalendarResponse>;
82
101
  /**
83
102
  * Retrieves latest mark/index price for a perp product
84
103
  * @param params
@@ -1 +1 @@
1
- {"version":3,"file":"IndexerBaseClient.d.ts","names":[],"sources":["../src/src/IndexerBaseClient.ts"],"mappings":";;;;;;UAkJiB,iBAAA;EAEf,GAAA;EAGA,UAAA;EAEA,YAAA,GAAe,uBAAA;EAEf,wBAAA,GAA2B,uBAAuB;EAElD,UAAA;AAAA;;;;cAQW,iBAAA;EAAA,SACF,IAAA,EAAM,iBAAA;EAAA,SACN,KAAA;EAAA,SACA,KAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,iBAAA;EAPP;;;;;EAyBJ,eAAA,CACL,wBAAA,EAA0B,uBAAA;EAAA;;;;;EAUtB,eAAA,CACJ,MAAA,EAAQ,4BAAA,GACP,OAAA,CAAQ,8BAAA;EAsBR;;;;;;EAFG,2BAAA,CACJ,MAAA,EAAQ,wCAAA,GACP,OAAA,CAAQ,0CAAA;EAgFD;;;;;EAlCJ,eAAA,CACJ,MAAA,EAAQ,4BAAA,GACP,OAAA,CAAQ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C,OAAA,CAAQ,gCAAA,CAAiC,YAAA;EAnhBzC;;;;EAAA,UA2hBO,YAAA,sBAAkC,6BAAA,CAAA,CAC1C,WAAA,EAAa,YAAA,EACb,MAAA,EAAQ,+BAAA,CAAgC,YAAA,IACvC,OAAA,CAAQ,gCAAA,CAAiC,YAAA;EAAA,QAI9B,YAAA;EAAA,UAmBE,IAAA,WAAe,mBAAA,CAAA,CAC7B,WAAA,EAAa,CAAA,EACb,iBAAA,UACA,OAAA,UACA,MAAA,EAAQ,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,QAkBhC,mBAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { mapIndexerCandlesticks, mapIndexerEvent, mapIndexerEventWithTx, mapIndexerFundingRate, mapIndexerFundingRateHistory, mapIndexerLeaderboardContest, mapIndexerLeaderboardPosition, mapIndexerLeaderboardRegistration, mapIndexerMakerStatistics, mapIndexerMarketSnapshot, mapIndexerMatchEventBalances, mapIndexerNlpSnapshot, mapIndexerOrder, mapIndexerPerpPrices, mapIndexerPortfolio, mapIndexerPosition, mapIndexerProductPayment, mapIndexerServerProduct, mapIndexerV2Symbols, mapIndexerV2Ticker, mapSnapshotsIntervalToServerParams } from "./dataMappers.js";
1
+ import { mapIndexerCandlesticks, mapIndexerEvent, mapIndexerEventWithTx, mapIndexerFundingRate, mapIndexerFundingRateHistory, mapIndexerLeaderboardContest, mapIndexerLeaderboardPosition, mapIndexerLeaderboardRegistration, mapIndexerMakerStatistics, mapIndexerMarketSnapshot, mapIndexerMatchEventBalances, mapIndexerNlpSnapshot, mapIndexerOrder, mapIndexerPerpPrices, mapIndexerPortfolio, mapIndexerPortfolioCalendar, mapIndexerPosition, mapIndexerProductPayment, mapIndexerServerProduct, mapIndexerV2Symbols, mapIndexerV2Ticker, mapSnapshotsIntervalToServerParams } from "./dataMappers.js";
2
2
  import { IndexerServerFailureError } from "./types/IndexerServerFailureError.js";
3
3
  import { isIndexerServerFailureResponse } from "./types/serverTypes.js";
4
4
  import { WalletNotProvidedError, getDefaultRecvTime, getNadoClientTypeHeaders, getNadoEIP712Values, getSignedTransactionRequest, getValidatedAddress, getValidatedHex, mapValues, nowInSeconds, removeDecimals, subaccountFromHex, subaccountToHex, toBigInt, toBigNumber, toIntegerString } from "@nadohq/shared";
@@ -131,6 +131,31 @@ var IndexerBaseClient = class {
131
131
  return mapIndexerPortfolio(await this.query("portfolio", { subaccount: subaccountToHex(params.subaccount) }));
132
132
  }
133
133
  /**
134
+ * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and
135
+ * markets traded between `startTime` and `endTime` (inclusive), split into
136
+ * `spot` and `perp` scopes. The value aggregates the cross-margin account plus
137
+ * every isolated child; the queried subaccount must be cross-margin.
138
+ *
139
+ * Use this for calendar/heat-map style views of daily performance. For
140
+ * continuous time series, use `getPortfolio` instead.
141
+ *
142
+ * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range
143
+ * is capped at 500 days. Days before the subaccount's first recorded activity
144
+ * return zeroed entries; days after the latest available data are omitted, so
145
+ * a range ending in the future stops at today. The current (partial) day is
146
+ * measured up to the latest available snapshot, which can be up to ~20
147
+ * minutes stale.
148
+ *
149
+ * @param params
150
+ */
151
+ async getPortfolioCalendar(params) {
152
+ return mapIndexerPortfolioCalendar(await this.query("portfolio_calendar", {
153
+ subaccount: subaccountToHex(params.subaccount),
154
+ start_time: params.startTime,
155
+ end_time: params.endTime
156
+ }));
157
+ }
158
+ /**
134
159
  * Retrieves latest mark/index price for a perp product
135
160
  * @param params
136
161
  */