Get Order Object on Checkout Complete Page
The hook hook_uc_checkout_complete() is the function you're looking for. However, you're going to have problems here since the function runs after the page display. 

One way to get around this is override the theme function on the complete sale page:

function THEME_uc_cart_complete_sale($variables) {
  $order_json = json_encode($variables['order']);
  drupal_add_js('jQuery(document).ready(function () { var order = '.$order_json.'; console.log(order); });','inline');

  return $variables['message'];
}


This will execute JS code with the order object upon sale completion.