Hi,
Nice crate!
I was able to add perp support by adding an optional leverage field to the create order struct. The default leverage is 1.0 if left blank. This causes insufficient margin error.
Pulling perp portfolio also causes json deserialize error, but have not looked into the details.