As stated here, the two supported enums are ISOLATED and CROSSED. Those are working as expected, but for some reason when receiving an ACCOUNT_UPDATE event, the margin type there is mentioned as cross
.
In itself, it isn’t too problematic, but since I’m using a strongly typed language, the automatic deserialization failed. Thus, before creating a specific case for it, I was wondering if there was any specific reason for this lone case?
Do you mean you initially have margin type cross
then used POST /dapi/v1/marginType
to change to isolated
but still receiving cross
in “mt” field within an ACCOUNT_UPDATE
event ?
If you already had a position in a symbol with cross
margin, you shouldn’t be able to change it while the position is still open, so it would be expected to still have “mt” with cross.
No. I mean that in the API it is stated that the value to be sent/retrieved is CROSSED
, not cross
, but in fact the ACCOUNT_UPDATE
event returns the value cross
in the “mt” field.
If you look in the Event: margin call example, in the “mt” field, you can see that it states CROSSED
there as well. So, I was wondering why there isn’t a uniformized value for the same data/field.
Ok, I see. I would say it’s not on purpose, no specific reason for them to be different. Thanks for the feedback, I’ll share it internally.