jgtfx2console 0.4.4__tar.gz

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 (26) hide show
  1. jgtfx2console-0.4.4/LICENSE +21 -0
  2. jgtfx2console-0.4.4/PKG-INFO +87 -0
  3. jgtfx2console-0.4.4/README.md +46 -0
  4. jgtfx2console-0.4.4/README.rst +21 -0
  5. jgtfx2console-0.4.4/jgtfx2console/__init__.py +47 -0
  6. jgtfx2console-0.4.4/jgtfx2console/forexconnect/EachRowListener.py +47 -0
  7. jgtfx2console-0.4.4/jgtfx2console/forexconnect/ForexConnect.py +679 -0
  8. jgtfx2console-0.4.4/jgtfx2console/forexconnect/LiveHistory.py +261 -0
  9. jgtfx2console-0.4.4/jgtfx2console/forexconnect/ResponseListener.py +232 -0
  10. jgtfx2console-0.4.4/jgtfx2console/forexconnect/SessionStatusListener.py +134 -0
  11. jgtfx2console-0.4.4/jgtfx2console/forexconnect/TableListener.py +139 -0
  12. jgtfx2console-0.4.4/jgtfx2console/forexconnect/TableManagerListener.py +86 -0
  13. jgtfx2console-0.4.4/jgtfx2console/forexconnect/__init__.py +69 -0
  14. jgtfx2console-0.4.4/jgtfx2console/forexconnect/common.py +466 -0
  15. jgtfx2console-0.4.4/jgtfx2console/forexconnect/errors.py +46 -0
  16. jgtfx2console-0.4.4/jgtfx2console/forexconnect/x-pyd.py +20 -0
  17. jgtfx2console-0.4.4/jgtfx2console/fxcli2console.py +164 -0
  18. jgtfx2console-0.4.4/jgtfx2console.egg-info/PKG-INFO +87 -0
  19. jgtfx2console-0.4.4/jgtfx2console.egg-info/SOURCES.txt +25 -0
  20. jgtfx2console-0.4.4/jgtfx2console.egg-info/dependency_links.txt +1 -0
  21. jgtfx2console-0.4.4/jgtfx2console.egg-info/entry_points.txt +2 -0
  22. jgtfx2console-0.4.4/jgtfx2console.egg-info/requires.txt +27 -0
  23. jgtfx2console-0.4.4/jgtfx2console.egg-info/top_level.txt +1 -0
  24. jgtfx2console-0.4.4/pyproject.toml +32 -0
  25. jgtfx2console-0.4.4/setup.cfg +8 -0
  26. jgtfx2console-0.4.4/setup.py +67 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Guillaume Descoteaux-Isabelle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.1
2
+ Name: jgtfx2console
3
+ Version: 0.4.4
4
+ Summary: PDS Services
5
+ Home-page: https://github.com/jgwill/jgtfx2console
6
+ Author: GUillaume Isabelle
7
+ Author-email: Guillaume Isabelle <jgi@jgwill.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/jgwill/jgtfx2console
10
+ Project-URL: Bug Tracker, https://github.com/jgwill/jgtfx2console/issues
11
+ Keywords: data
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.7
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: pandas>=0.25.1
19
+ Requires-Dist: python-dotenv>=0.19.2
20
+ Requires-Dist: jgtutils>=0.1.38
21
+ Requires-Dist: tlid
22
+ Requires-Dist: flask
23
+ Provides-Extra: dev
24
+ Requires-Dist: flake8<3.7.0,>=3.6.0; extra == "dev"
25
+ Requires-Dist: isort<4.4.0,>=4.3.4; extra == "dev"
26
+ Requires-Dist: coverage; extra == "dev"
27
+ Requires-Dist: pytest>=3.10; extra == "dev"
28
+ Requires-Dist: readme_renderer; extra == "dev"
29
+ Requires-Dist: sphinx; extra == "dev"
30
+ Requires-Dist: sphinx_rtd_theme>=0.4.0; extra == "dev"
31
+ Provides-Extra: dev-lint
32
+ Requires-Dist: flake8<3.7.0,>=3.6.0; extra == "dev-lint"
33
+ Requires-Dist: isort<4.4.0,>=4.3.4; extra == "dev-lint"
34
+ Provides-Extra: dev-test
35
+ Requires-Dist: coverage; extra == "dev-test"
36
+ Requires-Dist: pytest>=3.10; extra == "dev-test"
37
+ Provides-Extra: dev-docs
38
+ Requires-Dist: readme_renderer; extra == "dev-docs"
39
+ Requires-Dist: sphinx; extra == "dev-docs"
40
+ Requires-Dist: sphinx_rtd_theme>=0.4.0; extra == "dev-docs"
41
+
42
+
43
+
44
+ # jgtfx2console
45
+
46
+ just getting prices from fxconnect
47
+
48
+
49
+ ## Installation
50
+ ```sh
51
+ pip install -U jgtfx2console
52
+ ```
53
+
54
+ ## Example
55
+
56
+ ```py
57
+
58
+ >>> import pandas as pd
59
+ >>> import jgtfx2console
60
+ >>> df=jgtfx2console.getPH('EUR/USD','H4')
61
+ >>>
62
+ >>> # retrieve 3000 periods and generate from the DF
63
+ >>> df=jgtfx2console.getPH('EUR/USD','H4',3000,with_index=False)
64
+ >>> dfi=jgtfx2console.createFromDF(df)
65
+ >>>
66
+
67
+ ```
68
+
69
+ ## More
70
+
71
+
72
+ ### Enhancements Idea
73
+
74
+ #### -l (for --timeline)
75
+
76
+ * --@STCGoal An easy way to snap a moment in time and save it to our store.
77
+
78
+ ```sh
79
+ jgtfxcli -i "SPX500" -t "H1,H4,H8,D1,W1,M1" -c 500 -l "22101313"
80
+
81
+ ```
82
+
83
+ ```
84
+ $JGTPY_DATA/pds NORMAL
85
+ $JGTPY_DATA/pdl/ L Item
86
+
87
+ ```
@@ -0,0 +1,46 @@
1
+
2
+
3
+ # jgtfx2console
4
+
5
+ just getting prices from fxconnect
6
+
7
+
8
+ ## Installation
9
+ ```sh
10
+ pip install -U jgtfx2console
11
+ ```
12
+
13
+ ## Example
14
+
15
+ ```py
16
+
17
+ >>> import pandas as pd
18
+ >>> import jgtfx2console
19
+ >>> df=jgtfx2console.getPH('EUR/USD','H4')
20
+ >>>
21
+ >>> # retrieve 3000 periods and generate from the DF
22
+ >>> df=jgtfx2console.getPH('EUR/USD','H4',3000,with_index=False)
23
+ >>> dfi=jgtfx2console.createFromDF(df)
24
+ >>>
25
+
26
+ ```
27
+
28
+ ## More
29
+
30
+
31
+ ### Enhancements Idea
32
+
33
+ #### -l (for --timeline)
34
+
35
+ * --@STCGoal An easy way to snap a moment in time and save it to our store.
36
+
37
+ ```sh
38
+ jgtfxcli -i "SPX500" -t "H1,H4,H8,D1,W1,M1" -c 500 -l "22101313"
39
+
40
+ ```
41
+
42
+ ```
43
+ $JGTPY_DATA/pds NORMAL
44
+ $JGTPY_DATA/pdl/ L Item
45
+
46
+ ```
@@ -0,0 +1,21 @@
1
+ jgtfx2console
2
+ ====
3
+
4
+ Enhanced PDS Services ALT console
5
+
6
+
7
+ Installation
8
+ ------------
9
+
10
+ ::
11
+
12
+ pip install --user -U jgtfx2console
13
+
14
+ Example
15
+ -------
16
+
17
+ ::
18
+
19
+
20
+ >>> fx2console -i SPX500 -t H4 > SPX500_H4.csv
21
+
@@ -0,0 +1,47 @@
1
+ # Copyright 2023 Jean Guillaume Isabelle
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ .. moduleauthor:: Jean Guillaume Isabelle <jgi@jgwill.com>
17
+ """
18
+
19
+ # from jgtfxcommon.BatchOrderMonitor import BatchOrderMonitor
20
+ # from jgtfxcommon.OrderMonitor import OrderMonitor
21
+ # from jgtfxcommon.OrderMonitorNetting import OrderMonitorNetting
22
+ # from jgtfxcommon.TableListenerContainer import TableListenerContainer
23
+ # from jgtfxcommon.common import add_main_arguments, add_instrument_timeframe_arguments, \
24
+ # add_candle_open_price_mode_argument, add_direction_rate_lots_arguments, add_account_arguments, \
25
+ # valid_datetime, add_date_arguments, add_report_date_arguments, add_max_bars_arguments, add_bars_arguments, \
26
+ # print_exception, session_status_changed, diff_month, convert_timeframe_to_seconds
27
+
28
+ import os
29
+ import platform
30
+ import sys
31
+
32
+ import sys
33
+ sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
34
+
35
+
36
+
37
+
38
+ import warnings
39
+
40
+ with warnings.catch_warnings():
41
+ warnings.filterwarnings("ignore", category=RuntimeWarning, module="importlib._bootstrap")
42
+ # your code here
43
+
44
+
45
+ __version__ = "0.4.4"
46
+
47
+
@@ -0,0 +1,47 @@
1
+ from typing import Callable, Any
2
+ from . import fxcorepy
3
+
4
+
5
+ class EachRowListener(fxcorepy.AO2GEachRowListener):
6
+ """The class implements the abstract class AO2GEachRowListener and calls the passed function on the iteration through rows of a table."""
7
+ def __init__(self, on_each_row_callback: Callable[[fxcorepy.AO2GEachRowListener, str, fxcorepy.O2GRow], None] = None,
8
+ data: Any = None) -> None:
9
+ """ The constructor.
10
+
11
+ Parameters
12
+ ----------
13
+ on_each_row_callback :
14
+ The function that is called on an iteration through rows of a table.
15
+ data : typing.Any
16
+ Any user's object. The default value of the parameter is None.
17
+
18
+ Returns
19
+ -------
20
+ None
21
+
22
+ """
23
+ fxcorepy.AO2GEachRowListener.__init__(self)
24
+ self._on_each_row_callback = on_each_row_callback
25
+ self._data = data
26
+
27
+ @property
28
+ def data(self) -> Any:
29
+ """ Gets data passed in the constructor.
30
+
31
+ Returns
32
+ -------
33
+ typing.Any
34
+
35
+ """
36
+ return self._data
37
+
38
+ def on_each_row(self, row_id: str, row_data: fxcorepy.O2GRow) -> None: # native call
39
+ """ Implements the method AO2GEachRowListener.on_each_row and calls the function that processes notifications on the iteration through the rows of a table. The function is passed in the constructor.
40
+
41
+ Returns
42
+ -------
43
+
44
+
45
+ """
46
+ if self._on_each_row_callback:
47
+ self._on_each_row_callback(self, row_id, row_data)