jgtfx2console 0.4.4__tar.gz → 0.4.16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {jgtfx2console-0.4.4/jgtfx2console.egg-info → jgtfx2console-0.4.16}/PKG-INFO +2 -3
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/__init__.py +2 -2
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/fxcli2console.py +28 -10
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16/jgtfx2console.egg-info}/PKG-INFO +2 -3
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console.egg-info/requires.txt +1 -2
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/pyproject.toml +3 -4
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/setup.py +3 -3
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/LICENSE +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/README.md +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/README.rst +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/EachRowListener.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/ForexConnect.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/LiveHistory.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/ResponseListener.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/SessionStatusListener.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/TableListener.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/TableManagerListener.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/__init__.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/common.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/errors.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/x-pyd.py +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console.egg-info/SOURCES.txt +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console.egg-info/dependency_links.txt +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console.egg-info/entry_points.txt +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console.egg-info/top_level.txt +0 -0
- {jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jgtfx2console
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.16
|
4
4
|
Summary: PDS Services
|
5
5
|
Home-page: https://github.com/jgwill/jgtfx2console
|
6
6
|
Author: GUillaume Isabelle
|
@@ -17,9 +17,8 @@ Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
18
18
|
Requires-Dist: pandas>=0.25.1
|
19
19
|
Requires-Dist: python-dotenv>=0.19.2
|
20
|
-
Requires-Dist: jgtutils>=0.1.
|
20
|
+
Requires-Dist: jgtutils>=0.1.60
|
21
21
|
Requires-Dist: tlid
|
22
|
-
Requires-Dist: flask
|
23
22
|
Provides-Extra: dev
|
24
23
|
Requires-Dist: flake8<3.7.0,>=3.6.0; extra == "dev"
|
25
24
|
Requires-Dist: isort<4.4.0,>=4.3.4; extra == "dev"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 Jean Guillaume Isabelle
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -42,6 +42,6 @@ with warnings.catch_warnings():
|
|
42
42
|
# your code here
|
43
43
|
|
44
44
|
|
45
|
-
__version__ = "0.4.
|
45
|
+
__version__ = "0.4.16"
|
46
46
|
|
47
47
|
|
@@ -43,7 +43,7 @@ connection = os.getenv('connection')
|
|
43
43
|
quotes_count = os.getenv('quotes_count')
|
44
44
|
|
45
45
|
#from jgtpy import jgtcommon as jgtcomm,iprops
|
46
|
-
from jgtutils import jgtcommon as jgtcomm,iprops
|
46
|
+
from jgtutils import jgtcommon as jgtcomm,iprops,jgtconstants as c
|
47
47
|
|
48
48
|
##import jgtcommon as jgtcomm,iprops
|
49
49
|
|
@@ -63,6 +63,7 @@ def parse_args():
|
|
63
63
|
jgtcomm.add_tlid_range_argument(parser)
|
64
64
|
#jgtcomm.add_date_arguments(parser)
|
65
65
|
jgtcomm.add_max_bars_arguments(parser)
|
66
|
+
jgtcomm.add_keepbidask_argument(parser)
|
66
67
|
args = parser.parse_args()
|
67
68
|
return args
|
68
69
|
|
@@ -72,6 +73,13 @@ def main():
|
|
72
73
|
str_user_id = user_id#args.l
|
73
74
|
str_password = password#args.p
|
74
75
|
str_url = url#args.u
|
76
|
+
|
77
|
+
keep_bid_ask = args.keepbidask
|
78
|
+
|
79
|
+
#env variable bypass if env exist JGT_KEEP_BID_ASK=1, keep_bid_ask = True
|
80
|
+
if os.getenv("JGT_KEEP_BID_ASK","0") == "1":
|
81
|
+
keep_bid_ask = True
|
82
|
+
|
75
83
|
using_tlid = False
|
76
84
|
if args.tlidrange is not None:
|
77
85
|
using_tlid= True
|
@@ -120,10 +128,15 @@ def main():
|
|
120
128
|
print("{0:s}, {1:,.5f}, {2:,.5f}".format(
|
121
129
|
pd.to_datetime(str(row['Date'])).strftime(date_format), row['Bid'], row['Ask']))
|
122
130
|
else:
|
123
|
-
|
131
|
+
csv_header_OHLC = "Date,Open,High,Low,Close,Median,Volume"
|
132
|
+
csv_header_OHLCBIDASK="Date,BidOpen,BidHigh,BidLow,BidClose,AskOpen,AskHigh,AskLow,AskClose,Volume,Open,High,Low,Close,Median"
|
133
|
+
csv_header=csv_header_OHLC
|
134
|
+
if keep_bid_ask:
|
135
|
+
csv_header=csv_header_OHLCBIDASK
|
136
|
+
print(csv_header)
|
124
137
|
rounder = lpip+1
|
125
138
|
for row in history:
|
126
|
-
print(format_output(rounder,row,rounder,date_format))
|
139
|
+
print(format_output(rounder,row,rounder,date_format,keep_bid_ask=keep_bid_ask))
|
127
140
|
|
128
141
|
# print("{0:s},{1:.5f},{2:.5f},{3:.5f},{4:.5f},{5:.5f},{6:d}".format(
|
129
142
|
# pd.to_datetime(str(row['Date'])).strftime(date_format), open_price, high_price,
|
@@ -135,15 +148,20 @@ def main():
|
|
135
148
|
except Exception as e:
|
136
149
|
jgtcomm.print_exception(e)
|
137
150
|
|
138
|
-
def format_output(nb_decimal, row, rounder, date_format = '%Y-%m-%d %H:%M:%S'):
|
139
|
-
open_price = round(((row[
|
140
|
-
high_price = round(((row[
|
141
|
-
low_price = round(((row[
|
142
|
-
close_price = round(((row[
|
151
|
+
def format_output(nb_decimal, row, rounder, date_format = '%Y-%m-%d %H:%M:%S',keep_bid_ask=False):
|
152
|
+
open_price = round(((row[c.BIDOPEN] + row[c.ASKOPEN]) / 2), rounder)
|
153
|
+
high_price = round(((row[c.BIDHIGH] + row[c.ASKHIGH]) / 2), rounder)
|
154
|
+
low_price = round(((row[c.BIDLOW] + row[c.ASKLOW]) / 2), rounder)
|
155
|
+
close_price = round(((row[c.BIDCLOSE] + row[c.ASKCLOSE]) / 2), rounder)
|
143
156
|
median = round(((high_price + low_price) / 2), rounder)
|
144
|
-
dt_formatted=pd.to_datetime(str(row[
|
157
|
+
dt_formatted=pd.to_datetime(str(row[c.DATE])).strftime(date_format)
|
145
158
|
#print("dt formatted: " + dt_formatted)
|
146
|
-
|
159
|
+
#if keep_bid_ask:Date,BidOpen,BidHigh,BidLow,BidClose,AskOpen,AskHigh,AskLow,AskClose,Volume,Open,High,Low,Close,Median
|
160
|
+
if keep_bid_ask:
|
161
|
+
formatted_string = f"{dt_formatted},{row[c.BIDOPEN]:.{nb_decimal}f},{row[c.BIDHIGH]:.{nb_decimal}f},{row[c.BIDLOW]:.{nb_decimal}f},{row[c.BIDCLOSE]:.{nb_decimal}f},{row[c.ASKOPEN]:.{nb_decimal}f},{row[c.ASKHIGH]:.{nb_decimal}f},{row[c.ASKLOW]:.{nb_decimal}f},{row[c.ASKCLOSE]:.{nb_decimal}f},{row[c.VOLUME]:d},{open_price:.{nb_decimal}f},{high_price:.{nb_decimal}f},{low_price:.{nb_decimal}f},{close_price:.{nb_decimal}f},{median:.{nb_decimal}f}"
|
162
|
+
else:
|
163
|
+
formatted_string = f"{dt_formatted},{open_price:.{nb_decimal}f},{high_price:.{nb_decimal}f},{low_price:.{nb_decimal}f},{close_price:.{nb_decimal}f},{median:.{nb_decimal}f},{row['Volume']:d}"
|
164
|
+
|
147
165
|
return formatted_string
|
148
166
|
|
149
167
|
def format_output1(nb_decimal, row, rounder,date_format = '%Y-%m-%d %H:%M:%S'):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jgtfx2console
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.16
|
4
4
|
Summary: PDS Services
|
5
5
|
Home-page: https://github.com/jgwill/jgtfx2console
|
6
6
|
Author: GUillaume Isabelle
|
@@ -17,9 +17,8 @@ Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
18
18
|
Requires-Dist: pandas>=0.25.1
|
19
19
|
Requires-Dist: python-dotenv>=0.19.2
|
20
|
-
Requires-Dist: jgtutils>=0.1.
|
20
|
+
Requires-Dist: jgtutils>=0.1.60
|
21
21
|
Requires-Dist: tlid
|
22
|
-
Requires-Dist: flask
|
23
22
|
Provides-Extra: dev
|
24
23
|
Requires-Dist: flake8<3.7.0,>=3.6.0; extra == "dev"
|
25
24
|
Requires-Dist: isort<4.4.0,>=4.3.4; extra == "dev"
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "jgtfx2console"
|
7
|
-
version = "0.4.
|
7
|
+
version = "0.4.16"
|
8
8
|
authors = [
|
9
9
|
{ name="Guillaume Isabelle", email="jgi@jgwill.com" },
|
10
10
|
]
|
@@ -15,9 +15,8 @@ requires-python = ">=3.7"
|
|
15
15
|
dependencies = [
|
16
16
|
'pandas>=0.25.1',
|
17
17
|
'python-dotenv>=0.19.2',
|
18
|
-
'jgtutils>=0.1.
|
19
|
-
'tlid'
|
20
|
-
'flask'
|
18
|
+
'jgtutils>=0.1.60',
|
19
|
+
'tlid'
|
21
20
|
]
|
22
21
|
classifiers = [
|
23
22
|
"Programming Language :: Python :: 3",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/SessionStatusListener.py
RENAMED
File without changes
|
File without changes
|
{jgtfx2console-0.4.4 → jgtfx2console-0.4.16}/jgtfx2console/forexconnect/TableManagerListener.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|