Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tradingview-ws
Advanced tools
Changelog
0.0.3
Readme
Unofficial library to interact with websockets on Tradingview.
import { connect, getCandles } from 'tradingview-ws'
(async function() {
const connection = await connect()
const candles = await getCandles({
connection,
symbols: ['FX:AUDCAD', 'FX:AUDCHF'],
amount: 10_000,
timeframe: 60
})
await connection.close()
console.log(`Candles for AUDCAD:`, candles[0])
console.log(`Candles for AUDCHF:`, candles[1])
}());
connect(options: ConnectionOptions = {}): Promise<TradingviewConnection>
Creates new connection to tradingview websockets. Returns TradingviewConnection
.
Options:
sessionId?: string
- authorize connection if present. Can be received from cookies.getCandles({ connection, symbols, amount, timeframe = 60 }: GetCandlesParams)
Fetches all available candles for symbols. The maximum amount is around 13_000 candles for the hourly timeframe. Returns an array where each element is an array of candles for one symbol in the order it passed to the function.
Options:
connection: TradingviewConnection
- connection objectsymbols: string[]
- array of symbols. Symbol name can be found on Symbol info modal(click three dots after symbol name on the top left corner of the chart).timeframe?: number | '1D' | '1W' | '1M'
- candlestick timeframe, default is 60
amount?: number
- amount of candles to fetch. If not present, it will try to fetch as much as possible.TradingviewConnection
Connection object. Can be used directly to receive and send data to websockets.
Methods:
subscribe: (handler: Subscriber) => Unsubscriber
- subscribe to websockets eventssend: (name: string, params: any[]) => void
- send command to websocketsclose: () => Promise<void>
- close the connectionFAQs
Tradingview websocket API
The npm package tradingview-ws receives a total of 25 weekly downloads. As such, tradingview-ws popularity was classified as not popular.
We found that tradingview-ws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.