MarginOrderBookMarket
Last updated
Was this helpful?
Last updated
Was this helpful?
Inherits:
Extends OrderBookMarket to support margin trading.
Creates a margin account for a user.
Parameters
user
address
The address of the user.
collateral
address
The address of the collateral contract.
collateralFactor
uint256
The collateral factor (e.g., 150 for 150%).
Example function to execute a trade with margin.
Parameters
listingId
bytes32
The ID of the listing.
tradeQuantity
uint96
The quantity to trade.