Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $candles_not_funny = array (
- 'high' => array(),
- 'low' => array(),
- 'close' => array
- );
- $candles = array();
- $candleI = 0;
- foreach($return as $item) {
- $time = strtotime($item['timestamp']) + $offset; // Unix time stamp
- $candles_not_funny['high'][$candleI] = $item['open'];
- $candles_not_funny['low'][$candleI] = $item['low'];
- $candles_not_funny['close'][$candleI] = $item['close'];
- $candles[$candleI] = array(
- 'timestamp' => date('Y-m-d H:i:s',$time), // Local time human-readable time stamp
- 'time' => $time,
- 'open' => $item['open'],
- 'high' => $item['high'],
- 'close' => $item['close'],
- 'low' => $item['low']
- );
- $candleI++;
- }
- return $candles_not_funny;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement