Skip to content

Commit 341b723

Browse files
authored
Update README.md
1 parent 295892e commit 341b723

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ The following markets are available at the moment :
1010

1111
## Installing
1212

13+
Download rtf binaries : https://github.com/Real-time-finance/finance-websocket-API/releases
14+
Unix, macos and windows binaries available.
15+
16+
## Usage example
17+
18+
Use market name and stock symbol to receive datas. In this example we get quotations from Netflix (nasdaq) :
19+
```shell
20+
./rtf add --market="NASDAQ" --stock="NFLX"
1321
```
14-
npm install ws
22+
Another example to get quotations from Goldman Sachs (nyse) :
23+
```shell
24+
./rtf add --market="NYSE" --stock="GS"
1525
```
1626

17-
## Usage example
27+
## Output example
1828

19-
Use stock symbol to receive datas. In this example we use EURUSD (forex), GBPUSD (forex), AAPL (apple - nasdaq), MSFT (microsoft - nasdaq) and MC.PA (lvmh - cac40)
20-
```javascript
21-
const WebSocket = require('ws');
22-
const ws = new WebSocket("wss://api.realtimefinance.io", {
23-
rejectUnauthorized: false // use only if you are behind a firewall
24-
});
25-
26-
const message = {
27-
event: "subscribe",
28-
data: ['EURUSD','GBPUSD','AAPL','MSFT','MC.PA']
29-
};
30-
ws.on("open", function open() {
31-
ws.send(JSON.stringify(message));
32-
});
33-
34-
ws.on("message", function incoming(data) {
35-
console.log(data);
36-
});
29+
```
30+
{
31+
price: 386.70,
32+
volume: 665805,
33+
time: 1643359743,
34+
symbol: 'NFLX',
35+
market: 'NASDAQ'
36+
}
3737
```
3838

3939
# Available for stocks and forex

0 commit comments

Comments
 (0)