Order margin group: leverage, collateral, and auto-borrow.
Constructs an empty margin group (autoBorrow false).
autoBorrow
Whether borrowing is permitted to satisfy margin.
The collateral asset, or undefined.
undefined
Sets the collateral asset.
Throws AssetError when the asset string is empty.
AssetError
The leverage multiplier, or undefined.
Sets the leverage (accepts a Leverage object or a number/bigint/string multiplier).
Leverage
Throws ParamError on an out-of-range leverage value.
ParamError
Returns a deep copy of this margin group.
Order margin group: leverage, collateral, and auto-borrow.