bugfixes; research subproc; higher sandbox limits
This commit is contained in:
@@ -263,7 +263,10 @@ export class WebSocketDatafeed implements IBasicDataFeed {
|
||||
throw err
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.history) {
|
||||
if (response.error) {
|
||||
console.error('[TradingView Datafeed] getBars server error:', response.error)
|
||||
onError(response.error)
|
||||
} else if (response.history) {
|
||||
console.log('[TradingView Datafeed] Raw bar sample:', response.history.bars?.[0])
|
||||
console.log('[TradingView Datafeed] Denominators:', denoms)
|
||||
|
||||
@@ -309,7 +312,7 @@ export class WebSocketDatafeed implements IBasicDataFeed {
|
||||
this.sendRequest<any>({
|
||||
type: 'subscribe_bars',
|
||||
symbol: symbolInfo.ticker || symbolInfo.name,
|
||||
resolution: resolution,
|
||||
period_seconds: intervalToSeconds(resolution),
|
||||
subscription_id: listenerGuid
|
||||
})
|
||||
.then((response) => {
|
||||
@@ -328,8 +331,10 @@ export class WebSocketDatafeed implements IBasicDataFeed {
|
||||
}
|
||||
|
||||
unsubscribeBars(listenerGuid: string): void {
|
||||
const sub = this.subscriptions.get(listenerGuid)
|
||||
this.sendRequest<any>({
|
||||
type: 'unsubscribe_bars',
|
||||
period_seconds: sub ? intervalToSeconds(sub.resolution) : 60,
|
||||
subscription_id: listenerGuid
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user