<?php
function fake_rate_custom_rest(){

    register_rest_field(array('markets','venders','other_services','tlg_channels',"top_forums"), '_rating_array', array(
            'get_callback' => function (){
	            global $post;
                $user = wp_get_current_user();
	            $rating = get_post_meta($post->ID,'_fake_rate',true);
                if($rating == null) add_post_meta($post->ID, '_fake_rate', 5);
                wp_reset_postdata();
                return $rating;
            }
    ));
    register_rest_field(array('markets','venders','other_services','tlg_channels',"top_forums"), '_rate', array(
        'get_callback' => function (){
            global $post;
            $user = wp_get_current_user();
            $rating = get_post_meta($post->ID,'_fake_rate',true);
            if($rating == null) add_post_meta($post->ID, '_fake_rate', 5);
            wp_reset_postdata();
            return $rating;
        }
    ));
}

add_action('rest_api_init', 'fake_rate_custom_rest');