Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
TradingView getBars JS API issue when calling onHistoryCallback (nuxtJS vueJS)

I am trying to create JS API for making trading view calls to the server It works fine for config & resolveSymbol but I've problem in getBars

these are my javascript codes for getBars

        getBars: (symbolInfo, resolution, periodParams, onHistoryCallback, onErrorCallback, firstDataRequest) => {
          this.$axios.$get
          (this.datafeedUrl + '/history?symbol=' +
            symbolInfo.name +
            '&resolution=' + resolution +
            '&from=' + periodParams.from +
            '&to=' + periodParams.to +
            '&countback=20')
            .then((r) => {
              let bars = [];
              for (let i = 0; i < r.t.length; ++i) {
                let bar = {
                  time: 1e3 * r.t[i],
                  close: parseFloat(r.c[i]),
                  open: parseFloat(r.o[i]),
                  high: parseFloat(r.h[i]),
                  low: parseFloat(r.l[i]),
                  volume: parseFloat(r.v[i])
                }
                bars.push(bar)
              }
              console.log(typeof bars)
              console.log(bars)
              onHistoryCallback(bars, {noData: false})
            })
          onErrorCallback((e) => console.log(e))
        },

This is errors I get + console.log data error tradingview

my data format is exactly like udf(predefined JS API) of tradingview I can't get why this happens

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda