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
Copy file name to clipboardExpand all lines: README.md
+30-8Lines changed: 30 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
-
#Introduction
2
-
This is an example project that shows how to implement TRKD REST Client with python
1
+
# TRKD HTTP JSON with Python Example
2
+
## Overview
3
+
The [Thomson Reuters Knowledge Direct (TRKD) API](https://developers.thomsonreuters.com/thomson-reuters-knowledge-direct-trkd) integrates into your website, trading platform, company intranet/extranet, advisory portal and mobile applications to provide up-to-date financial market data, news and analytics and powerful investment tools.
4
+
5
+
TRKD offers a wide range of Thomson Reuters' information and services delivered in a request-response scenario via web services using today's industry standard protocols (SOAP/XML and REST/JSON). Connectivity can be via HTTP and HTTPS, over the Internet or Delivery Direct.Level 2. All data are snapshot (non-streaming) data.
6
+
7
+
This is an example project that shows how to implement TRKD HTTP JSON Client with python. This project contains the following example scripts for each TRKD services
3
8
- trkd_authen.py: An example application that shows how to authenticate with TRKD service
4
9
- trkd_quote.py: An example application that shows how to subscribe (all fields and specific fields) the Quote data from TRKD service
5
10
- trkd_newsheadline.py: An example application that shows how to subscribe the News Headline data from TRKD service
@@ -11,20 +16,20 @@ This is an example project that shows how to implement TRKD REST Client with pyt
11
16
- docs\TRKD_REST_with_Python.docx: A document that describes the trkd_authen.py and trkd_quote.py applications
12
17
13
18
14
-
#prerequisite
19
+
## Prerequisite
15
20
The following softwares are required to use this script
16
-
- Python 2.7.10
21
+
- Python 2.7.10 or above
17
22
- The [requests](http://docs.python-requests.org/en/master/) library
18
23
19
-
The script does not support Python 3!
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).
20
25
21
-
#how to run the script
26
+
## How to run the script
22
27
Run the script via the command line (or shell)
23
28
```
24
29
$>python <application>.py
25
30
```
26
31
27
-
#Optional - How to install requests
32
+
## Optional - How to install requests
28
33
The best way is to get the pip package management tool
29
34
1. export <Python_folder>\Scripts to your OS PATH environment
30
35
2. call pip command to install requests
@@ -36,7 +41,18 @@ The best way is to get the pip package management tool
36
41
export https_proxy="http://<proxy.server>:<port>"
37
42
$>pip install requests
38
43
```
39
-
#Releae Note
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
46
+
- Python 2
47
+
```
48
+
username = raw_input('Please input username: ')
49
+
```
50
+
- Python 3
51
+
```
52
+
username = input('Please input username: ')
53
+
```
54
+
55
+
## Release Note
40
56
- Version 1: 6 Sep 2016
41
57
- trkd_authen.py
42
58
- trkd_quote.py
@@ -53,4 +69,10 @@ The best way is to get the pip package management tool
0 commit comments