You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Port all scripts to support Python 3
2. Fix trkd_chart.py, trkd_interday.py, trkd_intraday.py, trkd_newsstory.py and trkd_onlinereport.py to use the new REST endpoint URL.
3. Change README.md for support Python 3 notification
Copy file name to clipboardExpand all lines: README.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@ This is an example project that shows how to implement TRKD HTTP JSON Client wit
18
18
19
19
## Prerequisite
20
20
The following softwares are required to use this script
21
-
- Python 2.7
21
+
- Python 3
22
22
- The [requests](http://docs.python-requests.org/en/master/) library
23
23
24
-
The scripts are based on Python 2 but you can modify it to run with Python 3 (see "Optional - How to run with Python 3" section).
24
+
All scripts are based on Python 3 and not compatible with Python 2.
25
25
26
26
## How to run the script
27
27
Run the script via the command line (or shell)
@@ -41,16 +41,7 @@ The best way is via the pip package management tool
41
41
export https_proxy="http://<proxy.server>:<port>"
42
42
$>pip install requests
43
43
```
44
-
## Optional - How to run with Python 3
45
-
You can modify the scripts to run with Python 3 (with requests library installed) by just change the code from "**raw_input()**" to "**input()**" as the following example
fields= ['OPEN','HIGH','LOW','CLOSE','CLOSEYIELD','VOLUME','BID','ASK'] #change your fields (support these 'OPEN','HIGH','LOW','CLOSE','CLOSEYIELD','VOLUME','BID','ASK' fields only)
60
60
startTime='2015-09-22T00:00:00'#change your StartTime
61
61
endtime='2016-09-22T23:59:00'#change your EndTime
62
62
#interval = 'DAILY' # change your interval between 'DAILY', 'WEEKLY', 'MONTHLY', 'QUARTERLY' and 'ANNUAL'
63
-
interval=raw_input('Input interested interval (\'DAILY\' or \'WEEKLY\' or \'MONTHLY\' or \'QUARTERLY\' or \'ANNUAL\'): ')
63
+
interval=input('Input interested interval (\'DAILY\' or \'WEEKLY\' or \'MONTHLY\' or \'QUARTERLY\' or \'ANNUAL\'): ')
fields= ['OPEN','HIGH','LOW','CLOSE','CLOSEYIELD','VOLUME','BID','ASK'] #change your fields (support these 'OPEN','HIGH','LOW','CLOSE','CLOSEYIELD','VOLUME','BID','ASK' fields only)
60
-
startTime='2016-09-12T00:00:00'#change your StartTime
61
-
endtime='2016-09-19T23:59:00'#change your EndTime
62
-
#interval = 'MINUTE' # change your interval between 'MINUTE', '5MINUTES', '30MINUTES' and 'HOUR'
63
-
interval=raw_input('Input interested interval (\'MINUTE\' or \'5MINUTES\' or \'30MINUTES\' or \'HOUR\'): ')
65
+
# change your fields (support these 'OPEN','HIGH','LOW','CLOSE','CLOSEYIELD','VOLUME','BID','ASK' fields only)
66
+
fields= ['OPEN', 'HIGH', 'LOW', 'CLOSE',
67
+
'CLOSEYIELD', 'VOLUME', 'BID', 'ASK']
68
+
startTime='2016-09-12T00:00:00'# change your StartTime
69
+
endtime='2016-09-19T23:59:00'# change your EndTime
70
+
# interval = 'MINUTE' # change your interval between 'MINUTE', '5MINUTES', '30MINUTES' and 'HOUR'
71
+
interval=input(
72
+
'Input interested interval (\'MINUTE\' or \'5MINUTES\' or \'30MINUTES\' or \'HOUR\'): ')
0 commit comments