@nadohq/indexer-client 0.1.0-alpha.41 → 0.1.0-alpha.44
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/dist/IndexerBaseClient.cjs +16 -0
- package/dist/IndexerBaseClient.cjs.map +1 -1
- package/dist/IndexerBaseClient.d.cts +6 -1
- package/dist/IndexerBaseClient.d.ts +6 -1
- package/dist/IndexerBaseClient.js +16 -0
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/dataMappers.cjs +3 -1
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.js +3 -1
- package/dist/dataMappers.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/types/clientTypes.cjs.map +1 -1
- package/dist/types/clientTypes.d.cts +16 -1
- package/dist/types/clientTypes.d.ts +16 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +4 -0
- package/dist/types/serverModelTypes.d.ts +4 -0
- package/dist/types/serverTypes.cjs.map +1 -1
- package/dist/types/serverTypes.d.cts +11 -1
- package/dist/types/serverTypes.d.ts +11 -1
- package/package.json +4 -4
- package/src/IndexerBaseClient.ts +22 -0
- package/src/dataMappers.ts +2 -0
- package/src/types/clientTypes.ts +20 -0
- package/src/types/serverModelTypes.ts +4 -0
- package/src/types/serverTypes.ts +12 -0
package/dist/dataMappers.js
CHANGED
|
@@ -56,7 +56,9 @@ function mapIndexerOrder(order) {
|
|
|
56
56
|
submissionIndex: order.submission_idx,
|
|
57
57
|
baseFilled: toBigDecimal(order.base_filled),
|
|
58
58
|
quoteFilled: toBigDecimal(order.quote_filled),
|
|
59
|
-
totalFee: toBigDecimal(order.fee)
|
|
59
|
+
totalFee: toBigDecimal(order.fee),
|
|
60
|
+
realizedPnl: toBigDecimal(order.realized_pnl),
|
|
61
|
+
closedSize: toBigDecimal(order.closed_amount)
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
64
|
function mapIndexerEvent(event) {
|
package/dist/dataMappers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigDecimal,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2TickerResponse,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigDecimal(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigDecimal(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigDecimal(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigDecimal(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigDecimal(order.nonce),\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n baseFilled: toBigDecimal(order.base_filled),\n quoteFilled: toBigDecimal(order.quote_filled),\n totalFee: toBigDecimal(order.fee),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigDecimal(event.net_entry_cumulative),\n netEntryUnrealized: toBigDecimal(event.net_entry_unrealized),\n netFundingCumulative: toBigDecimal(event.net_funding_cumulative),\n netFundingUnrealized: toBigDecimal(event.net_funding_unrealized),\n netInterestCumulative: toBigDecimal(event.net_interest_cumulative),\n netInterestUnrealized: toBigDecimal(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigDecimal(event.quote_volume_cumulative),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigDecimal(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigDecimal(payment.timestamp),\n paymentAmount: toBigDecimal(payment.amount),\n balanceAmount: toBigDecimal(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigDecimal(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigDecimal(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigDecimal(makerData.timestamp),\n makerFee: toBigDecimal(makerData.maker_fee),\n uptime: toBigDecimal(makerData.uptime),\n sumQMin: toBigDecimal(makerData.sum_q_min),\n qScore: toBigDecimal(makerData.q_score),\n makerShare: toBigDecimal(makerData.maker_share),\n expectedMakerReward: toBigDecimal(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n pnl: toBigDecimal(position.pnl),\n pnlRank: toBigDecimal(position.pnl_rank),\n percentRoi: toBigDecimal(position.roi),\n roiRank: toBigDecimal(position.roi_rank),\n accountValue: toBigDecimal(position.account_value),\n volume: position.volume ? toBigDecimal(position.volume) : undefined,\n updateTime: toBigDecimal(position.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigDecimal(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n return {\n contestId: contest.contest_id,\n startTime: toBigDecimal(contest.start_time),\n endTime: toBigDecimal(contest.end_time),\n period: toBigDecimal(contest.threshold),\n totalParticipants: toBigDecimal(contest.count),\n minRequiredAccountValue: toBigDecimal(contest.threshold),\n minRequiredVolume: toBigDecimal(contest.volume_threshold),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigDecimal(contest.last_updated),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigDecimal(candlestick.timestamp),\n volume: toBigDecimal(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigDecimal(snapshot.timestamp),\n cumulativeUsers: toBigDecimal(snapshot.cumulative_users),\n dailyActiveUsers: toBigDecimal(snapshot.daily_active_users),\n tvl: toBigDecimal(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigDecimal,\n ),\n cumulativeMakerFees: mapValues(\n snapshot.cumulative_maker_fees,\n toBigDecimal,\n ),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigDecimal,\n ),\n cumulativeTakerFees: mapValues(\n snapshot.cumulative_taker_fees,\n toBigDecimal,\n ),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigDecimal),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigDecimal),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigDecimal),\n totalBorrows: mapValues(snapshot.total_borrows, toBigDecimal),\n totalDeposits: mapValues(snapshot.total_deposits, toBigDecimal),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigDecimal,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigDecimal),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigDecimal),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigDecimal(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigDecimal(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigDecimal(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigDecimal(snapshot.cumulative_pnl),\n cumulativeTrades: toBigDecimal(snapshot.cumulative_trades),\n cumulativeVolume: toBigDecimal(snapshot.cumulative_volume),\n depositors: toBigDecimal(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigDecimal(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwCA,SAAS,mCACd,QACgC;AAChC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd,UAAU,OAAO,mBACb,gBAAgB,OAAO,gBAAgB,IACvC;AAAA,IACJ,aAAa,OAAO;AAAA,EACtB;AACF;AAEO,SAAS,wBAAwB,SAAuC;AAC7E,MAAI,UAAU,SAAS;AACrB,WAAO,2BAA2B,QAAQ,IAAI;AAAA,EAChD;AACA,SAAO,2BAA2B,QAAQ,IAAI;AAChD;AAEO,SAAS,wBACd,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OAAO;AAAA,IACjB,cAAc,OAAO;AAAA,IACrB,eAAe,OAAO;AAAA,IACtB,WAAW,OAAO;AAAA,IAClB,YAAY,OAAO;AAAA,IACnB,aAAa,OAAO;AAAA,IACpB,uBAAuB,OAAO;AAAA,EAChC;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigDecimal,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2TickerResponse,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigDecimal(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigDecimal(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigDecimal(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigDecimal(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigDecimal(order.nonce),\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n baseFilled: toBigDecimal(order.base_filled),\n quoteFilled: toBigDecimal(order.quote_filled),\n totalFee: toBigDecimal(order.fee),\n realizedPnl: toBigDecimal(order.realized_pnl),\n closedSize: toBigDecimal(order.closed_amount),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigDecimal(event.net_entry_cumulative),\n netEntryUnrealized: toBigDecimal(event.net_entry_unrealized),\n netFundingCumulative: toBigDecimal(event.net_funding_cumulative),\n netFundingUnrealized: toBigDecimal(event.net_funding_unrealized),\n netInterestCumulative: toBigDecimal(event.net_interest_cumulative),\n netInterestUnrealized: toBigDecimal(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigDecimal(event.quote_volume_cumulative),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigDecimal(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigDecimal(payment.timestamp),\n paymentAmount: toBigDecimal(payment.amount),\n balanceAmount: toBigDecimal(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigDecimal(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigDecimal(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigDecimal(makerData.timestamp),\n makerFee: toBigDecimal(makerData.maker_fee),\n uptime: toBigDecimal(makerData.uptime),\n sumQMin: toBigDecimal(makerData.sum_q_min),\n qScore: toBigDecimal(makerData.q_score),\n makerShare: toBigDecimal(makerData.maker_share),\n expectedMakerReward: toBigDecimal(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n pnl: toBigDecimal(position.pnl),\n pnlRank: toBigDecimal(position.pnl_rank),\n percentRoi: toBigDecimal(position.roi),\n roiRank: toBigDecimal(position.roi_rank),\n accountValue: toBigDecimal(position.account_value),\n volume: position.volume ? toBigDecimal(position.volume) : undefined,\n updateTime: toBigDecimal(position.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigDecimal(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n return {\n contestId: contest.contest_id,\n startTime: toBigDecimal(contest.start_time),\n endTime: toBigDecimal(contest.end_time),\n period: toBigDecimal(contest.threshold),\n totalParticipants: toBigDecimal(contest.count),\n minRequiredAccountValue: toBigDecimal(contest.threshold),\n minRequiredVolume: toBigDecimal(contest.volume_threshold),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigDecimal(contest.last_updated),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigDecimal(candlestick.timestamp),\n volume: toBigDecimal(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigDecimal(snapshot.timestamp),\n cumulativeUsers: toBigDecimal(snapshot.cumulative_users),\n dailyActiveUsers: toBigDecimal(snapshot.daily_active_users),\n tvl: toBigDecimal(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigDecimal,\n ),\n cumulativeMakerFees: mapValues(\n snapshot.cumulative_maker_fees,\n toBigDecimal,\n ),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigDecimal,\n ),\n cumulativeTakerFees: mapValues(\n snapshot.cumulative_taker_fees,\n toBigDecimal,\n ),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigDecimal),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigDecimal),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigDecimal),\n totalBorrows: mapValues(snapshot.total_borrows, toBigDecimal),\n totalDeposits: mapValues(snapshot.total_deposits, toBigDecimal),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigDecimal,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigDecimal),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigDecimal),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigDecimal(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigDecimal(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigDecimal(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigDecimal(snapshot.cumulative_pnl),\n cumulativeTrades: toBigDecimal(snapshot.cumulative_trades),\n cumulativeVolume: toBigDecimal(snapshot.cumulative_volume),\n depositors: toBigDecimal(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigDecimal(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwCA,SAAS,mCACd,QACgC;AAChC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd,UAAU,OAAO,mBACb,gBAAgB,OAAO,gBAAgB,IACvC;AAAA,IACJ,aAAa,OAAO;AAAA,EACtB;AACF;AAEO,SAAS,wBAAwB,SAAuC;AAC7E,M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YAAY,aAAa,SAAS,UAAU;AAAA,IAC5C,aAAa,eAAe,SAAS,gBAAgB;AAAA,IACrD,KAAK,aAAa,SAAS,GAAG;AAAA,EAChC;AACF;AAEO,SAAS,mBACd,QACyB;AACzB,SAAO;AAAA,IACL,WAAW,OAAO;AAAA,IAClB,UAAU,OAAO;AAAA,IACjB,cAAc,OAAO;AAAA,IACrB,eAAe,OAAO;AAAA,IACtB,WAAW,OAAO;AAAA,IAClB,YAAY,OAAO;AAAA,IACnB,aAAa,OAAO;AAAA,IACpB,uBAAuB,OAAO;AAAA,EAChC;AACF;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -2,14 +2,14 @@ export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.cjs';
|
|
|
2
2
|
export { IndexerBaseClient, IndexerClientOpts } from './IndexerBaseClient.cjs';
|
|
3
3
|
export { IndexerClient } from './IndexerClient.cjs';
|
|
4
4
|
export { CandlestickPeriod } from './types/CandlestickPeriod.cjs';
|
|
5
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.cjs';
|
|
5
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.cjs';
|
|
6
6
|
export { CollateralEventType } from './types/collateralEventType.cjs';
|
|
7
7
|
export { IndexerEventType } from './types/IndexerEventType.cjs';
|
|
8
8
|
export { IndexerLeaderboardRankType } from './types/IndexerLeaderboardType.cjs';
|
|
9
9
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './types/NadoTx.cjs';
|
|
10
10
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './types/paginatedEventsTypes.cjs';
|
|
11
11
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.cjs';
|
|
12
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './types/serverTypes.cjs';
|
|
12
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './types/serverTypes.cjs';
|
|
13
13
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.cjs';
|
|
14
14
|
import '@nadohq/shared';
|
|
15
15
|
import 'axios';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.js';
|
|
|
2
2
|
export { IndexerBaseClient, IndexerClientOpts } from './IndexerBaseClient.js';
|
|
3
3
|
export { IndexerClient } from './IndexerClient.js';
|
|
4
4
|
export { CandlestickPeriod } from './types/CandlestickPeriod.js';
|
|
5
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.js';
|
|
5
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.js';
|
|
6
6
|
export { CollateralEventType } from './types/collateralEventType.js';
|
|
7
7
|
export { IndexerEventType } from './types/IndexerEventType.js';
|
|
8
8
|
export { IndexerLeaderboardRankType } from './types/IndexerLeaderboardType.js';
|
|
9
9
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './types/NadoTx.js';
|
|
10
10
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './types/paginatedEventsTypes.js';
|
|
11
11
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.js';
|
|
12
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './types/serverTypes.js';
|
|
12
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './types/serverTypes.js';
|
|
13
13
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.js';
|
|
14
14
|
import '@nadohq/shared';
|
|
15
15
|
import 'axios';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n BigDecimal,\n EIP712OrderValues,\n Market,\n OrderAppendix,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/shared';\nimport { Address, Hex } from 'viem';\nimport { CandlestickPeriod } from './CandlestickPeriod';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoTx, NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerFastWithdrawalSignatureParams,\n IndexerServerListSubaccountsParams,\n IndexerServerTriggerTypeFilter,\n} from './serverTypes';\n\n/**\n * Base types\n */\n\nexport type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;\n\nexport type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;\n\nexport interface IndexerEventSpotStateSnapshot {\n type: ProductEngineType.SPOT;\n preBalance: IndexerSpotBalance;\n postBalance: IndexerSpotBalance;\n market: SpotMarket;\n}\n\nexport interface IndexerEventPerpStateSnapshot {\n type: ProductEngineType.PERP;\n preBalance: IndexerPerpBalance;\n postBalance: IndexerPerpBalance;\n market: PerpMarket;\n}\n\nexport type IndexerEventBalanceStateSnapshot =\n | IndexerEventSpotStateSnapshot\n | IndexerEventPerpStateSnapshot;\n\nexport interface IndexerBalanceTrackedVars {\n netInterestUnrealized: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n quoteVolumeCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n // Unix timestamp in seconds\n createdAt: number;\n isolated: boolean;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccounts?: Subaccount[];\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccounts?: Subaccount[];\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n triggerTypes?: IndexerServerTriggerTypeFilter[];\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n digests?: string[];\n}\n\nexport interface IndexerOrder {\n digest: string;\n subaccount: string;\n productId: number;\n submissionIndex: string;\n amount: BigDecimal;\n price: BigDecimal;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccounts?: Subaccount[];\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n isTaker: boolean;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountQuote: BigDecimal;\n cumulativeBurnAmountQuote: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n\n/**\n * V2 Tickers\n */\n\n/**\n * Market type for ticker filtering\n */\nexport type TickerMarketType = 'spot' | 'perp';\n\n/**\n * Parameters for querying v2 tickers endpoint\n */\nexport interface GetIndexerV2TickersParams {\n /**\n * Filter tickers by market type (spot or perp)\n * @example 'spot'\n * @example 'perp'\n */\n market?: TickerMarketType;\n /**\n * Whether to include edge products\n * @default false\n */\n edge?: boolean;\n}\n\n/**\n * Individual ticker data from v2 endpoint\n */\nexport interface IndexerV2TickerResponse {\n /** Unique product identifier */\n productId: number;\n /** Unique ticker identifier */\n tickerId: string;\n /** Base currency symbol */\n baseCurrency: string;\n /** Quote currency symbol */\n quoteCurrency: string;\n /** Last traded price */\n lastPrice: number;\n /** 24h trading volume in base currency */\n baseVolume: number;\n /** 24h trading volume in quote currency */\n quoteVolume: number;\n /** 24h price change percentage */\n priceChangePercent24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint\n * Maps ticker IDs to their respective ticker data\n */\nexport type GetIndexerV2TickersResponse = Record<\n string,\n IndexerV2TickerResponse\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n BigDecimal,\n EIP712OrderValues,\n Market,\n OrderAppendix,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/shared';\nimport { Address, Hex } from 'viem';\nimport { CandlestickPeriod } from './CandlestickPeriod';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoTx, NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerFastWithdrawalSignatureParams,\n IndexerServerListSubaccountsParams,\n IndexerServerTriggerTypeFilter,\n} from './serverTypes';\n\n/**\n * Base types\n */\n\nexport type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;\n\nexport type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;\n\nexport interface IndexerEventSpotStateSnapshot {\n type: ProductEngineType.SPOT;\n preBalance: IndexerSpotBalance;\n postBalance: IndexerSpotBalance;\n market: SpotMarket;\n}\n\nexport interface IndexerEventPerpStateSnapshot {\n type: ProductEngineType.PERP;\n preBalance: IndexerPerpBalance;\n postBalance: IndexerPerpBalance;\n market: PerpMarket;\n}\n\nexport type IndexerEventBalanceStateSnapshot =\n | IndexerEventSpotStateSnapshot\n | IndexerEventPerpStateSnapshot;\n\nexport interface IndexerBalanceTrackedVars {\n netInterestUnrealized: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n quoteVolumeCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n // Unix timestamp in seconds\n createdAt: number;\n isolated: boolean;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccounts?: Subaccount[];\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccounts?: Subaccount[];\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n triggerTypes?: IndexerServerTriggerTypeFilter[];\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n digests?: string[];\n}\n\nexport interface IndexerOrder {\n digest: string;\n subaccount: string;\n productId: number;\n submissionIndex: string;\n amount: BigDecimal;\n price: BigDecimal;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n realizedPnl: BigDecimal;\n // Always positive\n closedSize: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccounts?: Subaccount[];\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n isTaker: boolean;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n realizedPnl: BigDecimal;\n // Always positive\n closedSize: BigDecimal;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountQuote: BigDecimal;\n cumulativeBurnAmountQuote: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n\n/**\n * Private Alpha Choice\n */\n\nexport interface GetIndexerPrivateAlphaChoiceParams {\n address: Address;\n}\n\nexport interface GetIndexerPrivateAlphaChoiceResponse {\n points: BigDecimal;\n feeRefund: BigDecimal;\n nftEligibility: boolean;\n}\n\n/**\n * V2 Tickers\n */\n\n/**\n * Market type for ticker filtering\n */\nexport type TickerMarketType = 'spot' | 'perp';\n\n/**\n * Parameters for querying v2 tickers endpoint\n */\nexport interface GetIndexerV2TickersParams {\n /**\n * Filter tickers by market type (spot or perp)\n * @example 'spot'\n * @example 'perp'\n */\n market?: TickerMarketType;\n /**\n * Whether to include edge products\n * @default false\n */\n edge?: boolean;\n}\n\n/**\n * Individual ticker data from v2 endpoint\n */\nexport interface IndexerV2TickerResponse {\n /** Unique product identifier */\n productId: number;\n /** Unique ticker identifier */\n tickerId: string;\n /** Base currency symbol */\n baseCurrency: string;\n /** Quote currency symbol */\n quoteCurrency: string;\n /** Last traded price */\n lastPrice: number;\n /** 24h trading volume in base currency */\n baseVolume: number;\n /** 24h trading volume in quote currency */\n quoteVolume: number;\n /** 24h price change percentage */\n priceChangePercent24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint\n * Maps ticker IDs to their respective ticker data\n */\nexport type GetIndexerV2TickersResponse = Record<\n string,\n IndexerV2TickerResponse\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -246,6 +246,8 @@ interface IndexerOrder {
|
|
|
246
246
|
baseFilled: BigDecimal;
|
|
247
247
|
quoteFilled: BigDecimal;
|
|
248
248
|
totalFee: BigDecimal;
|
|
249
|
+
realizedPnl: BigDecimal;
|
|
250
|
+
closedSize: BigDecimal;
|
|
249
251
|
}
|
|
250
252
|
type GetIndexerOrdersResponse = IndexerOrder[];
|
|
251
253
|
/**
|
|
@@ -282,6 +284,8 @@ interface IndexerMatchEvent extends Subaccount {
|
|
|
282
284
|
preBalances: IndexerMatchEventBalances;
|
|
283
285
|
postBalances: IndexerMatchEventBalances;
|
|
284
286
|
tx: NadoTx;
|
|
287
|
+
realizedPnl: BigDecimal;
|
|
288
|
+
closedSize: BigDecimal;
|
|
285
289
|
}
|
|
286
290
|
type GetIndexerMatchEventsResponse = IndexerMatchEvent[];
|
|
287
291
|
/**
|
|
@@ -470,6 +474,17 @@ interface GetIndexerSubaccountDDAParams {
|
|
|
470
474
|
interface GetIndexerSubaccountDDAResponse {
|
|
471
475
|
address: Address;
|
|
472
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Private Alpha Choice
|
|
479
|
+
*/
|
|
480
|
+
interface GetIndexerPrivateAlphaChoiceParams {
|
|
481
|
+
address: Address;
|
|
482
|
+
}
|
|
483
|
+
interface GetIndexerPrivateAlphaChoiceResponse {
|
|
484
|
+
points: BigDecimal;
|
|
485
|
+
feeRefund: BigDecimal;
|
|
486
|
+
nftEligibility: boolean;
|
|
487
|
+
}
|
|
473
488
|
/**
|
|
474
489
|
* V2 Tickers
|
|
475
490
|
*/
|
|
@@ -520,4 +535,4 @@ interface IndexerV2TickerResponse {
|
|
|
520
535
|
*/
|
|
521
536
|
type GetIndexerV2TickersResponse = Record<string, IndexerV2TickerResponse>;
|
|
522
537
|
|
|
523
|
-
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
538
|
+
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
@@ -246,6 +246,8 @@ interface IndexerOrder {
|
|
|
246
246
|
baseFilled: BigDecimal;
|
|
247
247
|
quoteFilled: BigDecimal;
|
|
248
248
|
totalFee: BigDecimal;
|
|
249
|
+
realizedPnl: BigDecimal;
|
|
250
|
+
closedSize: BigDecimal;
|
|
249
251
|
}
|
|
250
252
|
type GetIndexerOrdersResponse = IndexerOrder[];
|
|
251
253
|
/**
|
|
@@ -282,6 +284,8 @@ interface IndexerMatchEvent extends Subaccount {
|
|
|
282
284
|
preBalances: IndexerMatchEventBalances;
|
|
283
285
|
postBalances: IndexerMatchEventBalances;
|
|
284
286
|
tx: NadoTx;
|
|
287
|
+
realizedPnl: BigDecimal;
|
|
288
|
+
closedSize: BigDecimal;
|
|
285
289
|
}
|
|
286
290
|
type GetIndexerMatchEventsResponse = IndexerMatchEvent[];
|
|
287
291
|
/**
|
|
@@ -470,6 +474,17 @@ interface GetIndexerSubaccountDDAParams {
|
|
|
470
474
|
interface GetIndexerSubaccountDDAResponse {
|
|
471
475
|
address: Address;
|
|
472
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Private Alpha Choice
|
|
479
|
+
*/
|
|
480
|
+
interface GetIndexerPrivateAlphaChoiceParams {
|
|
481
|
+
address: Address;
|
|
482
|
+
}
|
|
483
|
+
interface GetIndexerPrivateAlphaChoiceResponse {
|
|
484
|
+
points: BigDecimal;
|
|
485
|
+
feeRefund: BigDecimal;
|
|
486
|
+
nftEligibility: boolean;
|
|
487
|
+
}
|
|
473
488
|
/**
|
|
474
489
|
* V2 Tickers
|
|
475
490
|
*/
|
|
@@ -520,4 +535,4 @@ interface IndexerV2TickerResponse {
|
|
|
520
535
|
*/
|
|
521
536
|
type GetIndexerV2TickersResponse = Record<string, IndexerV2TickerResponse>;
|
|
522
537
|
|
|
523
|
-
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
538
|
+
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
2
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
|
|
2
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
|
|
3
3
|
export { CollateralEventType } from './collateralEventType.cjs';
|
|
4
4
|
export { IndexerEventType } from './IndexerEventType.cjs';
|
|
5
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
6
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
7
7
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.cjs';
|
|
8
8
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.cjs';
|
|
9
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
|
|
9
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import '@nadohq/engine-client';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
2
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
|
|
2
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2TickerResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
|
|
3
3
|
export { CollateralEventType } from './collateralEventType.js';
|
|
4
4
|
export { IndexerEventType } from './IndexerEventType.js';
|
|
5
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
6
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
7
7
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.js';
|
|
8
8
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.js';
|
|
9
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
|
|
9
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import '@nadohq/engine-client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { EIP712OrderValues } from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerServerSnapshotsInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport type IndexerServerProduct =\n | {\n spot: EngineServerSpotProduct;\n }\n | {\n perp: EngineServerPerpProduct;\n };\n\nexport type IndexerServerBalance =\n | {\n spot: EngineServerSpotBalance;\n }\n | {\n perp: EngineServerPerpBalance;\n };\n\n/**\n * Candlesticks\n */\n\nexport interface IndexerServerCandlestick {\n product_id: number;\n granularity: string;\n submission_idx: string;\n timestamp: string;\n open_x18: string;\n high_x18: string;\n low_x18: string;\n close_x18: string;\n volume: string;\n}\n\n/**\n * Product snapshots\n */\n\nexport interface IndexerServerProductSnapshot {\n product_id: number;\n submission_idx: string;\n product: IndexerServerProduct;\n}\n\n/**\n * Base Events\n */\n\nexport interface IndexerServerEvent {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolated_product_id: number | null;\n product_id: number;\n submission_idx: string;\n event_type: IndexerEventType;\n pre_balance: IndexerServerBalance;\n post_balance: IndexerServerBalance;\n product: IndexerServerProduct;\n net_interest_unrealized: string;\n net_interest_cumulative: string;\n net_funding_unrealized: string;\n net_funding_cumulative: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n /**\n * Total traded volume in terms of the primary quote (i.e in terms of USDT) for this product\n */\n quote_volume_cumulative: string;\n}\n\nexport interface IndexerServerTx {\n submission_idx: string;\n timestamp: string;\n tx: NadoTx;\n}\n\n/**\n * Orders\n */\n\nexport interface IndexerServerOrder {\n digest: string;\n subaccount: string;\n product_id: number;\n submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n}\n\n/**\n * Match events\n */\n\nexport interface IndexerServerMatchEvent {\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n sequencer_fee: string;\n cumulative_fee: string;\n cumulative_base_filled: string;\n cumulative_quote_filled: string;\n submission_idx: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\n is_taker: boolean;\n}\n\nexport interface IndexerServerMatchEventBalances {\n base: IndexerServerBalance;\n // Quote is defined if 0 is included in `product_ids` and the match event is a spot event\n quote?: IndexerServerBalance;\n}\n\n/**\n * Oracle price\n */\n\nexport interface IndexerServerOraclePrice {\n product_id: number;\n oracle_price_x18: string;\n update_time: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface IndexerServerMarketSnapshotInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport interface IndexerServerMarketSnapshot {\n timestamp: string;\n cumulative_users: string;\n daily_active_users: string;\n tvl: string;\n // Keyed by product ID -> decimal value in string (i.e. no decimal adjustment) necessary\n // Backend serializes hashmaps with string keys\n cumulative_volumes: Record<string, string>;\n cumulative_taker_fees: Record<string, string>;\n cumulative_sequencer_fees: Record<string, string>;\n cumulative_maker_fees: Record<string, string>;\n cumulative_trades: Record<string, string>;\n cumulative_liquidation_amounts: Record<string, string>;\n open_interests: Record<string, string>;\n total_deposits: Record<string, string>;\n total_borrows: Record<string, string>;\n funding_rates: Record<string, string>;\n deposit_rates: Record<string, string>;\n borrow_rates: Record<string, string>;\n cumulative_trade_sizes: Record<string, string>;\n cumulative_inflows: Record<string, string>;\n cumulative_outflows: Record<string, string>;\n oracle_prices: Record<string, string>;\n}\n\n/**\n * Interest / funding\n */\n\nexport interface IndexerServerProductPayment {\n product_id: number;\n idx: string;\n timestamp: string;\n amount: string;\n balance_amount: string;\n rate_x18: string;\n oracle_price_x18: string;\n isolated: boolean;\n isolated_product_id: number | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface IndexerServerMakerData {\n timestamp: string;\n maker_fee: string;\n uptime: string;\n sum_q_min: string;\n q_score: string;\n maker_share: string;\n expected_maker_reward: string;\n}\n\nexport interface IndexerServerMaker {\n address: string;\n data: IndexerServerMakerData[];\n}\n\n/**\n * Leaderboard\n */\n\nexport interface IndexerServerLeaderboardPosition {\n subaccount: string;\n contest_id: number;\n pnl: string;\n pnl_rank: string;\n roi: string;\n roi_rank: string;\n account_value: string;\n volume?: string;\n update_time: string;\n}\n\nexport interface IndexerServerLeaderboardContest {\n contest_id: number;\n start_time: string;\n end_time: string;\n timeframe: string;\n count: string;\n threshold: string;\n volume_threshold: string;\n product_ids: number[];\n last_updated: string;\n active: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistration {\n subaccount: string;\n contest_id: number;\n update_time: string;\n}\n\n/**\n * NLP\n */\n\nexport interface IndexerServerNlpSnapshot {\n cumulative_burn_quote: string;\n cumulative_mint_quote: string;\n cumulative_pnl: string;\n cumulative_trades: string;\n cumulative_volume: string;\n depositors: string;\n oracle_price_x18: string;\n submission_idx: string;\n timestamp: string;\n tvl: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { EIP712OrderValues } from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerServerSnapshotsInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport type IndexerServerProduct =\n | {\n spot: EngineServerSpotProduct;\n }\n | {\n perp: EngineServerPerpProduct;\n };\n\nexport type IndexerServerBalance =\n | {\n spot: EngineServerSpotBalance;\n }\n | {\n perp: EngineServerPerpBalance;\n };\n\n/**\n * Candlesticks\n */\n\nexport interface IndexerServerCandlestick {\n product_id: number;\n granularity: string;\n submission_idx: string;\n timestamp: string;\n open_x18: string;\n high_x18: string;\n low_x18: string;\n close_x18: string;\n volume: string;\n}\n\n/**\n * Product snapshots\n */\n\nexport interface IndexerServerProductSnapshot {\n product_id: number;\n submission_idx: string;\n product: IndexerServerProduct;\n}\n\n/**\n * Base Events\n */\n\nexport interface IndexerServerEvent {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolated_product_id: number | null;\n product_id: number;\n submission_idx: string;\n event_type: IndexerEventType;\n pre_balance: IndexerServerBalance;\n post_balance: IndexerServerBalance;\n product: IndexerServerProduct;\n net_interest_unrealized: string;\n net_interest_cumulative: string;\n net_funding_unrealized: string;\n net_funding_cumulative: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n /**\n * Total traded volume in terms of the primary quote (i.e in terms of USDT) for this product\n */\n quote_volume_cumulative: string;\n}\n\nexport interface IndexerServerTx {\n submission_idx: string;\n timestamp: string;\n tx: NadoTx;\n}\n\n/**\n * Orders\n */\n\nexport interface IndexerServerOrder {\n digest: string;\n subaccount: string;\n product_id: number;\n submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n realized_pnl: string;\n closed_amount: string;\n}\n\n/**\n * Match events\n */\n\nexport interface IndexerServerMatchEvent {\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n sequencer_fee: string;\n cumulative_fee: string;\n cumulative_base_filled: string;\n cumulative_quote_filled: string;\n submission_idx: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\n is_taker: boolean;\n realized_pnl: string;\n closed_amount: string;\n}\n\nexport interface IndexerServerMatchEventBalances {\n base: IndexerServerBalance;\n // Quote is defined if 0 is included in `product_ids` and the match event is a spot event\n quote?: IndexerServerBalance;\n}\n\n/**\n * Oracle price\n */\n\nexport interface IndexerServerOraclePrice {\n product_id: number;\n oracle_price_x18: string;\n update_time: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface IndexerServerMarketSnapshotInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport interface IndexerServerMarketSnapshot {\n timestamp: string;\n cumulative_users: string;\n daily_active_users: string;\n tvl: string;\n // Keyed by product ID -> decimal value in string (i.e. no decimal adjustment) necessary\n // Backend serializes hashmaps with string keys\n cumulative_volumes: Record<string, string>;\n cumulative_taker_fees: Record<string, string>;\n cumulative_sequencer_fees: Record<string, string>;\n cumulative_maker_fees: Record<string, string>;\n cumulative_trades: Record<string, string>;\n cumulative_liquidation_amounts: Record<string, string>;\n open_interests: Record<string, string>;\n total_deposits: Record<string, string>;\n total_borrows: Record<string, string>;\n funding_rates: Record<string, string>;\n deposit_rates: Record<string, string>;\n borrow_rates: Record<string, string>;\n cumulative_trade_sizes: Record<string, string>;\n cumulative_inflows: Record<string, string>;\n cumulative_outflows: Record<string, string>;\n oracle_prices: Record<string, string>;\n}\n\n/**\n * Interest / funding\n */\n\nexport interface IndexerServerProductPayment {\n product_id: number;\n idx: string;\n timestamp: string;\n amount: string;\n balance_amount: string;\n rate_x18: string;\n oracle_price_x18: string;\n isolated: boolean;\n isolated_product_id: number | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface IndexerServerMakerData {\n timestamp: string;\n maker_fee: string;\n uptime: string;\n sum_q_min: string;\n q_score: string;\n maker_share: string;\n expected_maker_reward: string;\n}\n\nexport interface IndexerServerMaker {\n address: string;\n data: IndexerServerMakerData[];\n}\n\n/**\n * Leaderboard\n */\n\nexport interface IndexerServerLeaderboardPosition {\n subaccount: string;\n contest_id: number;\n pnl: string;\n pnl_rank: string;\n roi: string;\n roi_rank: string;\n account_value: string;\n volume?: string;\n update_time: string;\n}\n\nexport interface IndexerServerLeaderboardContest {\n contest_id: number;\n start_time: string;\n end_time: string;\n timeframe: string;\n count: string;\n threshold: string;\n volume_threshold: string;\n product_ids: number[];\n last_updated: string;\n active: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistration {\n subaccount: string;\n contest_id: number;\n update_time: string;\n}\n\n/**\n * NLP\n */\n\nexport interface IndexerServerNlpSnapshot {\n cumulative_burn_quote: string;\n cumulative_mint_quote: string;\n cumulative_pnl: string;\n cumulative_trades: string;\n cumulative_volume: string;\n depositors: string;\n oracle_price_x18: string;\n submission_idx: string;\n timestamp: string;\n tvl: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -85,6 +85,8 @@ interface IndexerServerOrder {
|
|
|
85
85
|
base_filled: string;
|
|
86
86
|
quote_filled: string;
|
|
87
87
|
fee: string;
|
|
88
|
+
realized_pnl: string;
|
|
89
|
+
closed_amount: string;
|
|
88
90
|
}
|
|
89
91
|
/**
|
|
90
92
|
* Match events
|
|
@@ -106,6 +108,8 @@ interface IndexerServerMatchEvent {
|
|
|
106
108
|
pre_balance: IndexerServerMatchEventBalances;
|
|
107
109
|
post_balance: IndexerServerMatchEventBalances;
|
|
108
110
|
is_taker: boolean;
|
|
111
|
+
realized_pnl: string;
|
|
112
|
+
closed_amount: string;
|
|
109
113
|
}
|
|
110
114
|
interface IndexerServerMatchEventBalances {
|
|
111
115
|
base: IndexerServerBalance;
|
|
@@ -85,6 +85,8 @@ interface IndexerServerOrder {
|
|
|
85
85
|
base_filled: string;
|
|
86
86
|
quote_filled: string;
|
|
87
87
|
fee: string;
|
|
88
|
+
realized_pnl: string;
|
|
89
|
+
closed_amount: string;
|
|
88
90
|
}
|
|
89
91
|
/**
|
|
90
92
|
* Match events
|
|
@@ -106,6 +108,8 @@ interface IndexerServerMatchEvent {
|
|
|
106
108
|
pre_balance: IndexerServerMatchEventBalances;
|
|
107
109
|
post_balance: IndexerServerMatchEventBalances;
|
|
108
110
|
is_taker: boolean;
|
|
111
|
+
realized_pnl: string;
|
|
112
|
+
closed_amount: string;
|
|
109
113
|
}
|
|
110
114
|
interface IndexerServerMatchEventBalances {
|
|
111
115
|
base: IndexerServerBalance;
|