ault-sdk-ts 0.0.2-alpha.25 → 0.0.2-alpha.26

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/index.cjs CHANGED
@@ -207,6 +207,10 @@ __export(index_exports, {
207
207
  getOrderbookQueryLimitDefault: () => getOrderbookQueryLimitDefault,
208
208
  getOrderbookQueryLimitMax: () => getOrderbookQueryLimitMax,
209
209
  getOrderbookResponseMarketIdRegExp: () => getOrderbookResponseMarketIdRegExp,
210
+ getPortfolioFlows: () => getPortfolioFlows,
211
+ getPortfolioHoldings: () => getPortfolioHoldings,
212
+ getPortfolioPnl: () => getPortfolioPnl,
213
+ getPortfolioTimeSeries: () => getPortfolioTimeSeries,
210
214
  getStatsResponseMarketsItemBaseVolumeRegExp: () => getStatsResponseMarketsItemBaseVolumeRegExp,
211
215
  getStatsResponseMarketsItemEstimatedFeeRegExp: () => getStatsResponseMarketsItemEstimatedFeeRegExp,
212
216
  getStatsResponseMarketsItemQuoteVolumeRegExp: () => getStatsResponseMarketsItemQuoteVolumeRegExp,
@@ -11249,6 +11253,35 @@ var getOpenAPISpec = async (options) => {
11249
11253
  });
11250
11254
  };
11251
11255
 
11256
+ // src/rest/portfolio.ts
11257
+ var enc = (s) => encodeURIComponent(s);
11258
+ function getPortfolioHoldings(address, options) {
11259
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/holdings`, {
11260
+ ...options,
11261
+ method: "GET"
11262
+ });
11263
+ }
11264
+ function getPortfolioFlows(address, range, options) {
11265
+ const query = range ? `?range=${range}` : "";
11266
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/flows${query}`, {
11267
+ ...options,
11268
+ method: "GET"
11269
+ });
11270
+ }
11271
+ function getPortfolioPnl(address, range, options) {
11272
+ const query = range ? `?range=${range}` : "";
11273
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/pnl${query}`, {
11274
+ ...options,
11275
+ method: "GET"
11276
+ });
11277
+ }
11278
+ function getPortfolioTimeSeries(address, range = "day", options) {
11279
+ return dexFetch(
11280
+ `/api/v1/portfolio/${enc(address)}/time?range=${range}`,
11281
+ { ...options, method: "GET" }
11282
+ );
11283
+ }
11284
+
11252
11285
  // src/rest/dex.ts
11253
11286
  function bind(context, fn) {
11254
11287
  return ((...args) => {
@@ -11275,6 +11308,10 @@ function createDexApi(context) {
11275
11308
  listMyTrades: bind(context, listMyTrades),
11276
11309
  getBalance: bind(context, getBalance),
11277
11310
  getStats: bind(context, getStats),
11311
+ getPortfolioHoldings: bind(context, getPortfolioHoldings),
11312
+ getPortfolioFlows: bind(context, getPortfolioFlows),
11313
+ getPortfolioPnl: bind(context, getPortfolioPnl),
11314
+ getPortfolioTimeSeries: bind(context, getPortfolioTimeSeries),
11278
11315
  getUDFConfig: bind(context, getUDFConfig),
11279
11316
  getUDFTime: bind(context, getUDFTime),
11280
11317
  getUDFSymbol: bind(context, getUDFSymbol),
@@ -25537,7 +25574,7 @@ function createDexWs(url, options) {
25537
25574
  }
25538
25575
 
25539
25576
  // src/index.ts
25540
- var SDK_VERSION = "0.0.2-alpha.25";
25577
+ var SDK_VERSION = "0.0.2-alpha.26";
25541
25578
  // Annotate the CommonJS export names for ESM import in node:
25542
25579
  0 && (module.exports = {
25543
25580
  AGENT_DEFAULTS,
@@ -25717,6 +25754,10 @@ var SDK_VERSION = "0.0.2-alpha.25";
25717
25754
  getOrderbookQueryLimitDefault,
25718
25755
  getOrderbookQueryLimitMax,
25719
25756
  getOrderbookResponseMarketIdRegExp,
25757
+ getPortfolioFlows,
25758
+ getPortfolioHoldings,
25759
+ getPortfolioPnl,
25760
+ getPortfolioTimeSeries,
25720
25761
  getStatsResponseMarketsItemBaseVolumeRegExp,
25721
25762
  getStatsResponseMarketsItemEstimatedFeeRegExp,
25722
25763
  getStatsResponseMarketsItemQuoteVolumeRegExp,