Commits

Fausto Carrera  committed c904eb2

fix total trades parsed

  • Participants
  • Parent commits 2e5f250

Comments (0)

Files changed (1)

File app/controllers/crons.php

 		$trades_url = 'https://localbitcoins.com/bitcoincharts/ARS/trades.json';
 		$trades = file_get_contents($trades_url);
 		$trades = json_decode($trades, true);
+		$total = 0;
 		foreach ($trades as $trade) {
 			$result = $this->trades_model->createTrade($trade);
-			echo $result.PHP_EOL;
+			$total += $result;
 		}
+		echo $total.PHP_EOL;
 	}
 }