@reyaxyz/api-sdk 0.25.3 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,6 +112,31 @@ var LpClient = /** @class */ (function (_super) {
112
112
  });
113
113
  });
114
114
  };
115
+ LpClient.prototype.getLpPoolBalanceChartData = function (params) {
116
+ return __awaiter(this, void 0, void 0, function () {
117
+ var uri;
118
+ return __generator(this, function (_a) {
119
+ uri = "/api/lp-pools/".concat(params.poolId, "/balance-chart-data");
120
+ return [2 /*return*/, this.get(uri, {
121
+ timeframeMs: params.filters.timeframeMs,
122
+ granularity: params.filters.granularity,
123
+ })];
124
+ });
125
+ });
126
+ };
127
+ LpClient.prototype.getLpPoolPerformanceChartData = function (params) {
128
+ return __awaiter(this, void 0, void 0, function () {
129
+ var uri;
130
+ return __generator(this, function (_a) {
131
+ uri = "/api/lp-pools/".concat(params.poolId, "/performance-chart-data");
132
+ return [2 /*return*/, this.get(uri, {
133
+ timeframeMs: params.filters.timeframeMs,
134
+ granularity: params.filters.granularity,
135
+ address: params.address,
136
+ })];
137
+ });
138
+ });
139
+ };
115
140
  return LpClient;
116
141
  }(rest_1.default));
117
142
  exports.default = LpClient;
@@ -1 +1 @@
1
- {"version":3,"file":"lp.js","sourceRoot":"/","sources":["clients/modules/lp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,gDAAgC;AAEhC;IAAsC,4BAAU;IAAhD;;IAsCA,CAAC;IArCO,6BAAU,GAAhB;;;;gBACQ,GAAG,GAAG,eAAe,CAAC;gBAC5B,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,4BAAS,GAAf,UAAgB,MAAuB;;;;gBAC/B,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,CAAE,CAAC;gBACzC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,8CAA2B,GAAjC,UACE,MAAyC;;;;gBAEnC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,yBAAsB,CAAC;gBAC7D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,iCAAc,GAApB,UACE,MAA4B;;;;gBAEtB,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,eAAY,CAAC;gBACnD,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,2CAAwB,GAA9B,UACE,MAAsC;;;;gBAEhC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,sBAAmB,CAAC;gBAC1D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IACH,eAAC;AAAD,CAAC,AAtCD,CAAsC,cAAU,GAsC/C","sourcesContent":["import {\n GetLpPoolParams,\n GetLpPositionsParams,\n GetLpPoolResult,\n GetLpPoolsResult,\n GetLpPoolTransactionHistoryParams,\n GetLpPoolTransactionHistoryResult,\n GetLpPositionsResult,\n GetLpPoolWithdrawBalanceParams,\n GetLpPoolWithdrawBalanceResult,\n} from '../types';\nimport RestClient from './rest';\n\nexport default class LpClient extends RestClient {\n async getLpPools(): Promise<GetLpPoolsResult> {\n const uri = '/api/lp-pools';\n return this.get(uri);\n }\n\n async getLpPool(params: GetLpPoolParams): Promise<GetLpPoolResult> {\n const uri = `/api/lp-pools/${params.id}`;\n return this.get(uri);\n }\n\n async getLpPoolTransactionHistory(\n params: GetLpPoolTransactionHistoryParams,\n ): Promise<GetLpPoolTransactionHistoryResult> {\n const uri = `/api/lp-pools/${params.id}/transaction-history`;\n return this.get(uri, {\n limit: params.limit,\n address: params.address,\n });\n }\n\n async getLpPositions(\n params: GetLpPositionsParams,\n ): Promise<GetLpPositionsResult> {\n const uri = `/api/lp-pools/${params.id}/positions`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolWithdrawBalance(\n params: GetLpPoolWithdrawBalanceParams,\n ): Promise<GetLpPoolWithdrawBalanceResult> {\n const uri = `/api/lp-pools/${params.id}/withdraw-balance`;\n return this.get(uri, {\n address: params.address,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"lp.js","sourceRoot":"/","sources":["clients/modules/lp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,gDAAgC;AAEhC;IAAsC,4BAAU;IAAhD;;IA2DA,CAAC;IA1DO,6BAAU,GAAhB;;;;gBACQ,GAAG,GAAG,eAAe,CAAC;gBAC5B,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,4BAAS,GAAf,UAAgB,MAAuB;;;;gBAC/B,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,CAAE,CAAC;gBACzC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,8CAA2B,GAAjC,UACE,MAAyC;;;;gBAEnC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,yBAAsB,CAAC;gBAC7D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,iCAAc,GAApB,UACE,MAA4B;;;;gBAEtB,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,eAAY,CAAC;gBACnD,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,2CAAwB,GAA9B,UACE,MAAsC;;;;gBAEhC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,sBAAmB,CAAC;gBAC1D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,4CAAyB,GAA/B,UACE,MAAuC;;;;gBAEjC,GAAG,GAAG,wBAAiB,MAAM,CAAC,MAAM,wBAAqB,CAAC;gBAChE,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;wBACvC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;qBACxC,CAAC,EAAC;;;KACJ;IAEK,gDAA6B,GAAnC,UACE,MAA2C;;;;gBAErC,GAAG,GAAG,wBAAiB,MAAM,CAAC,MAAM,4BAAyB,CAAC;gBACpE,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;wBACvC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;wBACvC,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IACH,eAAC;AAAD,CAAC,AA3DD,CAAsC,cAAU,GA2D/C","sourcesContent":["import {\n GetLpPoolParams,\n GetLpPositionsParams,\n GetLpPoolResult,\n GetLpPoolsResult,\n GetLpPoolTransactionHistoryParams,\n GetLpPoolTransactionHistoryResult,\n GetLpPositionsResult,\n GetLpPoolWithdrawBalanceParams,\n GetLpPoolWithdrawBalanceResult,\n GetLpPoolBalanceChartDataParams,\n GetLpPoolBalanceChartDataResult,\n GetLpPoolPerformanceChartDataParams,\n GetLpPoolPerformanceChartDataResult,\n} from '../types';\nimport RestClient from './rest';\n\nexport default class LpClient extends RestClient {\n async getLpPools(): Promise<GetLpPoolsResult> {\n const uri = '/api/lp-pools';\n return this.get(uri);\n }\n\n async getLpPool(params: GetLpPoolParams): Promise<GetLpPoolResult> {\n const uri = `/api/lp-pools/${params.id}`;\n return this.get(uri);\n }\n\n async getLpPoolTransactionHistory(\n params: GetLpPoolTransactionHistoryParams,\n ): Promise<GetLpPoolTransactionHistoryResult> {\n const uri = `/api/lp-pools/${params.id}/transaction-history`;\n return this.get(uri, {\n limit: params.limit,\n address: params.address,\n });\n }\n\n async getLpPositions(\n params: GetLpPositionsParams,\n ): Promise<GetLpPositionsResult> {\n const uri = `/api/lp-pools/${params.id}/positions`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolWithdrawBalance(\n params: GetLpPoolWithdrawBalanceParams,\n ): Promise<GetLpPoolWithdrawBalanceResult> {\n const uri = `/api/lp-pools/${params.id}/withdraw-balance`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolBalanceChartData(\n params: GetLpPoolBalanceChartDataParams,\n ): Promise<GetLpPoolBalanceChartDataResult> {\n const uri = `/api/lp-pools/${params.poolId}/balance-chart-data`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n });\n }\n\n async getLpPoolPerformanceChartData(\n params: GetLpPoolPerformanceChartDataParams,\n ): Promise<GetLpPoolPerformanceChartDataResult> {\n const uri = `/api/lp-pools/${params.poolId}/performance-chart-data`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n address: params.address,\n });\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportedChainId = exports.CandlesResolution = void 0;
3
+ exports.PerformanceGranularity = exports.BalanceGranularity = exports.SupportedChainId = exports.CandlesResolution = void 0;
4
4
  var CandlesResolution;
5
5
  (function (CandlesResolution) {
6
6
  CandlesResolution["ONE_MINUTE"] = "1MIN";
@@ -17,4 +17,23 @@ var SupportedChainId;
17
17
  SupportedChainId[SupportedChainId["polygonMumbai"] = 80001] = "polygonMumbai";
18
18
  SupportedChainId[SupportedChainId["reyaCronos"] = 1729] = "reyaCronos";
19
19
  })(SupportedChainId || (exports.SupportedChainId = SupportedChainId = {}));
20
+ // --- Lp Pool Balance ---
21
+ var BalanceGranularity;
22
+ (function (BalanceGranularity) {
23
+ BalanceGranularity[BalanceGranularity["ONE_MINUTE"] = 60000] = "ONE_MINUTE";
24
+ BalanceGranularity[BalanceGranularity["ONE_HOUR"] = 3600000] = "ONE_HOUR";
25
+ BalanceGranularity[BalanceGranularity["ONE_DAY"] = 86400000] = "ONE_DAY";
26
+ BalanceGranularity[BalanceGranularity["ONE_WEEK"] = 604800000] = "ONE_WEEK";
27
+ BalanceGranularity[BalanceGranularity["ONE_MONTH"] = 2592000000] = "ONE_MONTH";
28
+ BalanceGranularity[BalanceGranularity["ONE_YEAR"] = 31536000000] = "ONE_YEAR";
29
+ })(BalanceGranularity || (exports.BalanceGranularity = BalanceGranularity = {}));
30
+ var PerformanceGranularity;
31
+ (function (PerformanceGranularity) {
32
+ PerformanceGranularity[PerformanceGranularity["ONE_MINUTE"] = 60000] = "ONE_MINUTE";
33
+ PerformanceGranularity[PerformanceGranularity["ONE_HOUR"] = 3600000] = "ONE_HOUR";
34
+ PerformanceGranularity[PerformanceGranularity["ONE_DAY"] = 86400000] = "ONE_DAY";
35
+ PerformanceGranularity[PerformanceGranularity["ONE_WEEK"] = 604800000] = "ONE_WEEK";
36
+ PerformanceGranularity[PerformanceGranularity["ONE_MONTH"] = 2592000000] = "ONE_MONTH";
37
+ PerformanceGranularity[PerformanceGranularity["ONE_YEAR"] = 31536000000] = "ONE_YEAR";
38
+ })(PerformanceGranularity || (exports.PerformanceGranularity = PerformanceGranularity = {}));
20
39
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;IAC1B,8CAAyB,CAAA;IACzB,uCAAkB,CAAA;IAClB,0CAAqB,CAAA;IACrB,qCAAgB,CAAA;AAClB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AA6MD,eAAe;AAEf,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6EAAqB,CAAA;IACrB,sEAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B","sourcesContent":["export enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\nexport interface MarketCandlesResponse {\n candles: Candle[];\n}\n\n// -- Markets --\n\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n chainId: SupportedChainId;\n};\n\nexport type GetMarketsResult = MarketEntity[];\n\nexport type GetMarketResult = MarketEntity;\n\nexport type GetMarketParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetCandlesParams = {\n marketId: MarketEntity['id'];\n resolution: CandlesResolution;\n fromISO?: string | null;\n toISO?: string | null;\n limit?: number | null;\n};\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type GetMarginAccountsParams = {\n address: string;\n limit?: number;\n};\n\nexport type GetMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n};\n\nexport type GetPositionsForMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n collaterals: {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n }[];\n};\n\nexport type GetMarginAccountsResult = MarginAccountEntity[];\nexport type GetMarginAccountResult = MarginAccountEntity;\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n date: Date;\n};\n\nexport type GetPositionsForMarginAccountResult = {\n positions: PositionEntity[];\n totalUnrealizedPNL: number;\n};\n\n// --- Trading History ----\n\nexport type GetMarketTradingHistoryParams = {\n marketId: number;\n limit?: number;\n fromTimestampMillisecondsUTC?: number;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type GetTradingHistoryResult = TradingHistoryEntity[];\n\n// --- Position History ---\n\nexport type GetPositionsHistoryForMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n size: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type GetPositionsHistoryForMarginAccountResult = PositionHistoryEntity[];\n\n// -- Max Order Size --\n\nexport type GetMaxOrderSizeAvailableParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n direction: 'long' | 'short';\n};\n\nexport type GetMaxOrderSizeAvailableResult = number;\n\n// --- Trade Simulation ----\n\nexport type SimulateTradeEntity = {\n liquidationPrice: number;\n fees: number;\n estimatedPrice: number;\n estimatedSlippage: number;\n imr: number;\n impliedLeverage: number;\n marginRatio: MarginAccountEntity['marginRatioPercentage'];\n marginRatioHealth: MarginAccountEntity['marginRatioHealth'];\n};\n\nexport type TradeSimulationLoadDataParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n};\n\nexport type TradeSimulationSimulateParams = {\n amount: number; // position size, + for long | - for short\n};\n\n// ---- LP ----\n\nexport enum SupportedChainId {\n polygonMumbai = 80001,\n reyaCronos = 1729,\n}\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n balanceSupplied?: number | null;\n apyChange24H: number;\n tokenAddress: string;\n token: string;\n allowedChainsForLiquidity: number[];\n chainId: SupportedChainId;\n};\n\nexport type GetLpPoolsResult = LpPoolEntity[];\n\nexport type GetLpPoolResult = LpPoolEntity;\n\nexport type GetLpPoolParams = {\n id: LpPoolEntity['id'];\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionHash: string;\n timestamp: number;\n};\n\nexport type GetLpPoolTransactionHistoryParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n limit?: number;\n};\n\nexport type GetLpPoolTransactionHistoryResult = LpTransactionHistoryEntity[];\n\nexport type GetLpPositionsParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type LpPositionEntity = {\n id: number;\n deposited: number;\n currentBalance: number;\n pnl: number;\n fundingRate: number;\n lpPool: LpPoolEntity;\n};\n\nexport type GetLpPositionsResult = LpPositionEntity[];\n\nexport type GetLpPoolWithdrawBalanceParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type GetLpPoolWithdrawBalanceResult = number;\n\n// ---- Transaction Simulation ----\n\nexport type GetTransactionSimulationInitialDataParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n};\n\n// ---- Transaction History\n\nexport type GetMarginAccountTransactionHistoryParams = {\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionHash: string;\n timestamp: number;\n};\n\nexport type GetMarginAccountTransactionHistoryResult =\n MarginAccountTransactionHistoryEntity[];\n\n// --- Max Withdraw Balance for Margin Account ---\n\nexport type GetMaxWithdrawBalanceForAccountParams = {\n marginAccountId: MarginAccountEntity['id'];\n tokenAddress: string; // address of usdc/eth/btc\n};\n\nexport type GetMaxWithdrawBalanceForAccountResult = number;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;IAC1B,8CAAyB,CAAA;IACzB,uCAAkB,CAAA;IAClB,0CAAqB,CAAA;IACrB,qCAAgB,CAAA;AAClB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AA6MD,eAAe;AAEf,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6EAAqB,CAAA;IACrB,sEAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAmGD,0BAA0B;AAE1B,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,2EAAsB,CAAA;IACtB,yEAAyB,CAAA;IACzB,wEAA6B,CAAA;IAC7B,2EAAkC,CAAA;IAClC,8EAAoC,CAAA;IACpC,6EAAoC,CAAA;AACtC,CAAC,EAPW,kBAAkB,kCAAlB,kBAAkB,QAO7B;AAqCD,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mFAAsB,CAAA;IACtB,iFAAyB,CAAA;IACzB,gFAA6B,CAAA;IAC7B,mFAAkC,CAAA;IAClC,sFAAoC,CAAA;IACpC,qFAAoC,CAAA;AACtC,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC","sourcesContent":["export enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\nexport interface MarketCandlesResponse {\n candles: Candle[];\n}\n\n// -- Markets --\n\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n chainId: SupportedChainId;\n};\n\nexport type GetMarketsResult = MarketEntity[];\n\nexport type GetMarketResult = MarketEntity;\n\nexport type GetMarketParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetCandlesParams = {\n marketId: MarketEntity['id'];\n resolution: CandlesResolution;\n fromISO?: string | null;\n toISO?: string | null;\n limit?: number | null;\n};\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type GetMarginAccountsParams = {\n address: string;\n limit?: number;\n};\n\nexport type GetMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n};\n\nexport type GetPositionsForMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n collaterals: {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n }[];\n};\n\nexport type GetMarginAccountsResult = MarginAccountEntity[];\nexport type GetMarginAccountResult = MarginAccountEntity;\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n date: Date;\n};\n\nexport type GetPositionsForMarginAccountResult = {\n positions: PositionEntity[];\n totalUnrealizedPNL: number;\n};\n\n// --- Trading History ----\n\nexport type GetMarketTradingHistoryParams = {\n marketId: number;\n limit?: number;\n fromTimestampMillisecondsUTC?: number;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type GetTradingHistoryResult = TradingHistoryEntity[];\n\n// --- Position History ---\n\nexport type GetPositionsHistoryForMarginAccountParams = {\n address: string;\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n size: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type GetPositionsHistoryForMarginAccountResult = PositionHistoryEntity[];\n\n// -- Max Order Size --\n\nexport type GetMaxOrderSizeAvailableParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n direction: 'long' | 'short';\n};\n\nexport type GetMaxOrderSizeAvailableResult = number;\n\n// --- Trade Simulation ----\n\nexport type SimulateTradeEntity = {\n liquidationPrice: number;\n fees: number;\n estimatedPrice: number;\n estimatedSlippage: number;\n imr: number;\n impliedLeverage: number;\n marginRatio: MarginAccountEntity['marginRatioPercentage'];\n marginRatioHealth: MarginAccountEntity['marginRatioHealth'];\n};\n\nexport type TradeSimulationLoadDataParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n};\n\nexport type TradeSimulationSimulateParams = {\n amount: number; // position size, + for long | - for short\n};\n\n// ---- LP ----\n\nexport enum SupportedChainId {\n polygonMumbai = 80001,\n reyaCronos = 1729,\n}\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n balanceSupplied?: number | null;\n apyChange24H: number;\n tokenAddress: string;\n token: string;\n allowedChainsForLiquidity: number[];\n chainId: SupportedChainId;\n};\n\nexport type GetLpPoolsResult = LpPoolEntity[];\n\nexport type GetLpPoolResult = LpPoolEntity;\n\nexport type GetLpPoolParams = {\n id: LpPoolEntity['id'];\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionHash: string;\n timestamp: number;\n};\n\nexport type GetLpPoolTransactionHistoryParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n limit?: number;\n};\n\nexport type GetLpPoolTransactionHistoryResult = LpTransactionHistoryEntity[];\n\nexport type GetLpPositionsParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type LpPositionEntity = {\n id: number;\n deposited: number;\n currentBalance: number;\n pnl: number;\n fundingRate: number;\n lpPool: LpPoolEntity;\n};\n\nexport type GetLpPositionsResult = LpPositionEntity[];\n\nexport type GetLpPoolWithdrawBalanceParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type GetLpPoolWithdrawBalanceResult = number;\n\n// ---- Transaction Simulation ----\n\nexport type GetTransactionSimulationInitialDataParams = {\n marketId: MarketEntity['id'];\n marginAccountId: MarginAccountEntity['id'];\n};\n\n// ---- Transaction History\n\nexport type GetMarginAccountTransactionHistoryParams = {\n marginAccountId: MarginAccountEntity['id'];\n limit?: number;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionHash: string;\n timestamp: number;\n};\n\nexport type GetMarginAccountTransactionHistoryResult =\n MarginAccountTransactionHistoryEntity[];\n\n// --- Lp Pool Balance ---\n\nexport enum BalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetLpPoolBalanceChartDataParams = {\n poolId: LpPoolEntity['id'];\n filters: {\n timeframeMs: number;\n granularity: BalanceGranularity;\n };\n};\n\nexport type GetLpPoolBalanceChartDataResult = {\n data: {\n timestampInMs: number;\n value: number;\n }[];\n tvl: number;\n tvlChangePercentage: number;\n apy: number;\n apyChangePercentage: number;\n};\n\n// - LP Account Performance -\nexport type GetLpPoolPerformanceChartDataResult = {\n capitalInvestedData: {\n timestampInMs: number;\n value: number;\n }[];\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n capitalInvested: number;\n capitalInvestedChangePercentage: number;\n};\n\nexport enum PerformanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetLpPoolPerformanceChartDataParams = {\n poolId: LpPoolEntity['id'];\n address: string; // wallet address\n filters: {\n timeframeMs: number;\n granularity: PerformanceGranularity;\n };\n};\n\n// --- Max Withdraw Balance for Margin Account ---\nexport type GetMaxWithdrawBalanceForAccountParams = {\n marginAccountId: MarginAccountEntity['id'];\n tokenAddress: string; // address of usdc/eth/btc\n};\n\nexport type GetMaxWithdrawBalanceForAccountResult = number;\n"]}
@@ -1,4 +1,4 @@
1
- import { GetLpPoolParams, GetLpPositionsParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolTransactionHistoryParams, GetLpPoolTransactionHistoryResult, GetLpPositionsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult } from '../types';
1
+ import { GetLpPoolParams, GetLpPositionsParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolTransactionHistoryParams, GetLpPoolTransactionHistoryResult, GetLpPositionsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult, GetLpPoolBalanceChartDataParams, GetLpPoolBalanceChartDataResult, GetLpPoolPerformanceChartDataParams, GetLpPoolPerformanceChartDataResult } from '../types';
2
2
  import RestClient from './rest';
3
3
  export default class LpClient extends RestClient {
4
4
  getLpPools(): Promise<GetLpPoolsResult>;
@@ -6,5 +6,7 @@ export default class LpClient extends RestClient {
6
6
  getLpPoolTransactionHistory(params: GetLpPoolTransactionHistoryParams): Promise<GetLpPoolTransactionHistoryResult>;
7
7
  getLpPositions(params: GetLpPositionsParams): Promise<GetLpPositionsResult>;
8
8
  getLpPoolWithdrawBalance(params: GetLpPoolWithdrawBalanceParams): Promise<GetLpPoolWithdrawBalanceResult>;
9
+ getLpPoolBalanceChartData(params: GetLpPoolBalanceChartDataParams): Promise<GetLpPoolBalanceChartDataResult>;
10
+ getLpPoolPerformanceChartData(params: GetLpPoolPerformanceChartDataParams): Promise<GetLpPoolPerformanceChartDataResult>;
9
11
  }
10
12
  //# sourceMappingURL=lp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lp.d.ts","sourceRoot":"/","sources":["clients/modules/lp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iCAAiC,EACjC,iCAAiC,EACjC,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,UAAU,CAAC;AAClB,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IACxC,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAK5D,2BAA2B,CAC/B,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAQvC,cAAc,CAClB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IAO1B,wBAAwB,CAC5B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC;CAM3C"}
1
+ {"version":3,"file":"lp.d.ts","sourceRoot":"/","sources":["clients/modules/lp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iCAAiC,EACjC,iCAAiC,EACjC,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACpC,MAAM,UAAU,CAAC;AAClB,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IACxC,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAK5D,2BAA2B,CAC/B,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAQvC,cAAc,CAClB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IAO1B,wBAAwB,CAC5B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAOpC,yBAAyB,CAC7B,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,+BAA+B,CAAC;IAQrC,6BAA6B,CACjC,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;CAQhD"}
@@ -238,6 +238,61 @@ export type MarginAccountTransactionHistoryEntity = {
238
238
  timestamp: number;
239
239
  };
240
240
  export type GetMarginAccountTransactionHistoryResult = MarginAccountTransactionHistoryEntity[];
241
+ export declare enum BalanceGranularity {
242
+ ONE_MINUTE = 60000,
243
+ ONE_HOUR = 3600000,
244
+ ONE_DAY = 86400000,
245
+ ONE_WEEK = 604800000,
246
+ ONE_MONTH = 2592000000,
247
+ ONE_YEAR = 31536000000
248
+ }
249
+ export type GetLpPoolBalanceChartDataParams = {
250
+ poolId: LpPoolEntity['id'];
251
+ filters: {
252
+ timeframeMs: number;
253
+ granularity: BalanceGranularity;
254
+ };
255
+ };
256
+ export type GetLpPoolBalanceChartDataResult = {
257
+ data: {
258
+ timestampInMs: number;
259
+ value: number;
260
+ }[];
261
+ tvl: number;
262
+ tvlChangePercentage: number;
263
+ apy: number;
264
+ apyChangePercentage: number;
265
+ };
266
+ export type GetLpPoolPerformanceChartDataResult = {
267
+ capitalInvestedData: {
268
+ timestampInMs: number;
269
+ value: number;
270
+ }[];
271
+ balanceData: {
272
+ timestampInMs: number;
273
+ value: number;
274
+ }[];
275
+ balance: number;
276
+ balanceChangePercentage: number;
277
+ capitalInvested: number;
278
+ capitalInvestedChangePercentage: number;
279
+ };
280
+ export declare enum PerformanceGranularity {
281
+ ONE_MINUTE = 60000,
282
+ ONE_HOUR = 3600000,
283
+ ONE_DAY = 86400000,
284
+ ONE_WEEK = 604800000,
285
+ ONE_MONTH = 2592000000,
286
+ ONE_YEAR = 31536000000
287
+ }
288
+ export type GetLpPoolPerformanceChartDataParams = {
289
+ poolId: LpPoolEntity['id'];
290
+ address: string;
291
+ filters: {
292
+ timeframeMs: number;
293
+ granularity: PerformanceGranularity;
294
+ };
295
+ };
241
296
  export type GetMaxWithdrawBalanceForAccountParams = {
242
297
  marginAccountId: MarginAccountEntity['id'];
243
298
  tokenAddress: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,UAAU,SAAS;IACnB,YAAY,UAAU;IACtB,eAAe,WAAW;IAC1B,cAAc,WAAW;IACzB,QAAQ,UAAU;IAClB,UAAU,WAAW;IACrB,OAAO,SAAS;CACjB;AAGD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,iBAAiB,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;I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C;IAChB,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF,oBAAY,sBAAsB;IAChC,UAAU,QAAY;IACtB,QAAQ,UAAiB;IACzB,OAAO,WAAsB;IAC7B,QAAQ,YAA0B;IAClC,SAAS,aAA2B;IACpC,QAAQ,cAA4B;CACrC;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,sBAAsB,CAAC;KACrC,CAAC;CACH,CAAC;AAGF,MAAM,MAAM,qCAAqC,GAAG;IAClD,eAAe,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@reyaxyz/api-sdk",
3
- "version": "0.25.3",
3
+ "version": "0.26.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/Voltz-Protocol/reya-off-chain-monorepo.git"
10
+ "url": "https://github.com/Reya-Labs/reya-off-chain-monorepo.git"
11
11
  },
12
12
  "main": "dist/index.js",
13
13
  "types": "dist/types",
@@ -39,5 +39,5 @@
39
39
  "lodash": "^4.17.21"
40
40
  },
41
41
  "packageManager": "pnpm@8.10.4",
42
- "gitHead": "50fd5c7f91c1771db4c03d6a2b7130c966453b55"
42
+ "gitHead": "6ab1baec6a0030c523d665ff96553100b0c12b01"
43
43
  }
@@ -8,6 +8,10 @@ import {
8
8
  GetLpPositionsResult,
9
9
  GetLpPoolWithdrawBalanceParams,
10
10
  GetLpPoolWithdrawBalanceResult,
11
+ GetLpPoolBalanceChartDataParams,
12
+ GetLpPoolBalanceChartDataResult,
13
+ GetLpPoolPerformanceChartDataParams,
14
+ GetLpPoolPerformanceChartDataResult,
11
15
  } from '../types';
12
16
  import RestClient from './rest';
13
17
 
@@ -49,4 +53,25 @@ export default class LpClient extends RestClient {
49
53
  address: params.address,
50
54
  });
51
55
  }
56
+
57
+ async getLpPoolBalanceChartData(
58
+ params: GetLpPoolBalanceChartDataParams,
59
+ ): Promise<GetLpPoolBalanceChartDataResult> {
60
+ const uri = `/api/lp-pools/${params.poolId}/balance-chart-data`;
61
+ return this.get(uri, {
62
+ timeframeMs: params.filters.timeframeMs,
63
+ granularity: params.filters.granularity,
64
+ });
65
+ }
66
+
67
+ async getLpPoolPerformanceChartData(
68
+ params: GetLpPoolPerformanceChartDataParams,
69
+ ): Promise<GetLpPoolPerformanceChartDataResult> {
70
+ const uri = `/api/lp-pools/${params.poolId}/performance-chart-data`;
71
+ return this.get(uri, {
72
+ timeframeMs: params.filters.timeframeMs,
73
+ granularity: params.filters.granularity,
74
+ address: params.address,
75
+ });
76
+ }
52
77
  }
@@ -315,8 +315,71 @@ export type MarginAccountTransactionHistoryEntity = {
315
315
  export type GetMarginAccountTransactionHistoryResult =
316
316
  MarginAccountTransactionHistoryEntity[];
317
317
 
318
- // --- Max Withdraw Balance for Margin Account ---
318
+ // --- Lp Pool Balance ---
319
+
320
+ export enum BalanceGranularity {
321
+ ONE_MINUTE = 60 * 1000,
322
+ ONE_HOUR = 60 * 60 * 1000,
323
+ ONE_DAY = 24 * 60 * 60 * 1000,
324
+ ONE_WEEK = 7 * 24 * 60 * 60 * 1000,
325
+ ONE_MONTH = 30 * 24 * 60 * 60 * 1000,
326
+ ONE_YEAR = 365 * 24 * 60 * 60 * 1000,
327
+ }
319
328
 
329
+ export type GetLpPoolBalanceChartDataParams = {
330
+ poolId: LpPoolEntity['id'];
331
+ filters: {
332
+ timeframeMs: number;
333
+ granularity: BalanceGranularity;
334
+ };
335
+ };
336
+
337
+ export type GetLpPoolBalanceChartDataResult = {
338
+ data: {
339
+ timestampInMs: number;
340
+ value: number;
341
+ }[];
342
+ tvl: number;
343
+ tvlChangePercentage: number;
344
+ apy: number;
345
+ apyChangePercentage: number;
346
+ };
347
+
348
+ // - LP Account Performance -
349
+ export type GetLpPoolPerformanceChartDataResult = {
350
+ capitalInvestedData: {
351
+ timestampInMs: number;
352
+ value: number;
353
+ }[];
354
+ balanceData: {
355
+ timestampInMs: number;
356
+ value: number;
357
+ }[];
358
+ balance: number;
359
+ balanceChangePercentage: number;
360
+ capitalInvested: number;
361
+ capitalInvestedChangePercentage: number;
362
+ };
363
+
364
+ export enum PerformanceGranularity {
365
+ ONE_MINUTE = 60 * 1000,
366
+ ONE_HOUR = 60 * 60 * 1000,
367
+ ONE_DAY = 24 * 60 * 60 * 1000,
368
+ ONE_WEEK = 7 * 24 * 60 * 60 * 1000,
369
+ ONE_MONTH = 30 * 24 * 60 * 60 * 1000,
370
+ ONE_YEAR = 365 * 24 * 60 * 60 * 1000,
371
+ }
372
+
373
+ export type GetLpPoolPerformanceChartDataParams = {
374
+ poolId: LpPoolEntity['id'];
375
+ address: string; // wallet address
376
+ filters: {
377
+ timeframeMs: number;
378
+ granularity: PerformanceGranularity;
379
+ };
380
+ };
381
+
382
+ // --- Max Withdraw Balance for Margin Account ---
320
383
  export type GetMaxWithdrawBalanceForAccountParams = {
321
384
  marginAccountId: MarginAccountEntity['id'];
322
385
  tokenAddress: string; // address of usdc/eth/btc