reportify-sdk 0.3.16 → 0.3.18
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 +100 -4
- package/dist/index.d.ts +100 -4
- package/dist/index.js +104 -4
- package/dist/index.mjs +104 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -734,6 +734,30 @@ interface BacktestParams {
|
|
|
734
734
|
autoClose?: boolean;
|
|
735
735
|
labels?: Record<string, string>;
|
|
736
736
|
}
|
|
737
|
+
interface Kline1mParams {
|
|
738
|
+
symbol: string;
|
|
739
|
+
startDateTime: string;
|
|
740
|
+
endDateTime: string;
|
|
741
|
+
market?: StockMarket;
|
|
742
|
+
}
|
|
743
|
+
interface BatchKline1mParams {
|
|
744
|
+
symbols: string[];
|
|
745
|
+
startDateTime: string;
|
|
746
|
+
endDateTime: string;
|
|
747
|
+
market?: StockMarket;
|
|
748
|
+
}
|
|
749
|
+
interface MinuteParams {
|
|
750
|
+
symbol: string;
|
|
751
|
+
startDateTime: string;
|
|
752
|
+
endDateTime: string;
|
|
753
|
+
market?: StockMarket;
|
|
754
|
+
}
|
|
755
|
+
interface BatchMinuteParams {
|
|
756
|
+
symbols: string[];
|
|
757
|
+
startDateTime: string;
|
|
758
|
+
endDateTime: string;
|
|
759
|
+
market?: StockMarket;
|
|
760
|
+
}
|
|
737
761
|
interface BacktestResult {
|
|
738
762
|
success: boolean;
|
|
739
763
|
initial_cash: number;
|
|
@@ -936,6 +960,74 @@ declare class QuantModule {
|
|
|
936
960
|
* ```
|
|
937
961
|
*/
|
|
938
962
|
ohlcvBatch(params: BatchOHLCVParams): Promise<OHLCVData[]>;
|
|
963
|
+
/**
|
|
964
|
+
* Get 1-minute kline data for a single symbol
|
|
965
|
+
*
|
|
966
|
+
* @param params - Kline parameters
|
|
967
|
+
* @returns Array of 1-minute kline data
|
|
968
|
+
*
|
|
969
|
+
* @example
|
|
970
|
+
* ```typescript
|
|
971
|
+
* const data = await client.quant.kline1m({
|
|
972
|
+
* symbol: '000001',
|
|
973
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
974
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
975
|
+
* });
|
|
976
|
+
* console.log(data);
|
|
977
|
+
* ```
|
|
978
|
+
*/
|
|
979
|
+
kline1m(params: Kline1mParams): Promise<OHLCVData[]>;
|
|
980
|
+
/**
|
|
981
|
+
* Get batch 1-minute kline data for multiple symbols
|
|
982
|
+
*
|
|
983
|
+
* @param params - Batch kline parameters
|
|
984
|
+
* @returns Array of 1-minute kline data sorted by date (ascending), then by symbol
|
|
985
|
+
*
|
|
986
|
+
* @example
|
|
987
|
+
* ```typescript
|
|
988
|
+
* const data = await client.quant.kline1mBatch({
|
|
989
|
+
* symbols: ['000001', '600519'],
|
|
990
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
991
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
992
|
+
* });
|
|
993
|
+
* console.log(data);
|
|
994
|
+
* ```
|
|
995
|
+
*/
|
|
996
|
+
kline1mBatch(params: BatchKline1mParams): Promise<OHLCVData[]>;
|
|
997
|
+
/**
|
|
998
|
+
* Get minute data for a single symbol
|
|
999
|
+
*
|
|
1000
|
+
* @param params - Minute parameters
|
|
1001
|
+
* @returns Array of minute data
|
|
1002
|
+
*
|
|
1003
|
+
* @example
|
|
1004
|
+
* ```typescript
|
|
1005
|
+
* const data = await client.quant.minute({
|
|
1006
|
+
* symbol: '000001',
|
|
1007
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
1008
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
1009
|
+
* });
|
|
1010
|
+
* console.log(data);
|
|
1011
|
+
* ```
|
|
1012
|
+
*/
|
|
1013
|
+
minute(params: MinuteParams): Promise<OHLCVData[]>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Get batch minute data for multiple symbols
|
|
1016
|
+
*
|
|
1017
|
+
* @param params - Batch minute parameters
|
|
1018
|
+
* @returns Array of minute data sorted by date (ascending), then by symbol
|
|
1019
|
+
*
|
|
1020
|
+
* @example
|
|
1021
|
+
* ```typescript
|
|
1022
|
+
* const data = await client.quant.minuteBatch({
|
|
1023
|
+
* symbols: ['000001', '600519'],
|
|
1024
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
1025
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
1026
|
+
* });
|
|
1027
|
+
* console.log(data);
|
|
1028
|
+
* ```
|
|
1029
|
+
*/
|
|
1030
|
+
minuteBatch(params: BatchMinuteParams): Promise<OHLCVData[]>;
|
|
939
1031
|
/**
|
|
940
1032
|
* Execute strategy backtest
|
|
941
1033
|
*
|
|
@@ -1480,6 +1572,10 @@ declare class UserModule {
|
|
|
1480
1572
|
group_id: string;
|
|
1481
1573
|
name: string;
|
|
1482
1574
|
count: number;
|
|
1575
|
+
follow_values: Array<{
|
|
1576
|
+
follow_type: number;
|
|
1577
|
+
follow_value: string;
|
|
1578
|
+
}>;
|
|
1483
1579
|
}>;
|
|
1484
1580
|
/**
|
|
1485
1581
|
* Update a follow group
|
|
@@ -1534,15 +1630,15 @@ declare class UserModule {
|
|
|
1534
1630
|
* Remove follows from a group
|
|
1535
1631
|
*
|
|
1536
1632
|
* @param groupId - Group ID
|
|
1537
|
-
* @param
|
|
1633
|
+
* @param followValues - List of follow values to remove (e.g., stock symbols, channel IDs)
|
|
1538
1634
|
* @returns Status message
|
|
1539
1635
|
*
|
|
1540
1636
|
* @example
|
|
1541
1637
|
* ```typescript
|
|
1542
|
-
* await client.user.removeFollowsFromGroup('group_123', ['
|
|
1638
|
+
* await client.user.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
|
|
1543
1639
|
* ```
|
|
1544
1640
|
*/
|
|
1545
|
-
removeFollowsFromGroup(groupId: string,
|
|
1641
|
+
removeFollowsFromGroup(groupId: string, followValues: string[]): Promise<void>;
|
|
1546
1642
|
/**
|
|
1547
1643
|
* Set follows for a group (replace all existing follows)
|
|
1548
1644
|
*
|
|
@@ -1758,4 +1854,4 @@ declare class Reportify {
|
|
|
1758
1854
|
getBytes(path: string): Promise<ArrayBuffer>;
|
|
1759
1855
|
}
|
|
1760
1856
|
|
|
1761
|
-
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, 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 FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Market, 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 };
|
|
1857
|
+
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchKline1mParams, type BatchMinuteParams, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, 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 FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Kline1mParams, 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
|
@@ -734,6 +734,30 @@ interface BacktestParams {
|
|
|
734
734
|
autoClose?: boolean;
|
|
735
735
|
labels?: Record<string, string>;
|
|
736
736
|
}
|
|
737
|
+
interface Kline1mParams {
|
|
738
|
+
symbol: string;
|
|
739
|
+
startDateTime: string;
|
|
740
|
+
endDateTime: string;
|
|
741
|
+
market?: StockMarket;
|
|
742
|
+
}
|
|
743
|
+
interface BatchKline1mParams {
|
|
744
|
+
symbols: string[];
|
|
745
|
+
startDateTime: string;
|
|
746
|
+
endDateTime: string;
|
|
747
|
+
market?: StockMarket;
|
|
748
|
+
}
|
|
749
|
+
interface MinuteParams {
|
|
750
|
+
symbol: string;
|
|
751
|
+
startDateTime: string;
|
|
752
|
+
endDateTime: string;
|
|
753
|
+
market?: StockMarket;
|
|
754
|
+
}
|
|
755
|
+
interface BatchMinuteParams {
|
|
756
|
+
symbols: string[];
|
|
757
|
+
startDateTime: string;
|
|
758
|
+
endDateTime: string;
|
|
759
|
+
market?: StockMarket;
|
|
760
|
+
}
|
|
737
761
|
interface BacktestResult {
|
|
738
762
|
success: boolean;
|
|
739
763
|
initial_cash: number;
|
|
@@ -936,6 +960,74 @@ declare class QuantModule {
|
|
|
936
960
|
* ```
|
|
937
961
|
*/
|
|
938
962
|
ohlcvBatch(params: BatchOHLCVParams): Promise<OHLCVData[]>;
|
|
963
|
+
/**
|
|
964
|
+
* Get 1-minute kline data for a single symbol
|
|
965
|
+
*
|
|
966
|
+
* @param params - Kline parameters
|
|
967
|
+
* @returns Array of 1-minute kline data
|
|
968
|
+
*
|
|
969
|
+
* @example
|
|
970
|
+
* ```typescript
|
|
971
|
+
* const data = await client.quant.kline1m({
|
|
972
|
+
* symbol: '000001',
|
|
973
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
974
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
975
|
+
* });
|
|
976
|
+
* console.log(data);
|
|
977
|
+
* ```
|
|
978
|
+
*/
|
|
979
|
+
kline1m(params: Kline1mParams): Promise<OHLCVData[]>;
|
|
980
|
+
/**
|
|
981
|
+
* Get batch 1-minute kline data for multiple symbols
|
|
982
|
+
*
|
|
983
|
+
* @param params - Batch kline parameters
|
|
984
|
+
* @returns Array of 1-minute kline data sorted by date (ascending), then by symbol
|
|
985
|
+
*
|
|
986
|
+
* @example
|
|
987
|
+
* ```typescript
|
|
988
|
+
* const data = await client.quant.kline1mBatch({
|
|
989
|
+
* symbols: ['000001', '600519'],
|
|
990
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
991
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
992
|
+
* });
|
|
993
|
+
* console.log(data);
|
|
994
|
+
* ```
|
|
995
|
+
*/
|
|
996
|
+
kline1mBatch(params: BatchKline1mParams): Promise<OHLCVData[]>;
|
|
997
|
+
/**
|
|
998
|
+
* Get minute data for a single symbol
|
|
999
|
+
*
|
|
1000
|
+
* @param params - Minute parameters
|
|
1001
|
+
* @returns Array of minute data
|
|
1002
|
+
*
|
|
1003
|
+
* @example
|
|
1004
|
+
* ```typescript
|
|
1005
|
+
* const data = await client.quant.minute({
|
|
1006
|
+
* symbol: '000001',
|
|
1007
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
1008
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
1009
|
+
* });
|
|
1010
|
+
* console.log(data);
|
|
1011
|
+
* ```
|
|
1012
|
+
*/
|
|
1013
|
+
minute(params: MinuteParams): Promise<OHLCVData[]>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Get batch minute data for multiple symbols
|
|
1016
|
+
*
|
|
1017
|
+
* @param params - Batch minute parameters
|
|
1018
|
+
* @returns Array of minute data sorted by date (ascending), then by symbol
|
|
1019
|
+
*
|
|
1020
|
+
* @example
|
|
1021
|
+
* ```typescript
|
|
1022
|
+
* const data = await client.quant.minuteBatch({
|
|
1023
|
+
* symbols: ['000001', '600519'],
|
|
1024
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
1025
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
1026
|
+
* });
|
|
1027
|
+
* console.log(data);
|
|
1028
|
+
* ```
|
|
1029
|
+
*/
|
|
1030
|
+
minuteBatch(params: BatchMinuteParams): Promise<OHLCVData[]>;
|
|
939
1031
|
/**
|
|
940
1032
|
* Execute strategy backtest
|
|
941
1033
|
*
|
|
@@ -1480,6 +1572,10 @@ declare class UserModule {
|
|
|
1480
1572
|
group_id: string;
|
|
1481
1573
|
name: string;
|
|
1482
1574
|
count: number;
|
|
1575
|
+
follow_values: Array<{
|
|
1576
|
+
follow_type: number;
|
|
1577
|
+
follow_value: string;
|
|
1578
|
+
}>;
|
|
1483
1579
|
}>;
|
|
1484
1580
|
/**
|
|
1485
1581
|
* Update a follow group
|
|
@@ -1534,15 +1630,15 @@ declare class UserModule {
|
|
|
1534
1630
|
* Remove follows from a group
|
|
1535
1631
|
*
|
|
1536
1632
|
* @param groupId - Group ID
|
|
1537
|
-
* @param
|
|
1633
|
+
* @param followValues - List of follow values to remove (e.g., stock symbols, channel IDs)
|
|
1538
1634
|
* @returns Status message
|
|
1539
1635
|
*
|
|
1540
1636
|
* @example
|
|
1541
1637
|
* ```typescript
|
|
1542
|
-
* await client.user.removeFollowsFromGroup('group_123', ['
|
|
1638
|
+
* await client.user.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
|
|
1543
1639
|
* ```
|
|
1544
1640
|
*/
|
|
1545
|
-
removeFollowsFromGroup(groupId: string,
|
|
1641
|
+
removeFollowsFromGroup(groupId: string, followValues: string[]): Promise<void>;
|
|
1546
1642
|
/**
|
|
1547
1643
|
* Set follows for a group (replace all existing follows)
|
|
1548
1644
|
*
|
|
@@ -1758,4 +1854,4 @@ declare class Reportify {
|
|
|
1758
1854
|
getBytes(path: string): Promise<ArrayBuffer>;
|
|
1759
1855
|
}
|
|
1760
1856
|
|
|
1761
|
-
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, 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 FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Market, 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 };
|
|
1857
|
+
export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchKline1mParams, type BatchMinuteParams, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, 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 FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Kline1mParams, 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
|
@@ -834,6 +834,106 @@ var QuantModule = class {
|
|
|
834
834
|
});
|
|
835
835
|
return response.datas || [];
|
|
836
836
|
}
|
|
837
|
+
/**
|
|
838
|
+
* Get 1-minute kline data for a single symbol
|
|
839
|
+
*
|
|
840
|
+
* @param params - Kline parameters
|
|
841
|
+
* @returns Array of 1-minute kline data
|
|
842
|
+
*
|
|
843
|
+
* @example
|
|
844
|
+
* ```typescript
|
|
845
|
+
* const data = await client.quant.kline1m({
|
|
846
|
+
* symbol: '000001',
|
|
847
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
848
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
849
|
+
* });
|
|
850
|
+
* console.log(data);
|
|
851
|
+
* ```
|
|
852
|
+
*/
|
|
853
|
+
async kline1m(params) {
|
|
854
|
+
const response = await this.client.post("/v1/quant/quotes/1mkline", {
|
|
855
|
+
symbol: params.symbol,
|
|
856
|
+
start_datetime: params.startDateTime,
|
|
857
|
+
end_datetime: params.endDateTime,
|
|
858
|
+
market: params.market || "cn"
|
|
859
|
+
});
|
|
860
|
+
return response.datas || [];
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Get batch 1-minute kline data for multiple symbols
|
|
864
|
+
*
|
|
865
|
+
* @param params - Batch kline parameters
|
|
866
|
+
* @returns Array of 1-minute kline data sorted by date (ascending), then by symbol
|
|
867
|
+
*
|
|
868
|
+
* @example
|
|
869
|
+
* ```typescript
|
|
870
|
+
* const data = await client.quant.kline1mBatch({
|
|
871
|
+
* symbols: ['000001', '600519'],
|
|
872
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
873
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
874
|
+
* });
|
|
875
|
+
* console.log(data);
|
|
876
|
+
* ```
|
|
877
|
+
*/
|
|
878
|
+
async kline1mBatch(params) {
|
|
879
|
+
const response = await this.client.post("/v1/quant/quotes/1mkline/batch", {
|
|
880
|
+
symbols: params.symbols,
|
|
881
|
+
start_datetime: params.startDateTime,
|
|
882
|
+
end_datetime: params.endDateTime,
|
|
883
|
+
market: params.market || "cn"
|
|
884
|
+
});
|
|
885
|
+
return response.datas || [];
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Get minute data for a single symbol
|
|
889
|
+
*
|
|
890
|
+
* @param params - Minute parameters
|
|
891
|
+
* @returns Array of minute data
|
|
892
|
+
*
|
|
893
|
+
* @example
|
|
894
|
+
* ```typescript
|
|
895
|
+
* const data = await client.quant.minute({
|
|
896
|
+
* symbol: '000001',
|
|
897
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
898
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
899
|
+
* });
|
|
900
|
+
* console.log(data);
|
|
901
|
+
* ```
|
|
902
|
+
*/
|
|
903
|
+
async minute(params) {
|
|
904
|
+
const response = await this.client.post("/v1/quant/quotes/minute", {
|
|
905
|
+
symbol: params.symbol,
|
|
906
|
+
start_datetime: params.startDateTime,
|
|
907
|
+
end_datetime: params.endDateTime,
|
|
908
|
+
market: params.market || "cn"
|
|
909
|
+
});
|
|
910
|
+
return response.datas || [];
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Get batch minute data for multiple symbols
|
|
914
|
+
*
|
|
915
|
+
* @param params - Batch minute parameters
|
|
916
|
+
* @returns Array of minute data sorted by date (ascending), then by symbol
|
|
917
|
+
*
|
|
918
|
+
* @example
|
|
919
|
+
* ```typescript
|
|
920
|
+
* const data = await client.quant.minuteBatch({
|
|
921
|
+
* symbols: ['000001', '600519'],
|
|
922
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
923
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
924
|
+
* });
|
|
925
|
+
* console.log(data);
|
|
926
|
+
* ```
|
|
927
|
+
*/
|
|
928
|
+
async minuteBatch(params) {
|
|
929
|
+
const response = await this.client.post("/v1/quant/quotes/minute/batch", {
|
|
930
|
+
symbols: params.symbols,
|
|
931
|
+
start_datetime: params.startDateTime,
|
|
932
|
+
end_datetime: params.endDateTime,
|
|
933
|
+
market: params.market || "cn"
|
|
934
|
+
});
|
|
935
|
+
return response.datas || [];
|
|
936
|
+
}
|
|
837
937
|
// ===========================================================================
|
|
838
938
|
// Backtest
|
|
839
939
|
// ===========================================================================
|
|
@@ -1582,18 +1682,18 @@ var UserModule = class {
|
|
|
1582
1682
|
* Remove follows from a group
|
|
1583
1683
|
*
|
|
1584
1684
|
* @param groupId - Group ID
|
|
1585
|
-
* @param
|
|
1685
|
+
* @param followValues - List of follow values to remove (e.g., stock symbols, channel IDs)
|
|
1586
1686
|
* @returns Status message
|
|
1587
1687
|
*
|
|
1588
1688
|
* @example
|
|
1589
1689
|
* ```typescript
|
|
1590
|
-
* await client.user.removeFollowsFromGroup('group_123', ['
|
|
1690
|
+
* await client.user.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
|
|
1591
1691
|
* ```
|
|
1592
1692
|
*/
|
|
1593
|
-
async removeFollowsFromGroup(groupId,
|
|
1693
|
+
async removeFollowsFromGroup(groupId, followValues) {
|
|
1594
1694
|
return this.client.delete(
|
|
1595
1695
|
`/v1/tools/user/follow-groups/${groupId}/follows`,
|
|
1596
|
-
{
|
|
1696
|
+
{ follow_values: followValues }
|
|
1597
1697
|
);
|
|
1598
1698
|
}
|
|
1599
1699
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -792,6 +792,106 @@ var QuantModule = class {
|
|
|
792
792
|
});
|
|
793
793
|
return response.datas || [];
|
|
794
794
|
}
|
|
795
|
+
/**
|
|
796
|
+
* Get 1-minute kline data for a single symbol
|
|
797
|
+
*
|
|
798
|
+
* @param params - Kline parameters
|
|
799
|
+
* @returns Array of 1-minute kline data
|
|
800
|
+
*
|
|
801
|
+
* @example
|
|
802
|
+
* ```typescript
|
|
803
|
+
* const data = await client.quant.kline1m({
|
|
804
|
+
* symbol: '000001',
|
|
805
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
806
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
807
|
+
* });
|
|
808
|
+
* console.log(data);
|
|
809
|
+
* ```
|
|
810
|
+
*/
|
|
811
|
+
async kline1m(params) {
|
|
812
|
+
const response = await this.client.post("/v1/quant/quotes/1mkline", {
|
|
813
|
+
symbol: params.symbol,
|
|
814
|
+
start_datetime: params.startDateTime,
|
|
815
|
+
end_datetime: params.endDateTime,
|
|
816
|
+
market: params.market || "cn"
|
|
817
|
+
});
|
|
818
|
+
return response.datas || [];
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Get batch 1-minute kline data for multiple symbols
|
|
822
|
+
*
|
|
823
|
+
* @param params - Batch kline parameters
|
|
824
|
+
* @returns Array of 1-minute kline data sorted by date (ascending), then by symbol
|
|
825
|
+
*
|
|
826
|
+
* @example
|
|
827
|
+
* ```typescript
|
|
828
|
+
* const data = await client.quant.kline1mBatch({
|
|
829
|
+
* symbols: ['000001', '600519'],
|
|
830
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
831
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
832
|
+
* });
|
|
833
|
+
* console.log(data);
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
async kline1mBatch(params) {
|
|
837
|
+
const response = await this.client.post("/v1/quant/quotes/1mkline/batch", {
|
|
838
|
+
symbols: params.symbols,
|
|
839
|
+
start_datetime: params.startDateTime,
|
|
840
|
+
end_datetime: params.endDateTime,
|
|
841
|
+
market: params.market || "cn"
|
|
842
|
+
});
|
|
843
|
+
return response.datas || [];
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Get minute data for a single symbol
|
|
847
|
+
*
|
|
848
|
+
* @param params - Minute parameters
|
|
849
|
+
* @returns Array of minute data
|
|
850
|
+
*
|
|
851
|
+
* @example
|
|
852
|
+
* ```typescript
|
|
853
|
+
* const data = await client.quant.minute({
|
|
854
|
+
* symbol: '000001',
|
|
855
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
856
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
857
|
+
* });
|
|
858
|
+
* console.log(data);
|
|
859
|
+
* ```
|
|
860
|
+
*/
|
|
861
|
+
async minute(params) {
|
|
862
|
+
const response = await this.client.post("/v1/quant/quotes/minute", {
|
|
863
|
+
symbol: params.symbol,
|
|
864
|
+
start_datetime: params.startDateTime,
|
|
865
|
+
end_datetime: params.endDateTime,
|
|
866
|
+
market: params.market || "cn"
|
|
867
|
+
});
|
|
868
|
+
return response.datas || [];
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Get batch minute data for multiple symbols
|
|
872
|
+
*
|
|
873
|
+
* @param params - Batch minute parameters
|
|
874
|
+
* @returns Array of minute data sorted by date (ascending), then by symbol
|
|
875
|
+
*
|
|
876
|
+
* @example
|
|
877
|
+
* ```typescript
|
|
878
|
+
* const data = await client.quant.minuteBatch({
|
|
879
|
+
* symbols: ['000001', '600519'],
|
|
880
|
+
* startDateTime: '2024-01-01 09:30:00',
|
|
881
|
+
* endDateTime: '2024-01-01 15:00:00'
|
|
882
|
+
* });
|
|
883
|
+
* console.log(data);
|
|
884
|
+
* ```
|
|
885
|
+
*/
|
|
886
|
+
async minuteBatch(params) {
|
|
887
|
+
const response = await this.client.post("/v1/quant/quotes/minute/batch", {
|
|
888
|
+
symbols: params.symbols,
|
|
889
|
+
start_datetime: params.startDateTime,
|
|
890
|
+
end_datetime: params.endDateTime,
|
|
891
|
+
market: params.market || "cn"
|
|
892
|
+
});
|
|
893
|
+
return response.datas || [];
|
|
894
|
+
}
|
|
795
895
|
// ===========================================================================
|
|
796
896
|
// Backtest
|
|
797
897
|
// ===========================================================================
|
|
@@ -1540,18 +1640,18 @@ var UserModule = class {
|
|
|
1540
1640
|
* Remove follows from a group
|
|
1541
1641
|
*
|
|
1542
1642
|
* @param groupId - Group ID
|
|
1543
|
-
* @param
|
|
1643
|
+
* @param followValues - List of follow values to remove (e.g., stock symbols, channel IDs)
|
|
1544
1644
|
* @returns Status message
|
|
1545
1645
|
*
|
|
1546
1646
|
* @example
|
|
1547
1647
|
* ```typescript
|
|
1548
|
-
* await client.user.removeFollowsFromGroup('group_123', ['
|
|
1648
|
+
* await client.user.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
|
|
1549
1649
|
* ```
|
|
1550
1650
|
*/
|
|
1551
|
-
async removeFollowsFromGroup(groupId,
|
|
1651
|
+
async removeFollowsFromGroup(groupId, followValues) {
|
|
1552
1652
|
return this.client.delete(
|
|
1553
1653
|
`/v1/tools/user/follow-groups/${groupId}/follows`,
|
|
1554
|
-
{
|
|
1654
|
+
{ follow_values: followValues }
|
|
1555
1655
|
);
|
|
1556
1656
|
}
|
|
1557
1657
|
/**
|