gjdatac-api 0.0.1__py3-none-any.whl

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.
@@ -0,0 +1,76 @@
1
+ # 此文件中用于存放各种接口的字典数据
2
+
3
+
4
+ """ get_price(行情数据) 相关数据字典 """
5
+ # 频率字典--用于存放不同品种不同周期的K线类型
6
+ get_price_frequency_dict = {
7
+ "future": {
8
+ "d": "bar",
9
+ "min": "bar",
10
+ "min_gtja": "bar",
11
+ "tick_l1": "tick",
12
+ "tick_l2": "tick"
13
+ },
14
+ "option": {
15
+ "d": "bar",
16
+ "min": "bar",
17
+ "tick": "tick"
18
+ }
19
+ }
20
+
21
+ # 不同类型的数据需要返回的字段
22
+ get_price_data_type_dict = {
23
+ "bar": {'trading_day': 'trading_day', 'trade_time': 'datetime', 'exchange_id': 'exchange_id',
24
+ 'instrument_id': 'order_book_ids', 'open_price': 'open', 'highest_price': 'high',
25
+ 'lowest_price': 'low', 'close_price': 'close', 'settlement_price': 'settlement',
26
+ 'upper_limit_price': 'limit_up', 'lower_limit_price': 'limit_down',
27
+ 'pre_settlement_price': 'prev_settlement',
28
+ 'volume': 'volume', 'turnover': 'total_turnover', 'open_interest': 'open_interest'},
29
+ "tick": {'trading_day': 'trading_day', 'trade_time': 'datetime', 'exchange_id': 'exchange_id',
30
+ 'instrument_id': 'order_book_ids', 'last_price': 'last', 'open_price': 'open',
31
+ 'highest_price': 'high', 'lowest_price': 'low', 'close_price': 'close',
32
+ 'settlement_price': 'settlement', 'upper_limit_price': 'limit_up',
33
+ 'lower_limit_price': 'limit_down', 'pre_settlement_price': 'prev_settlement',
34
+ 'pre_close_price': 'prev_close', 'volume': 'volume', 'turnover': 'total_turnover',
35
+ 'open_interest': 'open_interest', 'ask_price1': 'a1', 'ask_price2': 'a2', 'ask_price3': 'a3',
36
+ 'ask_price4': 'a4', 'ask_price5': 'a5', 'ask_volume1': 'a1_v', 'ask_volume2': 'a2_v',
37
+ 'ask_volume3': 'a3_v', 'ask_volume4': 'a4_v', 'ask_volume5': 'a5_v', 'bid_price1': 'b1',
38
+ 'bid_price2': 'b2', 'bid_price3': 'b3', 'bid_price4': 'b4', 'bid_price5': 'b5',
39
+ 'bid_volume1': 'b1_v', 'bid_volume2': 'b2_v', 'bid_volume3': 'b3_v', 'bid_volume4': 'b4_v',
40
+ 'bid_volume5': 'b5_v'}
41
+ }
42
+
43
+ """ get_instruments(合约基础信息) 相关数据字典 """
44
+ # 不同合约类型对应的字段
45
+ get_instruments_type_dict = {
46
+ "future": {
47
+ "instrumentid": "order_book_id", "exchangeid": "exchange",
48
+ # "commodity": "commodity",
49
+ "opendate": "listed_date", "expiredate": "maturity_date", "startdelivdate": "start_delivery_date",
50
+ "enddelivdate": "end_delivery_date", "delistingdate": "de_listed_date",
51
+ "volumemultiple": "contract_multiplier", "targetinstrid": "underlying_order_book_id",
52
+ # "targetinstrid": "underlying_order_book_id", "volumemultiple": "contract_multiplier"
53
+ # "trading_hour": "trading_hour"
54
+ },
55
+
56
+ "option": {
57
+ "instrumentid": "order_book_id", "exchangeid": "exchange",
58
+ # "": "commodity",
59
+ "opendate": "listed_date", "expiredate": "maturity_date", "deliverymonth": "delivery_month",
60
+ "startdelivdate": "start_delivery", "enddelivdate": "end_delivery", "delistingdate": "de_listed_date",
61
+ "optionstype": "option_type", "strikeprice": "strike_price", "targetinstrid": "underlying_order_book_id",
62
+ "volumemultiple": "contract_multiplier",
63
+ # "trading_hour": "trading_hour"
64
+ },
65
+
66
+ "future_return_fields": [
67
+ "order_book_id", "commodity", "listed_date", "de_listed_date", "type", "contract_multiplier", "underlying_order_book_id",
68
+ "maturity_date", "exchange", "start_delivery_date", "end_delivery_date", "trading_hour"
69
+ ],
70
+
71
+ "option_return_fields": [
72
+ "order_book_id", "commodity", "listed_date", "de_listed_date", "type", "contract_multiplier", "underlying_order_book_id",
73
+ "maturity_date", "exchange", "strike_price", "option_type", "exercise_type", "delivery_month", "start_delivery", "end_delivery",
74
+ "trading_hour"
75
+ ]
76
+ }
@@ -0,0 +1,108 @@
1
+ # 此文件用于存放dolphinDB的相关信息,包括登录信息、数据库和表信息等。
2
+
3
+ """ 本地dolphindb数据库相关信息 """
4
+
5
+ # 登录信息
6
+ # HOST = "localhost" # 主机名或IP地址
7
+ HOST = "10.100.96.125" # 主机名或IP地址
8
+ PORT = 8848 # 端口号
9
+ USER_ID = "admin" # 用户名
10
+ PASSWORD = "123456" # 密码
11
+
12
+ # 数据库、表信息
13
+ ''' get_price 行情数据接口所在的数据库和表 '''
14
+ get_price_db_path = "dfs://firstdb" # 数据库路径
15
+ get_price_db_table_name = "get_price_tb" # 表名
16
+
17
+ ''' get_instruments 合约基础信息接口所在的数据库和表 '''
18
+ get_instruments_db_path = "dfs://firstdb" # 数据库路径
19
+ get_instruments_db_table_name = "get_instruments_tb" # 表名
20
+
21
+ ''' get_trading_dates 交易日历接口所在的数据库和表 '''
22
+ get_trading_dates_db_path = "dfs://firstdb" # 数据库路径
23
+ get_trading_dates_db_table_name = "get_trading_dates_tb" # 表名
24
+
25
+ ''' get_margin_ratio 期货保证金接口所在的数据库和表 '''
26
+ get_margin_ratio_db_path = "dfs://firstdb" # 数据库路径
27
+ get_margin_ratio_db_table_name = "get_margin_ratio_tb" # 表名
28
+
29
+ ''' get_fee 期货交割手续费接口所在的数据库和表 '''
30
+ get_fee_db_path = "dfs://firstdb" # 数据库路径
31
+ get_fee_db_table_name = "get_fee_tb" # 表名
32
+
33
+ ''' get_limit_position 期货限仓数据接口所在的数据库和表 '''
34
+ get_limit_position_db_path = "dfs://firstdb" # 数据库路径
35
+ get_limit_position_db_table_name = "get_limit_position_tb" # 表名
36
+
37
+ ''' get_active_contract 主力/次主力合约接口所在的数据库和表 '''
38
+ get_active_contract_db_path = "dfs://firstdb" # 数据库路径
39
+ get_active_contract_db_table_name = "get_active_contract_tb" # 表名
40
+
41
+
42
+ """ 公司dolphindb数据库相关信息 """
43
+
44
+ # 登录信息
45
+ COMPANY_HOST = "10.74.56.101" # 主机名或IP地址
46
+ COMPANY_PORT = 8902 # 端口号
47
+ COMPANY_USER_ID = "sys_asset_zdgl" # 用户名
48
+ COMPANY_PASSWORD = "zdgl@1qaz2wsx" # 密码
49
+
50
+ """ 行情数据所在数据库和表 """
51
+
52
+ ''' 期货 '''
53
+ # 历史期货行情数据 L1-tick数据
54
+ history_future_tick_db_path = "dfs://tick" # 数据库路径
55
+ history_future_tick_db_table_name = "ctp_future_tick" # 表名
56
+
57
+ # 历史期货行情 L1-分钟k线
58
+ history_future_min_db_path = "dfs://minutek" # 数据库路径
59
+ history_future_min_db_table_name = "ctp_future_mink" # 表名
60
+
61
+ # 历史期货行情 L1-日k线
62
+ history_future_day_db_path = "dfs://dayk" # 数据库路径
63
+ history_future_day_db_table_name = "ctp_future_dayk" # 表名
64
+
65
+ ''' 期权 '''
66
+ # 历史期权行情数据 tick数据
67
+ history_option_tick_db_path = "dfs://tick" # 数据库路径
68
+ history_option_tick_db_table_name = "ctp_option_tick" # 表名
69
+
70
+ # 历史期权行情数据 分钟k线
71
+ history_option_min_db_path = "dfs://minutek" # 数据库路径
72
+ history_option_min_db_table_name = "ctp_option_mink" # 表名
73
+
74
+ # 历史期权行情数据 5分钟k线
75
+ history_option_5min_db_path = "dfs://minutek" # 数据库路径
76
+ history_option_5min_db_table_name = "ctp_future_mink5" # 表名
77
+
78
+ # 历史期权行情数据 15分钟k线
79
+ history_option_15min_db_path = "dfs://minutek" # 数据库路径
80
+ history_option_15min_db_table_name = "ctp_future_mink15" # 表名
81
+
82
+ # 历史期权行情数据 日k线
83
+ history_option_day_db_path = "dfs://dayk" # 数据库路径
84
+ history_option_day_db_table_name = "ctp_option_dayk" # 表名
85
+
86
+ """ 基础信息 """
87
+
88
+ # 交易参数
89
+ trading_params_db_path = "dfs://basicinfo" # 数据库路径
90
+ # trading_params_db_table_name = "b_calendar" # 表名
91
+ trading_params_db_table_name = "t_nexttradeparam" # 表名
92
+
93
+ # 期货-合约信息
94
+ future_contract_db_path = "dfs://basicinfo" # 数据库路径
95
+ future_contract_db_table_name = "t_futinstrument" # 表名
96
+
97
+ # 期权-合约信息
98
+ option_contract_db_path = "dfs://basicinfo" # 数据库路径
99
+ option_contract_db_table_name = "t_optinstrument" # 表名
100
+
101
+ # 交易日历
102
+ trading_dates_db_path = "dfs://basicinfo" # 数据库路径
103
+ trading_dates_db_table_name = "b_calendar" # 表名
104
+
105
+ {
106
+ "name": "sfs",
107
+ "sfs": "sfs"
108
+ }
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.1
2
+ Name: gjdatac-api
3
+ Version: 0.0.1
4
+ Summary: 主动管理项目第一版(部分接口)
5
+ Home-page: UNKNOWN
6
+ Author: yin
7
+ Author-email: 2018209921@qq.com
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Requires-Python: >3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: dolphindb ==3.0.1.0
13
+ Requires-Dist: holidays ==0.53
14
+ Requires-Dist: numpy ==1.26.3
15
+ Requires-Dist: pandas ==2.2.0
16
+
17
+ 第一次提交,测试是否可用
18
+
@@ -0,0 +1,8 @@
1
+ gjdatac_api/__init__.py,sha256=VNvfLTYko_DC-ePxdmUfzS3FUNXXMomsCSfonF3WavI,60
2
+ gjdatac_api/data_api_class.py,sha256=NqnBI9seAyF4LEx4gFYsDP9xAD1qlXqkoyfU9548-a4,63906
3
+ gjdatac_api/dict_data.py,sha256=wXTV-KguG2v5-nDN30gQDtZywHjS4zUwX2YbL0CeMok,3926
4
+ gjdatac_api/dolphin_db_info.py,sha256=eAGJtFMaoX8cIYfnSSQYDgIrrANjpNMCdkM-_ryNfjM,4044
5
+ gjdatac_api-0.0.1.dist-info/METADATA,sha256=oL6b-PDUQd8JYQE_t3c4qXEw9ljksH97HcQLxNRI2eQ,449
6
+ gjdatac_api-0.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
+ gjdatac_api-0.0.1.dist-info/top_level.txt,sha256=CCep4eV0338pf0asX6Aq6ZeY3Mj2pQ-xJEhmYMUHZqo,12
8
+ gjdatac_api-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ gjdatac_api