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
ALL EXAMPLE CODE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS FOR ILLUSTRATIVE PURPOSES ONLY. REFINITIV MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THE EXAMPLE CODE, OR THE INFORMATION, CONTENT, OR MATERIALS USED IN CONNECTION WITH THE EXAMPLE CODE. YOU EXPRESSLY AGREE THAT YOUR USE OF THE EXAMPLE CODE IS AT YOUR SOLE RISK.
9
+
ALL EXAMPLE CODE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS FOR ILLUSTRATIVE PURPOSES ONLY. LSEG MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THE EXAMPLE CODE, OR THE INFORMATION, CONTENT, OR MATERIALS USED IN CONNECTION WITH THE EXAMPLE CODE. YOU EXPRESSLY AGREE THAT YOUR USE OF THE EXAMPLE CODE IS AT YOUR SOLE RISK.
10
10
11
11
## <aid="overview"></a>Overview
12
-
The [Refinitiv Knowledge Direct (RKD) API](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) 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.
13
12
14
-
RKD offers a wide range of Refinitiv' 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. All data are snapshot (non-streaming) data.
13
+
The [Knowledge Direct (RKD) API](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) ([API Official Page](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome)) 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.
14
+
15
+
RKD offers a wide range of LSEG' 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. All data are snapshot (non-streaming) data.
15
16
16
17
This is an example project that shows how to implement RKD HTTP JSON client and RKD Streaming client with Python programming language. The project example are in both console and Jupyter Notebook applications.
17
18
18
19
*Note:* The Jupyter Notebook example does not contain all the same RKD services service as console examples yet. [TBD]
19
20
20
21
## <aid="project_files"></a>Application Files
21
22
This project contains the following example scripts for each RKD services
23
+
22
24
- trkd_authen.py: An example application that shows how to authenticate with RKD service
23
25
- trkd_quote.py: An example application that shows how to subscribe (all fields and specific fields) the Quote data from RKD service
24
26
- trkd_newsheadline.py: An example application that shows how to subscribe the News Headline data from RKD service
@@ -37,8 +39,10 @@ This project contains the following example scripts for each RKD services
37
39
All source code and scripts are provided under the Apache 2.0 license. They are provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.md for details.
38
40
39
41
## <aid="prerequisite"></a>Prerequisite
42
+
40
43
The following softwares are required to use this script
41
-
- RKD API credentials. Please reach out to your Refinitiv representative to acquire RKD access credentials.
44
+
45
+
- RKD API credentials. Please reach out to your LSEG representative to acquire RKD access credentials.
42
46
- Python [Anaconda](https://www.anaconda.com/distribution/) or [MiniConda](https://docs.conda.io/en/latest/miniconda.html) distribution/package manager.
43
47
- The [JupyterLab](https://jupyter.org/) runtime (for the Notebook example application)
44
48
@@ -52,79 +56,71 @@ All scripts support Python 3 only and not compatible with Python 2.
52
56
53
57
1. Open Anaconda Prompt and go to the project's Python folder
54
58
2. Run the following command in the Anaconda Prompt application to create a Conda environment named *RKD_Python* for the project.
3. Once the environment is created, activate a Conda environment named ```RKD_Python``` with this commandin Anaconda Prompt.
59
-
```
63
+
```bash
60
64
(base) $>conda activate RKD_Python
61
65
```
62
66
4. Run the following command to the dependencies in the *RKD_Python* environment with a **requirements.txt** file.
63
-
```
67
+
```bash
64
68
(RKD_Python) $>pip install -r requirements.txt
65
69
```
66
70
5. Once the dependencies installation process success, Go to the project's Python folder. and create a file name ```.env``` with the following content.
67
-
```
71
+
```bash
68
72
#RKD Access Credentials
69
73
RKD_USERNAME=<RKD Username>
70
74
RKD_PASSWORD=<RKD Password>
71
75
RKD_APP_ID=<RKD App ID>
72
76
```
73
77
6. Run the script via the command line (or shell)
74
-
```
78
+
```bash
75
79
(RKD_Python) $>python <application>.py
76
80
```
77
81
82
+
**Note**: The Python examples also compatible with the Python [venv](https://docs.python.org/3/library/venv.html).
83
+
78
84
### <a id="python_example_run"></a>How to run the Python Notebook examples
79
85
80
86
1. Open Anaconda Prompt and go to the project's Python folder
81
87
2. Run the following commandin the Anaconda Prompt application to create a Conda environment named *RKD_Python_Notebook*for the project.
5. Once the dependencies installation process success, Go to the project's notebook folder. and create a file name ```.env``` with the following content.
94
-
```
100
+
```bash
95
101
#RKD Access Credentials
96
102
RKD_USERNAME=<RKD Username>
97
103
RKD_PASSWORD=<RKD Password>
98
104
RKD_APP_ID=<RKD App ID>
99
105
```
100
106
6. Run the following command to start the Jupyter Lab application
101
-
```
107
+
```bash
102
108
(RKD_Python_Notebook) $>notebook>jupyter lab
103
109
```
104
110
105
-
Please follow the [JupyterLab installation guide](https://jupyter.org/install) page.
106
-
107
-
## <a id="rdp"></a>RDP and Refinitiv Real-Time - Optimized
108
-
109
-
You may consider the strategic [Refinitiv Data Platform (RDP)](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) web base APIs platform. RDP APIs give you seamless and holistic access to all of Refinitiv content such as Historical Pricing, Environmental Social and Governance (ESG), News, Research, etc and commingled with your own content, enriching, integrating and distributing the data through a single interface, delivered wherever you need it. The RDP APIs delivery mechanisms are following:
110
-
* Request - Response: RESTful web service (HTTP GET, POST, PUT or DELETE)
111
-
* Alert: delivery is a mechanism to receive asynchronous updates (alerts) to a subscription.
112
-
* Bulks: deliver substantial payloads, like the end of day pricing data for the whole venue.
113
-
* Streaming: deliver real-time delivery of messages.
111
+
**Note**: The Python Jupyter examples also compatible with the Python [venv](https://docs.python.org/3/library/venv.html).
114
112
115
-
Please see [RDP APIs Overview page](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) for more detail.
116
-
117
-
As part of RDP, [Refinitiv Real-Time - Optimized (RTO)](https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api/tutorials#connect-to-refinitiv-real-time-optimized) gives you access to best in class Real Time market data delivered in the cloud. RTO is a new delivery mechanism for RDP, using the AWS (Amazon Web Services) cloud. Once a connection to RDP is established using RTO, data can be retrieved using [WebSocket API](https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api) (the same as RKD Streaming Service).
118
-
119
-
Key benefit of the strategic RDP and RTO platform are the Cloud Delivery. The Platform is based on [Amazon AWS](https://aws.amazon.com/), the world class leading Cloud Provider for developers. The RDP and RTO support output for multiple cloud vendors such as AWS, Azure, GCS, etc. for cloud-native or on-premise integration. The RTO servers are hosted in multiple location world-wide which lets the application choose the closest server based on their region for full potential.
113
+
Please follow the [JupyterLab installation guide](https://jupyter.org/install) page.
120
114
121
115
## <a id="references"></a>References
122
116
For further details, please check out the following resources:
123
-
* [Refinitiv Knowledge Direct API page](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
124
-
* [Refinitiv Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.
125
-
* [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
126
-
* [Refinitiv Data Platform (RDP) APIs page](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis).
127
-
* [Refinitiv Data Platform (RDP) APIs Gateway page](https://apidocs.refinitiv.com/Apps/ApiDocs).
117
+
118
+
- [LSEG Knowledge Direct API Official website](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome).
119
+
- [Knowledge Direct API page](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [LSEG Developers Portal](https://developers.LSEG.com/) website.
120
+
- [Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.
121
+
- [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
122
+
123
+
For any questions related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com).
128
124
129
125
## Release Note
130
126
- Version 1: 6 Sep 2016
@@ -184,3 +180,5 @@ For further details, please check out the following resources:
184
180
- Add ```dotenv``` and Environment Variable for credentials
185
181
- Update requirements.txt and requirements-notebook.txt files
Copy file name to clipboardExpand all lines: notebook/trkd_authentication.ipynb
+46-21Lines changed: 46 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,12 @@
9
9
"# RKD HTTP JSON with Python Example: Authentication\n",
10
10
"\n",
11
11
"## Overview\n",
12
-
"The [Refinitiv Knowledge Direct (RKD) API](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API)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.\n",
13
12
"\n",
14
-
"RKD offers a wide range of Refinitiv' 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. All data are snapshot (non-streaming) data.\n",
13
+
"The [Knowledge Direct (RKD) API](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) ([API Official Page](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome)) 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.\n",
15
14
"\n",
16
-
"This is an example project that shows how to implement RKD HTTP JSON client with Python programming lanugage in Jupyter Notebook.\n",
15
+
"RKD offers a wide range of LSEG' 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. All data are snapshot (non-streaming) data.\n",
16
+
"\n",
17
+
"This is an example project that shows how to implement RKD HTTP JSON client with Python programming language in Jupyter Notebook.\n",
"For further details, please check out the following resources:\n",
253
-
"* [Refinitiv Knowledge Direct API page](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [Refinitiv Developer Community](https://developers.refinitiv.com) website.\n",
254
-
"* [Refinitiv Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/Home/Index) website.\n",
255
-
"* RKD Article: [How to implement RKD JSON application with Python chapter 1: the basic](https://developers.refinitiv.com/article/how-implement-trkd-json-application-python-chapter-1-basic)\n",
"For any question related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com/spaces/51/view.html)."
278
+
"- [LSEG Knowledge Direct API Official website](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome).\n",
279
+
"- [Knowledge Direct API page](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [LSEG Developers Portal](https://developers.LSEG.com/) website.\n",
280
+
"- [Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.\n",
281
+
"- [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.\n",
282
+
"\n",
283
+
"For any questions related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com)."
0 commit comments