You should add the name of algo as “algo” param in stats.
Just give it in KHs/s. Multiply or divide your value to get it in KHs/s.
# make JSON
stats=$(jq -nc \
--argjson hs "`echo ${hs[@]} | tr " " "\n" | jq -cs '.'`" \
--arg hs_units "$hs_units" \
--argjson temp "$temp" \
--argjson fan "$fan" \
--arg uptime "$uptime" \
--arg ac "$ac" \
--arg rj "$rj" \
--arg algo "$algo" \
'{$hs, $hs_units, $temp, $fan, $uptime, ar: [$ac, $rj], $algo}')
# total hashrate in khs
khs=$(get_total_hashes)