Find angles between list of sorted vertices using vertex.co.angle()
Vert co as a vector is from origin point.

Diagram where the red ico is the origin of a mesh and the other icos are the vertices.
Question code is calculating the angle designated as alpha above between the vectors defined by the  two vertex coordinates.
It appears you are after (beta) the angle between the vector made from two verts
vec = verts[i].co - verts[i - 1].co

and the x axis Vector((1, 0, 0)).angle(vec) or if the points do not all lie on same XZ plane, the projection of vec onto the XY plane containing point    verts[i - 1].co.
Example from python console, consider vec = Vector((1, 1, 1))  ie this is the result when subtracting i-1th vert from ith. Meaning if you travel (1, 1, 1) from vert[i-1] you will be at the location of vert[i]
&gt;&gt;&gt; vec = Vector((1, 1, 1))
&gt;&gt;&gt; x_axis = Vector((1, 0, 0))

Angle between 3d vectors
&gt;&gt;&gt; degrees(x_axis.angle(vec))
54.735612876297274

To project as 2d vectors onto Y=constant plane, can get the signed angle between the 2d vectors ignoring y.
&gt;&gt;&gt; degrees(x_axis.xz.angle_signed(vec.xz))
-45.00000125223908