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.d.ts CHANGED
@@ -43,4 +43,5 @@ export * from "./rest/types";
43
43
  export * from "./rest/dex";
44
44
  export * from "./rest/dex-types.generated";
45
45
  export * as AultDex from "./rest/dex.generated";
46
+ export * from "./rest/portfolio";
46
47
  export * from "./ws";
package/dist/index.js CHANGED
@@ -10973,6 +10973,35 @@ var getOpenAPISpec = async (options) => {
10973
10973
  });
10974
10974
  };
10975
10975
 
10976
+ // src/rest/portfolio.ts
10977
+ var enc = (s) => encodeURIComponent(s);
10978
+ function getPortfolioHoldings(address, options) {
10979
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/holdings`, {
10980
+ ...options,
10981
+ method: "GET"
10982
+ });
10983
+ }
10984
+ function getPortfolioFlows(address, range, options) {
10985
+ const query = range ? `?range=${range}` : "";
10986
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/flows${query}`, {
10987
+ ...options,
10988
+ method: "GET"
10989
+ });
10990
+ }
10991
+ function getPortfolioPnl(address, range, options) {
10992
+ const query = range ? `?range=${range}` : "";
10993
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/pnl${query}`, {
10994
+ ...options,
10995
+ method: "GET"
10996
+ });
10997
+ }
10998
+ function getPortfolioTimeSeries(address, range = "day", options) {
10999
+ return dexFetch(
11000
+ `/api/v1/portfolio/${enc(address)}/time?range=${range}`,
11001
+ { ...options, method: "GET" }
11002
+ );
11003
+ }
11004
+
10976
11005
  // src/rest/dex.ts
10977
11006
  function bind(context, fn) {
10978
11007
  return ((...args) => {
@@ -10999,6 +11028,10 @@ function createDexApi(context) {
10999
11028
  listMyTrades: bind(context, listMyTrades),
11000
11029
  getBalance: bind(context, getBalance),
11001
11030
  getStats: bind(context, getStats),
11031
+ getPortfolioHoldings: bind(context, getPortfolioHoldings),
11032
+ getPortfolioFlows: bind(context, getPortfolioFlows),
11033
+ getPortfolioPnl: bind(context, getPortfolioPnl),
11034
+ getPortfolioTimeSeries: bind(context, getPortfolioTimeSeries),
11002
11035
  getUDFConfig: bind(context, getUDFConfig),
11003
11036
  getUDFTime: bind(context, getUDFTime),
11004
11037
  getUDFSymbol: bind(context, getUDFSymbol),
@@ -25261,7 +25294,7 @@ function createDexWs(url, options) {
25261
25294
  }
25262
25295
 
25263
25296
  // src/index.ts
25264
- var SDK_VERSION = "0.0.2-alpha.25";
25297
+ var SDK_VERSION = "0.0.2-alpha.26";
25265
25298
  export {
25266
25299
  AGENT_DEFAULTS,
25267
25300
  AULT_SIGNER_MARKER,
@@ -25440,6 +25473,10 @@ export {
25440
25473
  getOrderbookQueryLimitDefault,
25441
25474
  getOrderbookQueryLimitMax,
25442
25475
  getOrderbookResponseMarketIdRegExp,
25476
+ getPortfolioFlows,
25477
+ getPortfolioHoldings,
25478
+ getPortfolioPnl,
25479
+ getPortfolioTimeSeries,
25443
25480
  getStatsResponseMarketsItemBaseVolumeRegExp,
25444
25481
  getStatsResponseMarketsItemEstimatedFeeRegExp,
25445
25482
  getStatsResponseMarketsItemQuoteVolumeRegExp,