php-binance-api.php
private function chartHandler(string $symbol, string $interval, \stdClass $json)
    {
        if (!$this->info[$symbol][$interval]['firstOpen']) { // Wait for /kline to finish loading
            $this->chartQueue[$symbol][$interval][] = $json;
            return;
        }
        $chart = $json->k;
        $symbol = $json->s;
        $interval = $chart->i;
        $tick = $chart->t;
        if ($tick < $this->info[$symbol][$interval]['firstOpen']) {
            return;
        }
        // Filter out of sync data
        $open = $chart->o;
        $high = $chart->h;
        $low = $chart->l;
        $close = $chart->c;
        $volume = $chart->q; // +trades buyVolume assetVolume makerVolume
        $this->charts[$symbol][$interval][$tick] = [
            "open" => $open,
            "high" => $high,
            "low" => $low,
            "close" => $close,
            "volume" => $volume,
        ];
    }
private function chartHandler(string $symbol, string $interval, \stdClass $json)
    {
        if (!$this->info[$symbol][$interval]['firstOpen']) { // Wait for /kline to finish loading
            $this->chartQueue[$symbol][$interval][] = $json;
            return;
        }
        $chart = $json->k;
        $symbol = $json->s;
        $interval = $chart->i;
        $tick = $chart->t;
        if ($tick < $this->info[$symbol][$interval]['firstOpen']) {
            return;
        }
        // Filter out of sync data
        $open = $chart->o;
        $high = $chart->h;
        $low = $chart->l;
        $close = $chart->c;
        $volume = $chart->q; // +trades buyVolume assetVolume makerVolume
        $this->charts[$symbol][$interval][$tick] = [
            "open" => $open,
            "high" => $high,
            "low" => $low,
            "close" => $close,
            "volume" => $volume,
        ];
    }
private function chartHandler ( string $ symbol , string $ interval , \ stdClass $ json ) { if ( ! $ this -> info [ $ symbol ] [ $ interval ] [ 'firstOpen' ] ) { // Wait for /kline to finish loading $ this -> chartQueue [ $ symbol ] [ $ interval ] [ ] = $ json ; return ; } $ chart = $ json -> k ; $ symbol = $ json -> s ; $ interval = $ chart -> i ; $ tick = $ chart -> t ; if ( $ tick < $ this -> info [ $ symbol ] [ $ interval ] [ 'firstOpen' ] ) { return ; } // Filter out of sync data $ open = $ chart -> o ; $ high = $ chart -> h ; $ low = $ chart -> l ; $ close = $ chart -> c ; $ volume = $ chart -> q ; // +trades buyVolume assetVolume makerVolume $ this -> charts [ $ symbol ] [ $ interval ] [ $ tick ] = [ "open" => $ open , "high" => $ high , "low" => $ low , "close" => $ close , "volume" => $ volume , ] ; }
chartHandler For WebSocket Chart Cache

$this->chartHandler($symbol, $interval, $json);

@param $symbol string to sort
@param $interval string time
@param \stdClass $json object time
@return null
chartHandler For WebSocket Chart Cache