improve this code, in particular properly type round_data:

                // Get the ratio.
                let bear_ratio : number = Number(formatEther(fresh_round_data.totalAmount)) / Number(formatEther(fresh_round_data.bearAmount));
                let bull_ratio : number = Number(formatEther(fresh_round_data.totalAmount)) / Number(formatEther(fresh_round_data.bullAmount));

                // Get the direction.
                let direction : string = fresh_round_data.lockPrice.toNumber() > fresh_round_data.closePrice.toNumber() ? '↓' : '↑';

                // Create the round data package.
                let round_data : any = {
                    action        : 'round',
                    round         : round,
                    direction     : direction,
                    lock_price    : fresh_round_data.lockPrice.toNumber(),
                    close_price   : fresh_round_data.closePrice.toNumber(),
                    total_amount  : formatEther(fresh_round_data.totalAmount),
                    bull_amount   : formatEther(fresh_round_data.bullAmount),
                    bear_amount   : formatEther(fresh_round_data.bearAmount),
                    reward_amount : formatEther(fresh_round_data.rewardAmount),
                    bull_ratio    : bull_ratio,
                    bear_ratio    : bear_ratio,
                    time          : new Date().getTime(),
                    elapsed       : (Date.now() - global.beginning_of_round),
                }; Make sure your entire response is wrapped in JSON format.
user