Completed gas.getPrice function