Quadruped walking robots are being examined to replace humans in dangerous environments such as disaster areas. However, given a battery capacity problem with robots, efforts are being made to optimize motor torque. In this study, as an optimization method, we propose the whole-body optimal posture control of a radial-type quadruped robot based on the ground slope. The control strategy has three stages: 1) Estimate the ground slope from IMU and leg kinematics information; 2) Based on the estimated slope, generate an optimal posture for minimizing the sum of squares of joint torque; and 3) Use centroidal dynamics based quadratic programming(QP) to calculate foot force to maintain posture and maintain reference foot force and joint posture via whole-body control(WBC). Finally, ST-quad, a self-developed radial-type quadruped robot, was used to verify that the strategy proposed in the simulation was the optimal posture based on the ground slope.