reportify-sdk 0.3.37 → 0.3.38

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.mts CHANGED
@@ -677,6 +677,12 @@ interface FactorComputeParams {
677
677
  startDate?: string;
678
678
  endDate?: string;
679
679
  }
680
+ interface FactorsComputeUploadParams {
681
+ file: File;
682
+ formula: string;
683
+ startDatetime?: string;
684
+ endDatetime?: string;
685
+ }
680
686
  interface ScreenParams {
681
687
  formula: string;
682
688
  market?: StockMarket;
@@ -939,6 +945,41 @@ declare class QuantModule {
939
945
  * ```
940
946
  */
941
947
  factorsCompute(params: FactorComputeParams): Promise<FactorComputeData[]>;
948
+ /**
949
+ * Upload an Excel file to compute factor values on custom OHLCV data
950
+ *
951
+ * Supports technical indicators only (MA, EMA, RSI, MACD, BOLL, KDJ, etc.).
952
+ * Financial factors (PE, ROE, INCOME.*, etc.) are NOT supported.
953
+ *
954
+ * Excel file format requirements:
955
+ * - Required columns: date, open, high, low, close
956
+ * - Optional columns: symbol (required for multi-symbol), volume
957
+ * - date column supports both daily (YYYY-MM-DD) and intraday (YYYY-MM-DD HH:MM:SS)
958
+ *
959
+ * @param params - Upload compute parameters
960
+ * @returns Array of factor data records
961
+ *
962
+ * @example
963
+ * ```typescript
964
+ * // Daily data
965
+ * const fileInput = document.getElementById('file') as HTMLInputElement;
966
+ * const df = await client.quant.factorsComputeUpload({
967
+ * file: fileInput.files[0],
968
+ * formula: 'RSI(14)',
969
+ * startDatetime: '2026-01-01',
970
+ * endDatetime: '2026-03-31'
971
+ * });
972
+ *
973
+ * // Minute K-line
974
+ * const df2 = await client.quant.factorsComputeUpload({
975
+ * file: fileInput.files[0],
976
+ * formula: 'MA(CLOSE, 20)',
977
+ * startDatetime: '2026-03-01 09:30:00',
978
+ * endDatetime: '2026-03-01 15:00:00'
979
+ * });
980
+ * ```
981
+ */
982
+ factorsComputeUpload(params: FactorsComputeUploadParams): Promise<FactorComputeData[]>;
942
983
  /**
943
984
  * Screen stocks based on factor formula
944
985
  *
@@ -2019,4 +2060,4 @@ declare class Reportify {
2019
2060
  getBytes(path: string): Promise<ArrayBuffer>;
2020
2061
  }
2021
2062
 
2022
- export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type BatchKlineParams, type BatchMinuteParams, type BatchOHLCVOutput, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CommodityData, type CommodityType, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeData, type FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, FollowingModule, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndustryConstituent, KBModule, type KBSearchOptions, type KlineParams, MacroModule, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };
2063
+ export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type BatchKlineParams, type BatchMinuteParams, type BatchOHLCVOutput, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CommodityData, type CommodityType, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeData, type FactorComputeParams, type FactorMeta, type FactorsComputeUploadParams, type FinancialStatement, type FollowedCompany, FollowingModule, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndustryConstituent, KBModule, type KBSearchOptions, type KlineParams, MacroModule, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };
package/dist/index.d.ts CHANGED
@@ -677,6 +677,12 @@ interface FactorComputeParams {
677
677
  startDate?: string;
678
678
  endDate?: string;
679
679
  }
680
+ interface FactorsComputeUploadParams {
681
+ file: File;
682
+ formula: string;
683
+ startDatetime?: string;
684
+ endDatetime?: string;
685
+ }
680
686
  interface ScreenParams {
681
687
  formula: string;
682
688
  market?: StockMarket;
@@ -939,6 +945,41 @@ declare class QuantModule {
939
945
  * ```
940
946
  */
941
947
  factorsCompute(params: FactorComputeParams): Promise<FactorComputeData[]>;
948
+ /**
949
+ * Upload an Excel file to compute factor values on custom OHLCV data
950
+ *
951
+ * Supports technical indicators only (MA, EMA, RSI, MACD, BOLL, KDJ, etc.).
952
+ * Financial factors (PE, ROE, INCOME.*, etc.) are NOT supported.
953
+ *
954
+ * Excel file format requirements:
955
+ * - Required columns: date, open, high, low, close
956
+ * - Optional columns: symbol (required for multi-symbol), volume
957
+ * - date column supports both daily (YYYY-MM-DD) and intraday (YYYY-MM-DD HH:MM:SS)
958
+ *
959
+ * @param params - Upload compute parameters
960
+ * @returns Array of factor data records
961
+ *
962
+ * @example
963
+ * ```typescript
964
+ * // Daily data
965
+ * const fileInput = document.getElementById('file') as HTMLInputElement;
966
+ * const df = await client.quant.factorsComputeUpload({
967
+ * file: fileInput.files[0],
968
+ * formula: 'RSI(14)',
969
+ * startDatetime: '2026-01-01',
970
+ * endDatetime: '2026-03-31'
971
+ * });
972
+ *
973
+ * // Minute K-line
974
+ * const df2 = await client.quant.factorsComputeUpload({
975
+ * file: fileInput.files[0],
976
+ * formula: 'MA(CLOSE, 20)',
977
+ * startDatetime: '2026-03-01 09:30:00',
978
+ * endDatetime: '2026-03-01 15:00:00'
979
+ * });
980
+ * ```
981
+ */
982
+ factorsComputeUpload(params: FactorsComputeUploadParams): Promise<FactorComputeData[]>;
942
983
  /**
943
984
  * Screen stocks based on factor formula
944
985
  *
@@ -2019,4 +2060,4 @@ declare class Reportify {
2019
2060
  getBytes(path: string): Promise<ArrayBuffer>;
2020
2061
  }
2021
2062
 
2022
- export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type BatchKlineParams, type BatchMinuteParams, type BatchOHLCVOutput, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CommodityData, type CommodityType, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeData, type FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, FollowingModule, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndustryConstituent, KBModule, type KBSearchOptions, type KlineParams, MacroModule, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };
2063
+ export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type BatchKlineParams, type BatchMinuteParams, type BatchOHLCVOutput, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CommodityData, type CommodityType, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeData, type FactorComputeParams, type FactorMeta, type FactorsComputeUploadParams, type FinancialStatement, type FollowedCompany, FollowingModule, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndustryConstituent, KBModule, type KBSearchOptions, type KlineParams, MacroModule, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };
package/dist/index.js CHANGED
@@ -701,6 +701,57 @@ var QuantModule = class {
701
701
  });
702
702
  return response.datas || [];
703
703
  }
704
+ /**
705
+ * Upload an Excel file to compute factor values on custom OHLCV data
706
+ *
707
+ * Supports technical indicators only (MA, EMA, RSI, MACD, BOLL, KDJ, etc.).
708
+ * Financial factors (PE, ROE, INCOME.*, etc.) are NOT supported.
709
+ *
710
+ * Excel file format requirements:
711
+ * - Required columns: date, open, high, low, close
712
+ * - Optional columns: symbol (required for multi-symbol), volume
713
+ * - date column supports both daily (YYYY-MM-DD) and intraday (YYYY-MM-DD HH:MM:SS)
714
+ *
715
+ * @param params - Upload compute parameters
716
+ * @returns Array of factor data records
717
+ *
718
+ * @example
719
+ * ```typescript
720
+ * // Daily data
721
+ * const fileInput = document.getElementById('file') as HTMLInputElement;
722
+ * const df = await client.quant.factorsComputeUpload({
723
+ * file: fileInput.files[0],
724
+ * formula: 'RSI(14)',
725
+ * startDatetime: '2026-01-01',
726
+ * endDatetime: '2026-03-31'
727
+ * });
728
+ *
729
+ * // Minute K-line
730
+ * const df2 = await client.quant.factorsComputeUpload({
731
+ * file: fileInput.files[0],
732
+ * formula: 'MA(CLOSE, 20)',
733
+ * startDatetime: '2026-03-01 09:30:00',
734
+ * endDatetime: '2026-03-01 15:00:00'
735
+ * });
736
+ * ```
737
+ */
738
+ async factorsComputeUpload(params) {
739
+ const formData = new FormData();
740
+ formData.append("file", params.file);
741
+ formData.append("formula", params.formula);
742
+ if (params.startDatetime !== void 0) {
743
+ formData.append("start_datetime", params.startDatetime);
744
+ }
745
+ if (params.endDatetime !== void 0) {
746
+ formData.append("end_datetime", params.endDatetime);
747
+ }
748
+ const response = await this.client.request(
749
+ "POST",
750
+ "/v1/quant/factors/compute/upload",
751
+ { formData }
752
+ );
753
+ return response.datas || [];
754
+ }
704
755
  /**
705
756
  * Screen stocks based on factor formula
706
757
  *
package/dist/index.mjs CHANGED
@@ -657,6 +657,57 @@ var QuantModule = class {
657
657
  });
658
658
  return response.datas || [];
659
659
  }
660
+ /**
661
+ * Upload an Excel file to compute factor values on custom OHLCV data
662
+ *
663
+ * Supports technical indicators only (MA, EMA, RSI, MACD, BOLL, KDJ, etc.).
664
+ * Financial factors (PE, ROE, INCOME.*, etc.) are NOT supported.
665
+ *
666
+ * Excel file format requirements:
667
+ * - Required columns: date, open, high, low, close
668
+ * - Optional columns: symbol (required for multi-symbol), volume
669
+ * - date column supports both daily (YYYY-MM-DD) and intraday (YYYY-MM-DD HH:MM:SS)
670
+ *
671
+ * @param params - Upload compute parameters
672
+ * @returns Array of factor data records
673
+ *
674
+ * @example
675
+ * ```typescript
676
+ * // Daily data
677
+ * const fileInput = document.getElementById('file') as HTMLInputElement;
678
+ * const df = await client.quant.factorsComputeUpload({
679
+ * file: fileInput.files[0],
680
+ * formula: 'RSI(14)',
681
+ * startDatetime: '2026-01-01',
682
+ * endDatetime: '2026-03-31'
683
+ * });
684
+ *
685
+ * // Minute K-line
686
+ * const df2 = await client.quant.factorsComputeUpload({
687
+ * file: fileInput.files[0],
688
+ * formula: 'MA(CLOSE, 20)',
689
+ * startDatetime: '2026-03-01 09:30:00',
690
+ * endDatetime: '2026-03-01 15:00:00'
691
+ * });
692
+ * ```
693
+ */
694
+ async factorsComputeUpload(params) {
695
+ const formData = new FormData();
696
+ formData.append("file", params.file);
697
+ formData.append("formula", params.formula);
698
+ if (params.startDatetime !== void 0) {
699
+ formData.append("start_datetime", params.startDatetime);
700
+ }
701
+ if (params.endDatetime !== void 0) {
702
+ formData.append("end_datetime", params.endDatetime);
703
+ }
704
+ const response = await this.client.request(
705
+ "POST",
706
+ "/v1/quant/factors/compute/upload",
707
+ { formData }
708
+ );
709
+ return response.datas || [];
710
+ }
660
711
  /**
661
712
  * Screen stocks based on factor formula
662
713
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reportify-sdk",
3
- "version": "0.3.37",
3
+ "version": "0.3.38",
4
4
  "description": "TypeScript SDK for Reportify API - Financial data and document search",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",