Skip to content

Commit 294dbe4

Browse files
committed
update_libs
1 parent 5eaff84 commit 294dbe4

File tree

9 files changed

+2350
-1372
lines changed

9 files changed

+2350
-1372
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ greeter.ts
22
greeter.js
33
greeter.html
44
index_bulma.html
5+
node_modules/

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2017 Thomson Reuters
1+
Copyright 2017 Refinitiv
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Elecktron WebSocket API with TypeScript Example
22
## Overview
33

4-
[Elektron WebSocket API](https://developers.thomsonreuters.com/websocket-api) enables easy integration into a multitude of client technology environments such as scripting and web. This API runs directly on your TREP infrastructure or the Thomson Reuters platform and presents data in an open (JSON) readable format. The API supports all Thomson Reuters Elektron data models and can be integrated into multiple client technology standards e.g. Python, R, .Net etc.
4+
**Update**: January 2021.
55

6-
[TypeScript](https://www.typescriptlang.org) programming language is a typed superset of JavaScript that compiles to readable, standards-based JavaScript. The language is designed for application-scale JavaScript by adding optional types, classes, modules, ECMAScript 2015 features and future proposals to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript is as a first-class programming language in Microsoft Visual Studio, [Angular](https://angularjs.org/) web application platform. It also supported by various application frameworks like [React](https://github.com/Microsoft/TypeScript-React-Starter#typescript-react-starter), [NodeJS and Express framework](https://github.com/Microsoft/TypeScript-Node-Starter#typescript-node-starter), [ASP.Net Core](https://www.typescriptlang.org/docs/handbook/asp-net-core.html), [Vue.js](https://github.com/Microsoft/TypeScript-Vue-Starter#typescript-vue-starter) and more.
6+
[Websocket API for Pricing Streaming and Real-Time Service](https://developers.refinitiv.com/en/api-catalog/elektron/refinitiv-websocket-api) aka Websocket API enables easy integration into a multitude of client technology environments such as scripting and web. This API runs directly on your Refinitiv Real-Time Distribution System and presents data in an open (JSON) readable format. The API supports all Refinitiv data models and can be integrated into multiple client technology standards e.g. JavaScript, Python, R, .Net, etc.
77

8-
This example shows how to implement the Elektron WebSocket API JavaScript web application with TypeScript. The web application source codes are implemented in TypeScript language to connect, consume and display data from the ADS server via the Elektron WebSocket API in the web browsers. All source codes will be compiled to readable JavaScript with [Webpack](https://webpack.js.org/) JavaScript module bundler.
8+
[TypeScript](https://www.typescriptlang.org) programming language is a typed superset of JavaScript that compiles to readable, standards-based JavaScript. The language is designed for application-scale JavaScript by adding optional types, classes, modules, ECMAScript 2015 features, and future proposals to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript is a first-class programming language in Microsoft Visual Studio, [Angular](https://angularjs.org/) web application platform. It also supported by various application frameworks like [React](https://github.com/Microsoft/TypeScript-React-Starter#typescript-react-starter), [NodeJS and Express framework](https://github.com/Microsoft/TypeScript-Node-Starter#typescript-node-starter), [ASP.Net Core](https://www.typescriptlang.org/docs/handbook/asp-net-core.html), [Vue.js](https://github.com/Microsoft/TypeScript-Vue-Starter#typescript-vue-starter) and more.
99

10-
*Note: The initial release of this API is for deployed TREP customers only (i.e. to use it you will need an installed version of TREP 3.2).
10+
This example shows how to implement the WebSocket API JavaScript web application with TypeScript. The web application source codes are implemented in TypeScript language to connect, consume and display data from the Refinitiv Real-Time Advanced Distribution server via the WebSocket API in the web browsers. All source codes will be compiled to readable JavaScript with [Webpack](https://webpack.js.org/) JavaScript module bundler.
11+
12+
*Note: The initial release of this API is for deployed Refinitiv Real-Time Advanced Distribution Server customers only (i.e. to use it you will need an installed version of Refinitiv Real-Time Advanced Distribution Server 3.2.1 and above).
1113

1214
## Supported Web Browsers
13-
The example supports Chrome, Firefox and IE11 (based on the WebSocket and Web Workers browser supported platform).
15+
The example supports Chrome/Microsoft Edge (Chrome-based version), Firefox, and IE11 (based on the WebSocket and Web Workers browser supported platform).
1416

1517
## Prerequisite
16-
This example requires the following dependencies softwares.
18+
This example requires the following dependencies software.
1719
1. [Node.js](https://nodejs.org/en/) runtime - version 8.9.3 or higher.
1820
2. [npm](https://www.npmjs.com/) package manager (included in Node.js)
1921
3. [TypeScript](https://www.typescriptlang.org) compiler (will be installed via ```npm install``` command)
@@ -28,7 +30,7 @@ jQuery,Bootstrap and Express.js are distributed under the [MIT license](https://
2830
*Note: This example uses jQuery and Bootstrap for Web UI theme and color only, not for HTML DOM interaction.
2931

3032
## Package
31-
The project includes complete TypeScript source codes, a simple Express.js web server applciation file, CSS files and all required static dependencies. All dynamic dependencies for compiling and building JavaScript source file are defined in *package.json* file which can be installed via ```npm install``` command.
33+
The project includes complete TypeScript source codes, a simple Express.js web server application file, CSS files, and all required static dependencies. All dynamic dependencies for compiling and building JavaScript source files are defined in the *package.json* file which can be installed via ```npm install``` command.
3234

3335
The project includes the following files and folder
3436
- *src/* folder: The folder that contains all TypeScript source files
@@ -39,7 +41,7 @@ The project includes the following files and folder
3941
- *web/libs/jquery-3.2.1.min.js*: jQuery library file
4042
- *web/bootstrap/css*, *web/bootstarp/fonts* and *web/bootstrap/js* folders: The folders for Bootstrap CSS and libraries files
4143
- package.json: Project's NPM dependencies file
42-
- tsconfig.json: Project's TypeSccript compiler options file
44+
- tsconfig.json: Project's TypeScript compiler options file
4345
- webpack.config.js: Project's Webpack compiler options file
4446
- server.js: Project's simple web server application file.
4547

@@ -49,28 +51,35 @@ The project includes the following files and folder
4951

5052
![npm command display](images/npm_install.png "npm command display")
5153

52-
3. If the machine is behind a proxy server, you need to configure Node.js uses proxy instead of a direct HTTP connection via the following command in command prompt: ```set https_proxy=http://<proxy.server>:<port>```
54+
3. If the machine is behind a proxy server, you need to configure Node.js uses proxy instead of a direct HTTP connection via the following command in a command prompt: ```set https_proxy=http://<proxy.server>:<port>```
5355
4. Run ```$> npx webpack``` in the command prompt to build and compile all TypeScript files in *src* into JavaScript source file (*/web/dist/* folder)
5456

5557
![webpack command display](images/webpack_screen2.png "webpack command display")
5658

57-
5. Run ```$> node server.js``` in the command prompt to start the web server at HTTP port 8080
59+
5. Run ```$> node server.js``` in the command prompt to start the webserver at HTTP port 8080
5860

5961
![application display](images/run_server.png "run server")
6062

61-
6. Open web browser (IE11, Chorme and Firefox), then navigate to index.html of the web server at ```http://localhost:8080/index.html```
63+
6. Open a web browser (IE11, Chrome/Microsoft Edge (Chrome-based version), and Firefox), then navigate to index.html of the webserver at ```http://localhost:8080/index.html```
6264

6365
![application display](images/application_screen.png "application display")
6466

6567
## References
6668
For further details, please check out the following resources:
67-
* [Thomson Reuters Elektron WebSocket API page](https://developers.thomsonreuters.com/websocket-api) on the [Thomson Reuters Developer Community](https://developers.thomsonreuters.com/) web site.
69+
* [Refinitiv Real-Time & Distribution Family page](https://developers.refinitiv.com/en/use-cases-catalog/refinitiv-real-time) on the [Refinitiv Developer Community](https://developers.refinitiv.com/) web site.
70+
* [WebSocket API page](https://developers.refinitiv.com/en/api-catalog/elektron/refinitiv-websocket-api).
6871
* [Developer Webinar Recording: Introduction to Electron Websocket API](https://www.youtube.com/watch?v=CDKWMsIQfaw)
6972
* [TypeScript programming language: Documentation](https://www.typescriptlang.org/docs/home.html).
7073
* [Mozilla Developer Network: WebSocket API page](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
74+
* [WebSocket technology](https://www.websocket.org/index.html) web site.
75+
* [Developer Article: Consume Realtime data with Refinitiv Data Platform](https://developers.refinitiv.com/en/article-catalog/article/consume-real-time-data-with-refinitiv-data-platform)
76+
* [Developer Article: How to implement WebSocket API JavaScript application with HTML Web Workers](https://developers.refinitiv.com/en/article-catalog/article/how-implement-elektron-websocket-api-javascript-application-html-web-workers)
77+
* [Developer Article: How to implement WebSocket API JavaScript application with TypeScript](https://developers.refinitiv.com/en/article-catalog/article/how-to-implement-elektron-websocket-api-javascript-application-typescript)
78+
* [Developer Article: Consuming Order Book Level 2 data with Websocket API](https://developers.refinitiv.com/en/article-catalog/article/consuming-order-book-level-2-data-with-elektron-websocket-api)
7179

72-
For any question related to this article or Elektron WebSocket API page, please use the Developer Community [Q&A Forum](https://community.developers.thomsonreuters.com/).
80+
For any questions related to this article or the WebSocket API page, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com/spaces/152/websocket-api.html).
7381

74-
### Change logs
75-
- 21 December 2017: Fixed UI, change service name to be optional parameter, Add README.md content
82+
### Changelogs
83+
- 21 December 2017: Fixed UI, change the service name to be an optional parameter, Add README.md content
7684
- 11 January 2018: Now the application can handle subscription IDs.
85+
- 28 January 2020: Rebranding

images/application_screen.png

-69.4 KB
Loading

0 commit comments

Comments
 (0)