HEX
Server: Apache
System: Linux vps-00003980 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64
User: web716 (1018)
PHP: 7.4.25
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client2/web716/web/stream/script.js
  const chart = new Highcharts.stockChart('container', {

    chart: {
      events: {
        load() {
          let chart = this;
          //let cdata = []


          (function() {
            fetch('https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=1000')
              .then(res => res.json())
              .then(data => {

                let cdata = data.map(d => {
                  return [d[0], parseFloat(d[1]), parseFloat(d[2]), parseFloat(d[3]), parseFloat(d[4])]
                  //{time:d[0]/1000,open:parseFloat(d[1]),high:parseFloat(d[2]),low:parseFloat(d[3]),close:parseFloat(d[4])}

                });
                console.log(cdata)
                chart.series[0].update({
                  data: cdata
                })

              })
          }())

        }
      }
    },

    plotOptions: {
      candlestick: {
        lineColor: "#333",
        color: '#e55600',
        upColor: '#690'
      }
    },
    xAxis: [{
      crosshair: true,
      width: '100%'
    }],
    yAxis: {
      crosshair: true
    },

    navigation: {
      bindings: {
        rect: {
          annotationOptions: {
            ShapeOptions: {
              fill: 'rgba(255,0,0,0.8)'
            }

          }

        }

      },

      annotationOptions: {
        typeOptions: {
          line: {
            stroke: 'rgba(0,255,0,0.8)',
            strokeWidth: 3
          }


        }

      }
    },

    rangeSelector: {
      selected: 1
    },

    series: [{
      type: 'ohlc',
      name: "BTCUSDT",
      id: 'dataseries',
      groupPadding: 0.03,
      pointPadding: 0.03,
      _dataGrouping: {
        units: [
          [
            'week', // unit name
            [0] // allowed multiples
          ]
        ]
      }

    }, {
            type: 'flags',
            data: [{
                 x: Date.UTC(2021, 9, 13, 20, 55, 29),
                title: 'C',
                text: 'Shape: "flag"'
            }, {
                 x: Date.UTC(2021, 9, 13, 21, 55, 59),
                title: 'C',
                text: 'Shape: "flag"'
            }],
            color: Highcharts.getOptions().colors[0], // same as onSeries
            fillColor: Highcharts.getOptions().colors[0],
            onSeries: 'dataseries',
            width: 16,
            style: { // text style
                color: 'white'
            },
            states: {
                hover: {
                    fillColor: '#395C84' // darker
                }
            }
        }
    
    
    
    ]
  });