reportify-sdk 0.3.30 → 0.3.31
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 +28 -21
- package/dist/index.d.ts +28 -21
- package/dist/index.js +29 -22
- package/dist/index.mjs +29 -22
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -742,17 +742,21 @@ interface BacktestParams {
|
|
|
742
742
|
autoClose?: boolean;
|
|
743
743
|
signalFactors?: Record<string, string>;
|
|
744
744
|
}
|
|
745
|
-
interface
|
|
745
|
+
interface KlineParams {
|
|
746
746
|
symbol: string;
|
|
747
|
-
|
|
748
|
-
endDateTime: string;
|
|
747
|
+
klineType?: '1M' | '5M' | '15M' | '30M' | '60M' | '1D' | '1W' | '1MO';
|
|
749
748
|
market?: StockMarket;
|
|
749
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
750
|
+
startDateTime?: string;
|
|
751
|
+
endDateTime?: string;
|
|
750
752
|
}
|
|
751
|
-
interface
|
|
753
|
+
interface BatchKlineParams {
|
|
752
754
|
symbols: string[];
|
|
753
|
-
|
|
754
|
-
endDateTime: string;
|
|
755
|
+
klineType?: '1M' | '5M' | '15M' | '30M' | '60M' | '1D' | '1W' | '1MO';
|
|
755
756
|
market?: StockMarket;
|
|
757
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
758
|
+
startDateTime?: string;
|
|
759
|
+
endDateTime?: string;
|
|
756
760
|
}
|
|
757
761
|
interface MinuteParams {
|
|
758
762
|
symbol: string;
|
|
@@ -973,37 +977,40 @@ declare class QuantModule {
|
|
|
973
977
|
/**
|
|
974
978
|
* Get 1-minute kline data for a single symbol
|
|
975
979
|
*
|
|
980
|
+
/**
|
|
981
|
+
* Get kline data for a single symbol (supports all periods)
|
|
982
|
+
*
|
|
976
983
|
* @param params - Kline parameters
|
|
977
|
-
* @returns Array of
|
|
984
|
+
* @returns Array of kline data
|
|
978
985
|
*
|
|
979
986
|
* @example
|
|
980
987
|
* ```typescript
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
*
|
|
988
|
+
* // Daily kline (default)
|
|
989
|
+
* const data = await client.quant.kline({ symbol: '000001' });
|
|
990
|
+
* // 5-minute intraday
|
|
991
|
+
* const data = await client.quant.kline({
|
|
992
|
+
* symbol: '000001', klineType: '5M',
|
|
993
|
+
* startDateTime: '2026-04-09 09:30:00',
|
|
994
|
+
* endDateTime: '2026-04-09 15:00:00'
|
|
985
995
|
* });
|
|
986
|
-
* console.log(data);
|
|
987
996
|
* ```
|
|
988
997
|
*/
|
|
989
|
-
|
|
998
|
+
kline(params: KlineParams): Promise<OHLCVData[]>;
|
|
990
999
|
/**
|
|
991
|
-
* Get
|
|
1000
|
+
* Get kline data for multiple symbols (supports all periods)
|
|
992
1001
|
*
|
|
993
1002
|
* @param params - Batch kline parameters
|
|
994
|
-
* @returns Array of
|
|
1003
|
+
* @returns Array of kline data
|
|
995
1004
|
*
|
|
996
1005
|
* @example
|
|
997
1006
|
* ```typescript
|
|
998
|
-
* const data = await client.quant.
|
|
1007
|
+
* const data = await client.quant.klineBatch({
|
|
999
1008
|
* symbols: ['000001', '600519'],
|
|
1000
|
-
*
|
|
1001
|
-
* endDateTime: '2024-01-01 15:00:00'
|
|
1009
|
+
* klineType: '1D'
|
|
1002
1010
|
* });
|
|
1003
|
-
* console.log(data);
|
|
1004
1011
|
* ```
|
|
1005
1012
|
*/
|
|
1006
|
-
|
|
1013
|
+
klineBatch(params: BatchKlineParams): Promise<OHLCVData[]>;
|
|
1007
1014
|
/**
|
|
1008
1015
|
* Get minute data for a single symbol
|
|
1009
1016
|
*
|
|
@@ -1987,4 +1994,4 @@ declare class Reportify {
|
|
|
1987
1994
|
getBytes(path: string): Promise<ArrayBuffer>;
|
|
1988
1995
|
}
|
|
1989
1996
|
|
|
1990
|
-
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type
|
|
1997
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -742,17 +742,21 @@ interface BacktestParams {
|
|
|
742
742
|
autoClose?: boolean;
|
|
743
743
|
signalFactors?: Record<string, string>;
|
|
744
744
|
}
|
|
745
|
-
interface
|
|
745
|
+
interface KlineParams {
|
|
746
746
|
symbol: string;
|
|
747
|
-
|
|
748
|
-
endDateTime: string;
|
|
747
|
+
klineType?: '1M' | '5M' | '15M' | '30M' | '60M' | '1D' | '1W' | '1MO';
|
|
749
748
|
market?: StockMarket;
|
|
749
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
750
|
+
startDateTime?: string;
|
|
751
|
+
endDateTime?: string;
|
|
750
752
|
}
|
|
751
|
-
interface
|
|
753
|
+
interface BatchKlineParams {
|
|
752
754
|
symbols: string[];
|
|
753
|
-
|
|
754
|
-
endDateTime: string;
|
|
755
|
+
klineType?: '1M' | '5M' | '15M' | '30M' | '60M' | '1D' | '1W' | '1MO';
|
|
755
756
|
market?: StockMarket;
|
|
757
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
758
|
+
startDateTime?: string;
|
|
759
|
+
endDateTime?: string;
|
|
756
760
|
}
|
|
757
761
|
interface MinuteParams {
|
|
758
762
|
symbol: string;
|
|
@@ -973,37 +977,40 @@ declare class QuantModule {
|
|
|
973
977
|
/**
|
|
974
978
|
* Get 1-minute kline data for a single symbol
|
|
975
979
|
*
|
|
980
|
+
/**
|
|
981
|
+
* Get kline data for a single symbol (supports all periods)
|
|
982
|
+
*
|
|
976
983
|
* @param params - Kline parameters
|
|
977
|
-
* @returns Array of
|
|
984
|
+
* @returns Array of kline data
|
|
978
985
|
*
|
|
979
986
|
* @example
|
|
980
987
|
* ```typescript
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
*
|
|
988
|
+
* // Daily kline (default)
|
|
989
|
+
* const data = await client.quant.kline({ symbol: '000001' });
|
|
990
|
+
* // 5-minute intraday
|
|
991
|
+
* const data = await client.quant.kline({
|
|
992
|
+
* symbol: '000001', klineType: '5M',
|
|
993
|
+
* startDateTime: '2026-04-09 09:30:00',
|
|
994
|
+
* endDateTime: '2026-04-09 15:00:00'
|
|
985
995
|
* });
|
|
986
|
-
* console.log(data);
|
|
987
996
|
* ```
|
|
988
997
|
*/
|
|
989
|
-
|
|
998
|
+
kline(params: KlineParams): Promise<OHLCVData[]>;
|
|
990
999
|
/**
|
|
991
|
-
* Get
|
|
1000
|
+
* Get kline data for multiple symbols (supports all periods)
|
|
992
1001
|
*
|
|
993
1002
|
* @param params - Batch kline parameters
|
|
994
|
-
* @returns Array of
|
|
1003
|
+
* @returns Array of kline data
|
|
995
1004
|
*
|
|
996
1005
|
* @example
|
|
997
1006
|
* ```typescript
|
|
998
|
-
* const data = await client.quant.
|
|
1007
|
+
* const data = await client.quant.klineBatch({
|
|
999
1008
|
* symbols: ['000001', '600519'],
|
|
1000
|
-
*
|
|
1001
|
-
* endDateTime: '2024-01-01 15:00:00'
|
|
1009
|
+
* klineType: '1D'
|
|
1002
1010
|
* });
|
|
1003
|
-
* console.log(data);
|
|
1004
1011
|
* ```
|
|
1005
1012
|
*/
|
|
1006
|
-
|
|
1013
|
+
klineBatch(params: BatchKlineParams): Promise<OHLCVData[]>;
|
|
1007
1014
|
/**
|
|
1008
1015
|
* Get minute data for a single symbol
|
|
1009
1016
|
*
|
|
@@ -1987,4 +1994,4 @@ declare class Reportify {
|
|
|
1987
1994
|
getBytes(path: string): Promise<ArrayBuffer>;
|
|
1988
1995
|
}
|
|
1989
1996
|
|
|
1990
|
-
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BacktestUploadParams, type
|
|
1997
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -788,50 +788,57 @@ var QuantModule = class {
|
|
|
788
788
|
/**
|
|
789
789
|
* Get 1-minute kline data for a single symbol
|
|
790
790
|
*
|
|
791
|
+
/**
|
|
792
|
+
* Get kline data for a single symbol (supports all periods)
|
|
793
|
+
*
|
|
791
794
|
* @param params - Kline parameters
|
|
792
|
-
* @returns Array of
|
|
795
|
+
* @returns Array of kline data
|
|
793
796
|
*
|
|
794
797
|
* @example
|
|
795
798
|
* ```typescript
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
799
|
+
* // Daily kline (default)
|
|
800
|
+
* const data = await client.quant.kline({ symbol: '000001' });
|
|
801
|
+
* // 5-minute intraday
|
|
802
|
+
* const data = await client.quant.kline({
|
|
803
|
+
* symbol: '000001', klineType: '5M',
|
|
804
|
+
* startDateTime: '2026-04-09 09:30:00',
|
|
805
|
+
* endDateTime: '2026-04-09 15:00:00'
|
|
800
806
|
* });
|
|
801
|
-
* console.log(data);
|
|
802
807
|
* ```
|
|
803
808
|
*/
|
|
804
|
-
async
|
|
805
|
-
const response = await this.client.get("/v1/quant/quotes/
|
|
809
|
+
async kline(params) {
|
|
810
|
+
const response = await this.client.get("/v1/quant/quotes/kline", {
|
|
806
811
|
symbol: params.symbol,
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
812
|
+
kline_type: params.klineType || "1D",
|
|
813
|
+
market: params.market || "cn",
|
|
814
|
+
...params.stockType && { stock_type: params.stockType },
|
|
815
|
+
...params.startDateTime && { start_datetime: params.startDateTime },
|
|
816
|
+
...params.endDateTime && { end_datetime: params.endDateTime }
|
|
810
817
|
});
|
|
811
818
|
return response.datas || [];
|
|
812
819
|
}
|
|
813
820
|
/**
|
|
814
|
-
* Get
|
|
821
|
+
* Get kline data for multiple symbols (supports all periods)
|
|
815
822
|
*
|
|
816
823
|
* @param params - Batch kline parameters
|
|
817
|
-
* @returns Array of
|
|
824
|
+
* @returns Array of kline data
|
|
818
825
|
*
|
|
819
826
|
* @example
|
|
820
827
|
* ```typescript
|
|
821
|
-
* const data = await client.quant.
|
|
828
|
+
* const data = await client.quant.klineBatch({
|
|
822
829
|
* symbols: ['000001', '600519'],
|
|
823
|
-
*
|
|
824
|
-
* endDateTime: '2024-01-01 15:00:00'
|
|
830
|
+
* klineType: '1D'
|
|
825
831
|
* });
|
|
826
|
-
* console.log(data);
|
|
827
832
|
* ```
|
|
828
833
|
*/
|
|
829
|
-
async
|
|
830
|
-
const response = await this.client.post("/v1/quant/quotes/
|
|
834
|
+
async klineBatch(params) {
|
|
835
|
+
const response = await this.client.post("/v1/quant/quotes/kline/batch", {
|
|
831
836
|
symbols: params.symbols,
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
837
|
+
kline_type: params.klineType || "1D",
|
|
838
|
+
market: params.market || "cn",
|
|
839
|
+
...params.stockType && { stock_type: params.stockType },
|
|
840
|
+
...params.startDateTime && { start_datetime: params.startDateTime },
|
|
841
|
+
...params.endDateTime && { end_datetime: params.endDateTime }
|
|
835
842
|
});
|
|
836
843
|
return response.datas || [];
|
|
837
844
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -744,50 +744,57 @@ var QuantModule = class {
|
|
|
744
744
|
/**
|
|
745
745
|
* Get 1-minute kline data for a single symbol
|
|
746
746
|
*
|
|
747
|
+
/**
|
|
748
|
+
* Get kline data for a single symbol (supports all periods)
|
|
749
|
+
*
|
|
747
750
|
* @param params - Kline parameters
|
|
748
|
-
* @returns Array of
|
|
751
|
+
* @returns Array of kline data
|
|
749
752
|
*
|
|
750
753
|
* @example
|
|
751
754
|
* ```typescript
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
755
|
+
* // Daily kline (default)
|
|
756
|
+
* const data = await client.quant.kline({ symbol: '000001' });
|
|
757
|
+
* // 5-minute intraday
|
|
758
|
+
* const data = await client.quant.kline({
|
|
759
|
+
* symbol: '000001', klineType: '5M',
|
|
760
|
+
* startDateTime: '2026-04-09 09:30:00',
|
|
761
|
+
* endDateTime: '2026-04-09 15:00:00'
|
|
756
762
|
* });
|
|
757
|
-
* console.log(data);
|
|
758
763
|
* ```
|
|
759
764
|
*/
|
|
760
|
-
async
|
|
761
|
-
const response = await this.client.get("/v1/quant/quotes/
|
|
765
|
+
async kline(params) {
|
|
766
|
+
const response = await this.client.get("/v1/quant/quotes/kline", {
|
|
762
767
|
symbol: params.symbol,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
768
|
+
kline_type: params.klineType || "1D",
|
|
769
|
+
market: params.market || "cn",
|
|
770
|
+
...params.stockType && { stock_type: params.stockType },
|
|
771
|
+
...params.startDateTime && { start_datetime: params.startDateTime },
|
|
772
|
+
...params.endDateTime && { end_datetime: params.endDateTime }
|
|
766
773
|
});
|
|
767
774
|
return response.datas || [];
|
|
768
775
|
}
|
|
769
776
|
/**
|
|
770
|
-
* Get
|
|
777
|
+
* Get kline data for multiple symbols (supports all periods)
|
|
771
778
|
*
|
|
772
779
|
* @param params - Batch kline parameters
|
|
773
|
-
* @returns Array of
|
|
780
|
+
* @returns Array of kline data
|
|
774
781
|
*
|
|
775
782
|
* @example
|
|
776
783
|
* ```typescript
|
|
777
|
-
* const data = await client.quant.
|
|
784
|
+
* const data = await client.quant.klineBatch({
|
|
778
785
|
* symbols: ['000001', '600519'],
|
|
779
|
-
*
|
|
780
|
-
* endDateTime: '2024-01-01 15:00:00'
|
|
786
|
+
* klineType: '1D'
|
|
781
787
|
* });
|
|
782
|
-
* console.log(data);
|
|
783
788
|
* ```
|
|
784
789
|
*/
|
|
785
|
-
async
|
|
786
|
-
const response = await this.client.post("/v1/quant/quotes/
|
|
790
|
+
async klineBatch(params) {
|
|
791
|
+
const response = await this.client.post("/v1/quant/quotes/kline/batch", {
|
|
787
792
|
symbols: params.symbols,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
793
|
+
kline_type: params.klineType || "1D",
|
|
794
|
+
market: params.market || "cn",
|
|
795
|
+
...params.stockType && { stock_type: params.stockType },
|
|
796
|
+
...params.startDateTime && { start_datetime: params.startDateTime },
|
|
797
|
+
...params.endDateTime && { end_datetime: params.endDateTime }
|
|
791
798
|
});
|
|
792
799
|
return response.datas || [];
|
|
793
800
|
}
|