Skip to main content

IMarketTradeOpenPosition.sol

IMarketTradeOpenPosition

Interface for open positions in a market.

openPosition

function openPosition(int256 qty, uint256 takerMargin, uint256 makerMargin, uint256 maxAllowableTradingFee, bytes data) external returns (struct OpenPositionInfo)

Opens a new position in the market.

  • Parameters:

    NameTypeDescription
    qtyint256The quantity of the position.
    takerMarginuint256The margin amount provided by the taker.
    makerMarginuint256The margin amount provided by the maker.
    maxAllowableTradingFeeuint256The maximum allowable trading fee for the position.
    databytesAdditional data for the position callback.
  • Return Values:

    NameTypeDescription
    [0]struct OpenPositionInfoThe opened position.