Skip to content

Commit

Permalink
Replay mode fix + Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu2301 committed Apr 7, 2022
1 parent 2941c7f commit ad15df3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Get realtime market prices and indicator values from Tradingview !

## Features

- [x] Premium features
- [x] Automatically backtest many strategies and try many settings in a very little time
- [x] Get drawings you made on your chart
Expand All @@ -27,30 +28,39 @@ Get realtime market prices and indicator values from Tradingview !
- IF YOU WANT A FEATURE, ASK ME !

## Possibilities

- Trading bot
- Discord alerts
- Hard backtest
- Machine Learning based indicator
- Free replay mode for all timeframes

___

## Installation

Stable version:

```ruby
npm i @mathieuc/tradingview
```

Last version:

```ruby
npm i github:Mathieu2301/TradingView-API
```

## Examples

You can find all the examples and snippets in `./examples` folder.

## Before opening an issue

Please look at examples and previously resolved issues before opening a new one. I can't help everyone (especially for questions that are not library related but JavaScript related). Thank you for your understanding.
___

## Problems

If you have errors in console or unwanted behavior,
please create an issue [here](https://github.com/Mathieu2301/Tradingview-API/issues).
3 changes: 2 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ module.exports = class Client {
while (this.isOpen && this.#logged && this.#sendQueue.length > 0) {
const packet = this.#sendQueue.shift();
this.#ws.send(packet);
if (global.TW_DEBUG) console.log('§90§30§107 > §0', packet);
}
}

Expand All @@ -222,7 +223,7 @@ module.exports = class Client {
constructor(clientOptions = {}) {
if (clientOptions.DEBUG) global.TW_DEBUG = clientOptions.DEBUG;

this.#ws = new WebSocket('wss://widgetdata.tradingview.com/socket.io/websocket', {
this.#ws = new WebSocket('wss://data.tradingview.com/socket.io/websocket', {
origin: 'https://s.tradingview.com',
});

Expand Down

0 comments on commit ad15df3

Please sign in to comment.