@adaptic/utils 0.0.359

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +824 -0
  2. package/dist/index.cjs +13641 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.mjs +13614 -0
  5. package/dist/index.mjs.map +1 -0
  6. package/dist/test.js +7336 -0
  7. package/dist/test.js.map +1 -0
  8. package/dist/types/adaptic.d.ts +18 -0
  9. package/dist/types/adaptic.d.ts.map +1 -0
  10. package/dist/types/alpaca-functions.d.ts +233 -0
  11. package/dist/types/alpaca-functions.d.ts.map +1 -0
  12. package/dist/types/alpaca-market-data-api.d.ts +371 -0
  13. package/dist/types/alpaca-market-data-api.d.ts.map +1 -0
  14. package/dist/types/alpaca-trading-api.d.ts +315 -0
  15. package/dist/types/alpaca-trading-api.d.ts.map +1 -0
  16. package/dist/types/alphavantage.d.ts +44 -0
  17. package/dist/types/alphavantage.d.ts.map +1 -0
  18. package/dist/types/crypto.d.ts +46 -0
  19. package/dist/types/crypto.d.ts.map +1 -0
  20. package/dist/types/display-manager.d.ts +24 -0
  21. package/dist/types/display-manager.d.ts.map +1 -0
  22. package/dist/types/format-tools.d.ts +54 -0
  23. package/dist/types/format-tools.d.ts.map +1 -0
  24. package/dist/types/index.d.ts +415 -0
  25. package/dist/types/index.d.ts.map +1 -0
  26. package/dist/types/logging.d.ts +12 -0
  27. package/dist/types/logging.d.ts.map +1 -0
  28. package/dist/types/market-hours.d.ts +24 -0
  29. package/dist/types/market-hours.d.ts.map +1 -0
  30. package/dist/types/market-time.d.ts +184 -0
  31. package/dist/types/market-time.d.ts.map +1 -0
  32. package/dist/types/metrics-calcs.d.ts +6 -0
  33. package/dist/types/metrics-calcs.d.ts.map +1 -0
  34. package/dist/types/misc-utils.d.ts +49 -0
  35. package/dist/types/misc-utils.d.ts.map +1 -0
  36. package/dist/types/performance-metrics.d.ts +88 -0
  37. package/dist/types/performance-metrics.d.ts.map +1 -0
  38. package/dist/types/polygon-indices.d.ts +85 -0
  39. package/dist/types/polygon-indices.d.ts.map +1 -0
  40. package/dist/types/polygon.d.ts +126 -0
  41. package/dist/types/polygon.d.ts.map +1 -0
  42. package/dist/types/price-utils.d.ts +26 -0
  43. package/dist/types/price-utils.d.ts.map +1 -0
  44. package/dist/types/technical-analysis.d.ts +90 -0
  45. package/dist/types/technical-analysis.d.ts.map +1 -0
  46. package/dist/types/test.d.ts +2 -0
  47. package/dist/types/test.d.ts.map +1 -0
  48. package/dist/types/testing/options-ws.d.ts +2 -0
  49. package/dist/types/testing/options-ws.d.ts.map +1 -0
  50. package/dist/types/time-utils.d.ts +17 -0
  51. package/dist/types/time-utils.d.ts.map +1 -0
  52. package/dist/types/types/adaptic-types.d.ts +11 -0
  53. package/dist/types/types/adaptic-types.d.ts.map +1 -0
  54. package/dist/types/types/alpaca-types.d.ts +998 -0
  55. package/dist/types/types/alpaca-types.d.ts.map +1 -0
  56. package/dist/types/types/alphavantage-types.d.ts +66 -0
  57. package/dist/types/types/alphavantage-types.d.ts.map +1 -0
  58. package/dist/types/types/index.d.ts +21 -0
  59. package/dist/types/types/index.d.ts.map +1 -0
  60. package/dist/types/types/logging-types.d.ts +10 -0
  61. package/dist/types/types/logging-types.d.ts.map +1 -0
  62. package/dist/types/types/market-time-types.d.ts +59 -0
  63. package/dist/types/types/market-time-types.d.ts.map +1 -0
  64. package/dist/types/types/metrics-types.d.ts +33 -0
  65. package/dist/types/types/metrics-types.d.ts.map +1 -0
  66. package/dist/types/types/polygon-indices-types.d.ts +190 -0
  67. package/dist/types/types/polygon-indices-types.d.ts.map +1 -0
  68. package/dist/types/types/polygon-types.d.ts +204 -0
  69. package/dist/types/types/polygon-types.d.ts.map +1 -0
  70. package/dist/types/types/ta-types.d.ts +89 -0
  71. package/dist/types/types/ta-types.d.ts.map +1 -0
  72. package/package.json +55 -0
@@ -0,0 +1,49 @@
1
+ declare const LOG_TYPES: readonly ["info", "warn", "error", "debug", "trace"];
2
+ type LogType = typeof LOG_TYPES[number];
3
+ /**
4
+ * Debug logging utility that respects environment debug flags.
5
+ * Logs messages to the console based on the specified log level.
6
+ *
7
+ * @param message - The message to log.
8
+ * @param data - Optional data to log alongside the message. This can be any type of data.
9
+ * @param type - Log level. One of: 'info' | 'warn' | 'error' | 'debug' | 'trace'. Defaults to 'info'.
10
+ *
11
+ * @example
12
+ * logIfDebug("User login failed", { userId: 123 }, "error");
13
+ * logIfDebug("Cache miss", undefined, "warn");
14
+ * logIfDebug("Processing request", { requestId: "abc" }, "debug");
15
+ */
16
+ export declare const logIfDebug: (message: string, data?: unknown, type?: LogType) => void;
17
+ /**
18
+ * Hides (masks) the value of any query parameter that is "apiKey" (case-insensitive),
19
+ * replacing the middle part with **** and keeping only the first 2 and last 2 characters.
20
+ *
21
+ * @param url - The URL containing the query parameters.
22
+ * @returns The URL with the masked API key.
23
+ *
24
+ * @example
25
+ * hideApiKeyFromurl("https://xxx.com/s/23/fdsa/?apiKey=12341239856677");
26
+ * // Returns "https://xxx.com/s/23/fdsa/?apiKey=12****77"
27
+ */
28
+ export declare function hideApiKeyFromurl(url: string): string;
29
+ /**
30
+ * Fetches a resource with intelligent retry logic for handling transient errors.
31
+ * Features enhanced error logging, rate limit detection, and adaptive backoff.
32
+ *
33
+ * @param url - The URL to fetch.
34
+ * @param options - Optional fetch options.
35
+ * @param retries - The number of retry attempts. Defaults to 3.
36
+ * @param initialBackoff - The initial backoff time in milliseconds. Defaults to 1000.
37
+ * @returns A promise that resolves to the response.
38
+ *
39
+ * @throws Will throw an error if the fetch fails after the specified number of retries.
40
+ */
41
+ export declare function fetchWithRetry(url: string, options?: RequestInit, retries?: number, initialBackoff?: number): Promise<Response>;
42
+ /**
43
+ * Validates a Polygon.io API key by making a test request.
44
+ * @param apiKey - The API key to validate.
45
+ * @returns Promise that resolves to true if valid, false otherwise.
46
+ */
47
+ export declare function validatePolygonApiKey(apiKey: string): Promise<boolean>;
48
+ export {};
49
+ //# sourceMappingURL=misc-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc-utils.d.ts","sourceRoot":"","sources":["../../src/misc-utils.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS,sDAAuD,CAAC;AAEvE,KAAK,OAAO,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,OAAO,OAAO,EACd,OAAM,OAAgB,SA0BvB,CAAC;AAqBF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBrD;AAyCD;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,WAAgB,EACzB,OAAO,GAAE,MAAU,EACnB,cAAc,GAAE,MAAa,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAsFnB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAe5E"}
@@ -0,0 +1,88 @@
1
+ import { PortfolioHistory, BenchmarkBar, CalculateBetaResult } from './types/alpaca-types';
2
+ import { PerformanceMetrics, FetchPerformanceMetricsProps } from './types/metrics-types';
3
+ /**
4
+ * Calculates the alpha, beta, and annualized Alpha of the portfolio compared to a benchmark.
5
+ * @param portfolioHistory - The portfolio history data.
6
+ * @param benchmarkBars - The historical price data of the benchmark.
7
+ * @returns An object containing alpha, beta, and annualized alpha.
8
+ */
9
+ export declare function calculateAlphaAndBeta(portfolioHistory: any, benchmarkBars: any[]): Promise<{
10
+ alpha: string;
11
+ alphaAnnualized: string;
12
+ beta: string;
13
+ }>;
14
+ interface DrawdownResult {
15
+ maxDrawdownPercentage: string;
16
+ maxDrawdownValue: number;
17
+ peakValue: number;
18
+ troughValue: number;
19
+ peakIndex: number;
20
+ troughIndex: number;
21
+ drawdownPeriod: number;
22
+ recoveryIndex?: number;
23
+ recoveryPeriod?: number;
24
+ currentDrawdownPercentage: string;
25
+ }
26
+ /**
27
+ * Calculates the Maximum Drawdown (MDD) and related metrics from an array of equity values.
28
+ *
29
+ * @param equity - An array of equity values (must contain at least one positive number)
30
+ * @param options - Configuration options for the calculation
31
+ * @returns Object containing drawdown metrics
32
+ * @throws Will throw an error if the input is invalid
33
+ */
34
+ export declare function calculateDrawdownMetrics(equity: number[], options?: {
35
+ decimals?: number;
36
+ minimumDrawdown?: number;
37
+ }): DrawdownResult;
38
+ /**
39
+ * Simplified version that returns only the maximum drawdown percentage
40
+ * For backward compatibility
41
+ * @param equity - An array of equity values.
42
+ * @param decimals - Number of decimal places for the percentage value.
43
+ * @returns The maximum drawdown percentage as a string.
44
+ */
45
+ export declare function calculateMaxDrawdown(equity: number[], decimals?: number): string;
46
+ /**
47
+ * Calculates daily log returns for an array of prices.
48
+ * Log returns are preferred for statistical properties.
49
+ * @param prices - Array of prices.
50
+ * @returns Array of daily log returns.
51
+ */
52
+ export declare function calculateDailyReturns(prices: number[]): number[];
53
+ /**
54
+ * Aligns portfolio and benchmark returns based on matching dates.
55
+ * @param portfolioHistory - The portfolio history data.
56
+ * @param benchmarkBars - The historical price data of the benchmark.
57
+ * @returns An object containing aligned returns arrays.
58
+ */
59
+ export declare function alignReturnsByDate(portfolioHistory: PortfolioHistory, benchmarkBars: BenchmarkBar[]): {
60
+ alignedPortfolioReturns: number[];
61
+ alignedBenchmarkReturns: number[];
62
+ };
63
+ /**
64
+ * Calculates the beta of the portfolio compared to a benchmark.
65
+ * @param portfolioReturns - Array of portfolio returns.
66
+ * @param benchmarkReturns - Array of benchmark returns.
67
+ * @returns An object containing beta and intermediate calculations.
68
+ */
69
+ export declare function calculateBetaFromReturns(portfolioReturns: number[], benchmarkReturns: number[]): CalculateBetaResult;
70
+ /**
71
+ * Calculates the information ratio of the portfolio compared to a benchmark.
72
+ * @param portfolioHistory - The portfolio history data.
73
+ * @param benchmarkBars - The historical price data of the benchmark.
74
+ * @returns Information ratio as a formatted string.
75
+ */
76
+ export declare function calculateInformationRatio(portfolioHistory: any, benchmarkBars: any[]): Promise<string>;
77
+ /**
78
+ * Fetches performance metrics for a given Alpaca account.
79
+ * @param params - The parameters for fetching performance metrics.
80
+ * @param client - The Apollo client instance.
81
+ * @param accountId - The ID of the Alpaca account.
82
+ * @param alpacaAccount - The Alpaca account object.
83
+ * @returns A promise that resolves to an object containing various performance metrics.
84
+ * @throws Will throw an error if required parameters are missing or if fetching fails.
85
+ */
86
+ export declare function fetchPerformanceMetrics({ params, client, accountId, alpacaAccount, }: FetchPerformanceMetricsProps): Promise<PerformanceMetrics>;
87
+ export {};
88
+ //# sourceMappingURL=performance-metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-metrics.d.ts","sourceRoot":"","sources":["../../src/performance-metrics.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAgF,MAAM,sBAAsB,CAAC;AAKjM,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AA0QzF;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,gBAAgB,EAAE,GAAG,EACrB,aAAa,EAAE,GAAG,EAAE,GACnB,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CA6LD;AAkCD,UAAU,cAAc;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CACrB,GACL,cAAc,CAwGhB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAGnF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAchE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,YAAY,EAAE,GAC5B;IAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAAC,uBAAuB,EAAE,MAAM,EAAE,CAAA;CAAE,CAkE1E;AA4DD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,mBAAmB,CAoDpH;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,gBAAgB,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAsF5G;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,MAAM,EACN,MAAM,EACN,SAAS,EACT,aAAa,GACd,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiI5D"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Polygon Indices API Implementation
3
+ *
4
+ * This module provides functions to interact with the Polygon.io Indices API.
5
+ */
6
+ import { PolygonIndicesAggregatesParams, PolygonIndicesAggregatesResponse, PolygonIndicesPrevCloseResponse, PolygonIndicesDailyOpenCloseResponse, PolygonIndicesSnapshotParams, PolygonIndicesSnapshotResponse } from './types';
7
+ /**
8
+ * Fetches aggregate bars for an index over a given date range in custom time window sizes.
9
+ *
10
+ * @param {PolygonIndicesAggregatesParams} params - Parameters for the aggregates request
11
+ * @param {Object} [options] - Optional parameters
12
+ * @param {string} [options.apiKey] - API key to use for the request
13
+ * @returns {Promise<PolygonIndicesAggregatesResponse>} The aggregates response
14
+ */
15
+ export declare const fetchIndicesAggregates: (params: PolygonIndicesAggregatesParams, options?: {
16
+ apiKey?: string;
17
+ }) => Promise<PolygonIndicesAggregatesResponse>;
18
+ /**
19
+ * Gets the previous day's open, high, low, and close (OHLC) for the specified index.
20
+ *
21
+ * @param {string} indicesTicker - The ticker symbol of the index
22
+ * @param {Object} [options] - Optional parameters
23
+ * @param {string} [options.apiKey] - API key to use for the request
24
+ * @returns {Promise<PolygonIndicesPrevCloseResponse>} The previous close response
25
+ */
26
+ export declare const fetchIndicesPreviousClose: (indicesTicker: string, options?: {
27
+ apiKey?: string;
28
+ }) => Promise<PolygonIndicesPrevCloseResponse>;
29
+ /**
30
+ * Gets the open, close and afterhours values of an index symbol on a certain date.
31
+ *
32
+ * @param {string} indicesTicker - The ticker symbol of the index
33
+ * @param {string} date - The date in YYYY-MM-DD format
34
+ * @param {Object} [options] - Optional parameters
35
+ * @param {string} [options.apiKey] - API key to use for the request
36
+ * @returns {Promise<PolygonIndicesDailyOpenCloseResponse>} The daily open/close response
37
+ */
38
+ export declare const fetchIndicesDailyOpenClose: (indicesTicker: string, date: string, options?: {
39
+ apiKey?: string;
40
+ }) => Promise<PolygonIndicesDailyOpenCloseResponse>;
41
+ /**
42
+ * Gets a snapshot of indices data for specified tickers.
43
+ *
44
+ * @param {PolygonIndicesSnapshotParams} [params] - Parameters for the snapshot request
45
+ * @param {Object} [options] - Optional parameters
46
+ * @param {string} [options.apiKey] - API key to use for the request
47
+ * @returns {Promise<PolygonIndicesSnapshotResponse>} The indices snapshot response
48
+ */
49
+ export declare const fetchIndicesSnapshot: (params?: PolygonIndicesSnapshotParams, options?: {
50
+ apiKey?: string;
51
+ }) => Promise<PolygonIndicesSnapshotResponse>;
52
+ /**
53
+ * Gets snapshots for assets of all types, including indices.
54
+ *
55
+ * @param {string[]} tickers - Array of tickers to fetch snapshots for
56
+ * @param {Object} [options] - Optional parameters
57
+ * @param {string} [options.apiKey] - API key to use for the request
58
+ * @param {string} [options.type] - Filter by asset type
59
+ * @param {string} [options.order] - Order results
60
+ * @param {number} [options.limit] - Limit the number of results
61
+ * @param {string} [options.sort] - Sort field
62
+ * @returns {Promise<any>} The universal snapshot response
63
+ */
64
+ export declare const fetchUniversalSnapshot: (tickers: string[], options?: {
65
+ apiKey?: string;
66
+ type?: string;
67
+ order?: string;
68
+ limit?: number;
69
+ sort?: string;
70
+ }) => Promise<any>;
71
+ /**
72
+ * Converts Polygon Indices bar data to a more standardized format
73
+ *
74
+ * @param {PolygonIndicesAggregatesResponse} data - The raw aggregates response
75
+ * @returns {Array<{date: string, open: number, high: number, low: number, close: number, timestamp: number}>} Formatted bar data
76
+ */
77
+ export declare const formatIndicesBarData: (data: PolygonIndicesAggregatesResponse) => Array<{
78
+ date: string;
79
+ open: number;
80
+ high: number;
81
+ low: number;
82
+ close: number;
83
+ timestamp: number;
84
+ }>;
85
+ //# sourceMappingURL=polygon-indices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon-indices.d.ts","sourceRoot":"","sources":["../../src/polygon-indices.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,+BAA+B,EAC/B,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAyBjB;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,8BAA8B,EACtC,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,gCAAgC,CAmC1C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,eAAe,MAAM,EACrB,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,+BAA+B,CAyBzC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GACrC,eAAe,MAAM,EACrB,MAAM,MAAM,EACZ,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,oCAAoC,CAyB9C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,4BAA4B,EACrC,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,8BAA8B,CAyCxC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,EAAE,EACjB,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,KACA,OAAO,CAAC,GAAG,CA6Cb,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,gCAAgC,KAAG,KAAK,CAAC;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAYA,CAAC"}
@@ -0,0 +1,126 @@
1
+ /**********************************************************************************
2
+ * Polygon.io calls
3
+ **********************************************************************************/
4
+ import { PolygonQuote, PolygonPriceData, PolygonGroupedDailyResponse, PolygonTickerInfo, PolygonDailyOpenClose, PolygonTradesResponse } from './types';
5
+ /**
6
+ * Fetches general information about a stock ticker.
7
+ * @param {string} symbol - The stock ticker symbol to fetch information for.
8
+ * @param {Object} [options] - Optional parameters.
9
+ * @param {string} [options.apiKey] - The API key to use for the request.
10
+ * @returns {Promise<PolygonTickerInfo | null>} The ticker information or null if not found.
11
+ */
12
+ export declare const fetchTickerInfo: (symbol: string, options?: {
13
+ apiKey?: string;
14
+ }) => Promise<PolygonTickerInfo | null>;
15
+ /**
16
+ * Fetches the last trade for a given stock ticker.
17
+ * @param {string} symbol - The stock ticker symbol to fetch the last trade for.
18
+ * @param {Object} [options] - Optional parameters.
19
+ * @param {string} [options.apiKey] - The API key to use for the request.
20
+ * @returns {Promise<PolygonQuote>} The last trade information.
21
+ */
22
+ export declare const fetchLastTrade: (symbol: string, options?: {
23
+ apiKey?: string;
24
+ }) => Promise<PolygonQuote>;
25
+ /**
26
+ * Fetches price data for a given stock ticker.
27
+ * @param {Object} params - The parameters for fetching price data.
28
+ * @param {string} params.ticker - The stock ticker symbol.
29
+ * @param {number} params.start - The start timestamp for fetching price data.
30
+ * @param {number} [params.end] - The end timestamp for fetching price data.
31
+ * @param {number} params.multiplier - The multiplier for the price data.
32
+ * @param {string} params.timespan - The timespan for the price data.
33
+ * @param {number} [params.limit] - The maximum number of price data points to fetch.
34
+ * @param {Object} [options] - Optional parameters.
35
+ * @param {string} [options.apiKey] - The API key to use for the request.
36
+ * @returns {Promise<PolygonPriceData[]>} The fetched price data.
37
+ */
38
+ export declare const fetchPrices: (params: {
39
+ ticker: string;
40
+ start: number;
41
+ end?: number;
42
+ multiplier: number;
43
+ timespan: string;
44
+ limit?: number;
45
+ }, options?: {
46
+ apiKey?: string;
47
+ }) => Promise<PolygonPriceData[]>;
48
+ /**
49
+ * Analyzes the price data for a given stock.
50
+ * @param {PolygonPriceData[]} priceData - The price data to analyze.
51
+ * @returns {string} The analysis report.
52
+ */
53
+ export declare function analysePolygonPriceData(priceData: PolygonPriceData[]): string;
54
+ /**
55
+ * Fetches grouped daily price data for a specific date.
56
+ * @param {string} date - The date to fetch grouped daily data for.
57
+ * @param {Object} [options] - Optional parameters.
58
+ * @param {string} [options.apiKey] - The API key to use for the request.
59
+ * @param {boolean} [options.adjusted] - Whether to adjust the data.
60
+ * @param {boolean} [options.includeOTC] - Whether to include OTC data.
61
+ * @returns {Promise<PolygonGroupedDailyResponse>} The grouped daily response.
62
+ */
63
+ export declare const fetchGroupedDaily: (date: string, options?: {
64
+ apiKey?: string;
65
+ adjusted?: boolean;
66
+ includeOTC?: boolean;
67
+ }) => Promise<PolygonGroupedDailyResponse>;
68
+ /**
69
+ * Formats the price data into a readable string.
70
+ * @param {PolygonPriceData[]} priceData - The price data to format.
71
+ * @returns {string} The formatted price data.
72
+ */
73
+ export declare function formatPriceData(priceData: PolygonPriceData[]): string;
74
+ export declare const fetchDailyOpenClose: (
75
+ /**
76
+ * Fetches the daily open and close data for a given stock ticker.
77
+ * @param {string} symbol - The stock ticker symbol to fetch data for.
78
+ * @param {Date} [date=new Date()] - The date to fetch data for.
79
+ * @param {Object} [options] - Optional parameters.
80
+ * @param {string} [options.apiKey] - The API key to use for the request.
81
+ * @param {boolean} [options.adjusted] - Whether to adjust the data.
82
+ * @returns {Promise<PolygonDailyOpenClose>} The daily open and close data.
83
+ */
84
+ symbol: string, date?: Date, options?: {
85
+ apiKey?: string;
86
+ adjusted?: boolean;
87
+ }) => Promise<PolygonDailyOpenClose>;
88
+ /**
89
+ * Gets the previous close price for a given stock ticker.
90
+ * @param {string} symbol - The stock ticker symbol to fetch the previous close for.
91
+ * @param {Date} [referenceDate] - The reference date to use for fetching the previous close.
92
+ * @returns {Promise<{ close: number; date: Date }>} The previous close price and date.
93
+ */
94
+ export declare function getPreviousClose(symbol: string, referenceDate?: Date, options?: {
95
+ apiKey?: string;
96
+ }): Promise<{
97
+ close: number;
98
+ date: Date;
99
+ }>;
100
+ /**
101
+ * Fetches trade data for a given stock ticker.
102
+ * @param {string} symbol - The stock ticker symbol to fetch trades for.
103
+ * @param {Object} [options] - Optional parameters.
104
+ * @param {string} [options.apiKey] - The API key to use for the request.
105
+ * @param {string | number} [options.timestamp] - The timestamp for fetching trades.
106
+ * @param {string | number} [options.timestampgt] - Greater than timestamp for fetching trades.
107
+ * @param {string | number} [options.timestampgte] - Greater than or equal to timestamp for fetching trades.
108
+ * @param {string | number} [options.timestamplt] - Less than timestamp for fetching trades.
109
+ * @param {string | number} [options.timestamplte] - Less than or equal to timestamp for fetching trades.
110
+ * @param {'asc' | 'desc'} [options.order] - The order of the trades.
111
+ * @param {number} [options.limit] - The maximum number of trades to fetch.
112
+ * @param {string} [options.sort] - The sort order for the trades.
113
+ * @returns {Promise<PolygonTradesResponse>} The fetched trades response.
114
+ */
115
+ export declare const fetchTrades: (symbol: string, options?: {
116
+ apiKey?: string;
117
+ timestamp?: string | number;
118
+ timestampgt?: string | number;
119
+ timestampgte?: string | number;
120
+ timestamplt?: string | number;
121
+ timestamplte?: string | number;
122
+ order?: "asc" | "desc";
123
+ limit?: number;
124
+ sort?: string;
125
+ }) => Promise<PolygonTradesResponse>;
126
+ //# sourceMappingURL=polygon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../src/polygon.ts"],"names":[],"mappings":"AAAA;;oFAEoF;AAGpF,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAE3B,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAYjB;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,iBAAiB,GAAG,IAAI,CA+ElC,CAAC;AAGF;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,GAAU,QAAQ,MAAM,EAAE,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,YAAY,CA6CxG,CAAC;AAGF;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,WAAW,GACtB,QAAQ;IACN,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,EACD,UAAU;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5B,OAAO,CAAC,gBAAgB,EAAE,CA4E5B,CAAC;AAEF;;;;GAIG;AAEH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAsC7E;AAID;;;;;;;;GAQG;AAEH,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,KACA,OAAO,CAAC,2BAA2B,CAwDrC,CAAC;AAEF;;;;GAIG;AAEH,wBAAgB,eAAe,CAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAkBrE;AAED,eAAO,MAAM,mBAAmB;AAChC;;;;;;;;GAQG;AAED,QAAQ,MAAM,EACd,OAAM,IAAiB,EACvB,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KACA,OAAO,CAAC,qBAAqB,CAsB/B,CAAC;AAIF;;;;;GAKG;AAEH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAUlJ;AAED;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,KACA,OAAO,CAAC,qBAAqB,CAkD/B,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { types } from "@adaptic/backend-legacy";
2
+ import { EquityPoint, AlpacaPortfolioHistory } from "./types/index";
3
+ import { MarketTimeUtil } from "./market-time";
4
+ export declare const computeTotalFees: (trade: types.Trade) => Promise<number>;
5
+ /**
6
+ * Rounds price based on value:
7
+ * - For prices >= $1, rounds to nearest $0.01
8
+ * - For prices < $1, rounds to nearest $0.0001
9
+ */
10
+ export declare function roundStockPrice(price: number): number;
11
+ export declare function getEquityValues(equityData: EquityPoint[], portfolioHistory?: AlpacaPortfolioHistory, marketTimeUtil?: MarketTimeUtil, period?: string): {
12
+ latestEquity: number;
13
+ initialEquity: number;
14
+ latestTimestamp?: undefined;
15
+ initialTimestamp?: undefined;
16
+ baseValueAsOf?: undefined;
17
+ baseValue?: undefined;
18
+ } | {
19
+ latestEquity: number;
20
+ initialEquity: number;
21
+ latestTimestamp: import("lightweight-charts").Time;
22
+ initialTimestamp: import("lightweight-charts").Time;
23
+ baseValueAsOf: string | undefined;
24
+ baseValue: number | undefined;
25
+ };
26
+ //# sourceMappingURL=price-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price-utils.d.ts","sourceRoot":"","sources":["../../src/price-utils.ts"],"names":[],"mappings":"AAEA,OAAgB,EAAS,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAe,cAAc,EAAE,MAAM,eAAe,CAAC;AAuE5D,eAAO,MAAM,gBAAgB,GAAU,OAAO,KAAK,CAAC,KAAK,KAAG,OAAO,CAAC,MAAM,CAezE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,WAAW,EAAE,EACzB,gBAAgB,CAAC,EAAE,sBAAsB,EACzC,cAAc,CAAC,EAAE,cAAc,EAC/B,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;;;;;EAgHhB"}
@@ -0,0 +1,90 @@
1
+ import { PolygonPriceData } from './types';
2
+ import { BollingerBandsData, BollingerBandsParams } from './types';
3
+ /**
4
+ * Calculates Bollinger Bands for a given set of price data.
5
+ * Bollinger Bands consist of a middle band (SMA) and two outer bands
6
+ * that are standard deviations away from the middle band.
7
+ *
8
+ * @param priceData - An array of price data objects containing closing prices.
9
+ * @param params - An object containing optional parameters for the calculation.
10
+ * @param params.period - The number of periods to use for the SMA (default is 20).
11
+ * @param params.standardDeviations - The number of standard deviations for the outer bands (default is 2).
12
+ * @returns An array of BollingerBandsData objects containing the calculated bands.
13
+ */
14
+ export declare function calculateBollingerBands(priceData: PolygonPriceData[], { period, standardDeviations }?: BollingerBandsParams): BollingerBandsData[];
15
+ import { EMAParams } from './types';
16
+ /**
17
+ * Calculates the Exponential Moving Average (EMA) for a given set of price data.
18
+ * The EMA gives more weight to recent prices, making it more responsive to new information.
19
+ *
20
+ * @param priceData - An array of price data objects containing closing prices.
21
+ * @param params - An object containing optional parameters for the calculation.
22
+ * @param params.period - The number of periods to use for the EMA (default is 20).
23
+ * @param params.period2 - An optional second period for a second EMA (default is 9).
24
+ * @returns An array of EMAData objects containing the calculated EMA values.
25
+ */
26
+ export declare function calculateEMA(priceData: PolygonPriceData[], { period, period2 }?: EMAParams): EMAData[];
27
+ import { FibonacciData, FibonacciParams } from './types';
28
+ /**
29
+ * Calculates Fibonacci retracement and extension levels based on price data.
30
+ * Fibonacci levels are used to identify potential support and resistance levels.
31
+ *
32
+ * @param priceData - An array of price data objects containing high and low prices.
33
+ * @param params - An object containing optional parameters for the calculation.
34
+ * @param params.lookbackPeriod - The number of periods to look back for swing high/low (default is 20).
35
+ * @param params.retracementLevels - An array of retracement levels to calculate (default is [0.236, 0.382, 0.5, 0.618, 0.786]).
36
+ * @param params.extensionLevels - An array of extension levels to calculate (default is [1.272, 1.618, 2.618]).
37
+ * @param params.reverseDirection - A boolean indicating if the trend is reversed (default is false).
38
+ * @returns An array of FibonacciData objects containing the calculated levels.
39
+ */
40
+ export declare function calculateFibonacciLevels(priceData: PolygonPriceData[], { lookbackPeriod, retracementLevels, extensionLevels, reverseDirection, }?: FibonacciParams): FibonacciData[];
41
+ import { MACDData, MACDParams, EMAData } from './types';
42
+ /**
43
+ * Calculates the Moving Average Convergence Divergence (MACD) for a given set of price data.
44
+ * MACD is a trend-following momentum indicator that shows the relationship between two EMAs.
45
+ *
46
+ * @param priceData - An array of price data objects containing closing prices.
47
+ * @param params - An object containing optional parameters for the calculation.
48
+ * @param params.shortPeriod - The short EMA period (default is 12).
49
+ * @param params.longPeriod - The long EMA period (default is 26).
50
+ * @param params.signalPeriod - The signal line period (default is 9).
51
+ * @returns An array of MACDData objects containing the calculated MACD values.
52
+ */
53
+ export declare function calculateMACD(priceData: PolygonPriceData[], { shortPeriod, longPeriod, signalPeriod }?: MACDParams): MACDData[];
54
+ import { RSIData, RSIParams } from './types';
55
+ /**
56
+ * Calculates the Relative Strength Index (RSI) for a given set of price data.
57
+ * RSI is a momentum oscillator that measures the speed and change of price movements.
58
+ *
59
+ * @param priceData - An array of price data objects containing closing prices.
60
+ * @param params - An object containing optional parameters for the calculation.
61
+ * @param params.period - The number of periods to use for the RSI (default is 14).
62
+ * @returns An array of RSIData objects containing the calculated RSI values.
63
+ */
64
+ export declare function calculateRSI(priceData: PolygonPriceData[], { period }?: RSIParams): RSIData[];
65
+ import { StochData, StochasticParams } from './types';
66
+ /**
67
+ * Calculates the Stochastic Oscillator for a given set of price data.
68
+ * The Stochastic Oscillator compares a particular closing price of a security to a range of its prices over a certain period of time.
69
+ *
70
+ * @param priceData - An array of price data objects containing high, low, and closing prices.
71
+ * @param params - An object containing optional parameters for the calculation.
72
+ * @param params.lookbackPeriod - The number of periods to look back for the calculation of %K (default is 5).
73
+ * @param params.signalPeriod - The number of periods for the %D signal line (default is 3).
74
+ * @param params.smoothingFactor - The smoothing factor for %K (default is 3).
75
+ * @returns An array of StochData objects containing the calculated %K and %D values.
76
+ */
77
+ export declare function calculateStochasticOscillator(priceData: PolygonPriceData[], { lookbackPeriod, signalPeriod, smoothingFactor }?: StochasticParams): StochData[];
78
+ import { SupportResistanceData, SupportResistanceParams } from './types';
79
+ /**
80
+ * Calculates support and resistance levels based on price data.
81
+ * Support and resistance levels are price levels at which a stock tends to stop and reverse.
82
+ *
83
+ * @param priceData - An array of price data objects containing high, low, and closing prices.
84
+ * @param params - An object containing optional parameters for the calculation.
85
+ * @param params.maxLevels - The maximum number of support/resistance levels to return (default is 5).
86
+ * @param params.lookbackPeriod - The number of periods to look back for pivot points (default is 10).
87
+ * @returns An array of SupportResistanceData objects containing the calculated levels.
88
+ */
89
+ export declare function calculateSupportAndResistance(priceData: PolygonPriceData[], { maxLevels, lookbackPeriod }?: SupportResistanceParams): SupportResistanceData[];
90
+ //# sourceMappingURL=technical-analysis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"technical-analysis.d.ts","sourceRoot":"","sources":["../../src/technical-analysis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGnE;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,EAAE,MAAW,EAAE,kBAAsB,EAAE,GAAE,oBAAyB,GACjE,kBAAkB,EAAE,CAoCtB;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAW,EAAE,OAAW,EAAE,GAAE,SAAc,GAAG,OAAO,EAAE,CA6DnH;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,EACE,cAAmB,EACnB,iBAAqD,EACrD,eAAuC,EACvC,gBAAwB,GACzB,GAAE,eAAoB,GACtB,aAAa,EAAE,CAuDjB;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,EAAE,WAAgB,EAAE,UAAe,EAAE,YAAgB,EAAE,GAAE,UAAe,GACvE,QAAQ,EAAE,CAmDZ;AAED,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAW,EAAE,GAAE,SAAc,GAAG,OAAO,EAAE,CAuDtG;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,gBAAgB,EAAE,EAC7B,EAAE,cAAkB,EAAE,YAAgB,EAAE,eAAmB,EAAE,GAAE,gBAAqB,GACnF,SAAS,EAAE,CA4Cb;AAED,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAA0B,MAAM,SAAS,CAAC;AAEjG;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,gBAAgB,EAAE,EAC7B,EAAE,SAAa,EAAE,cAAmB,EAAE,GAAE,uBAA4B,GACnE,qBAAqB,EAAE,CA8GzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=options-ws.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options-ws.d.ts","sourceRoot":"","sources":["../../../src/testing/options-ws.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export declare const toUnixTimestamp: (ts: string) => number;
2
+ export declare function getTimeAgo(dateString: string): string;
3
+ export declare function normalizeDate(timestamp: number): string;
4
+ export declare function calculateTimeRange(range: string): string;
5
+ export declare const calculateDaysLeft: (accountCreationDate: Date) => number;
6
+ export declare const timeAgo: (timestamp?: Date) => string;
7
+ export declare const formatDate: (dateString: string, updateDate?: boolean) => string;
8
+ export declare const formatDateToString: (date: Date) => string;
9
+ export declare const parseETDateFromAV: (dateString: string) => Date;
10
+ export declare const formatToUSEastern: (date: Date, justDate?: boolean) => string;
11
+ export declare const unixTimetoUSEastern: (timestamp: number) => {
12
+ date: Date;
13
+ timeString: string;
14
+ dateString: string;
15
+ };
16
+ export declare const timeDiffString: (milliseconds: number) => string;
17
+ //# sourceMappingURL=time-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-utils.d.ts","sourceRoot":"","sources":["../../src/time-utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,KAAG,MAE5C,CAAC;AAEF,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,UAiC5C;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGvD;AAGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UA2B/C;AAeD,eAAO,MAAM,iBAAiB,GAAI,qBAAqB,IAAI,KAAG,MAS7D,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,YAAY,IAAI,KAAG,MAe1C,CAAC;AAGF,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,EAAE,aAAa,OAAO,WAOlE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,KAAG,MAY/C,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,IActD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,WAAW,OAAO,KAAG,MAelE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAK3G,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,cAAc,MAAM,KAAG,MAerD,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface AssetOverview {
2
+ id: string;
3
+ symbol: string;
4
+ [key: string]: any;
5
+ }
6
+ export interface AssetOverviewResponse {
7
+ asset: AssetOverview | null;
8
+ error: string | null;
9
+ success: boolean;
10
+ }
11
+ //# sourceMappingURL=adaptic-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adaptic-types.d.ts","sourceRoot":"","sources":["../../../src/types/adaptic-types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB"}