tradingeconomics-stream
v0.2.0
Published
Connect to the TradingEconomics WS stream
Downloads
7
Readme
TradingEconomics stream
Connect to the TradingEconomics WS stream
Installation
yarn add tradingeconomics-stream
Usage
import { TEClient} from 'tradingeconomics-stream'
const subscribe = (asset: string) => {
const client = new TEClient({
key: 'your-key',
secret: 'your-secret',
})
client.subscribe(asset)
client.on('message', msg => {
console.log(`Got price for asset ${asset}:`, msg.price)
})
}
subscribe('UKX:IND')