Skip to content

IPerpsV2MarketConsolidated

Description

Source: contracts/interfaces/IPerpsV2MarketConsolidated.sol

Structs

DelayedOrder

Source

Field Type Description
isOffchain bool TBA
sizeDelta int128 TBA
desiredFillPrice uint128 TBA
targetRoundId uint128 TBA
commitDeposit uint128 TBA
keeperDeposit uint128 TBA
executableAtTime uint256 TBA
intentionTime uint256 TBA
trackingCode bytes32 TBA

Position

Source

Field Type Description
id uint64 TBA
lastFundingIndex uint64 TBA
margin uint128 TBA
lastPrice uint128 TBA
size int128 TBA

Views

accessibleMargin

Source

Details

Signature

accessibleMargin(address account) view returns (uint256 marginAccessible, bool invalid)

Visibility

external

State Mutability

view

accruedFunding

Source

Details

Signature

accruedFunding(address account) view returns (int256 funding, bool invalid)

Visibility

external

State Mutability

view

assetPrice

Source

Details

Signature

assetPrice() view returns (uint256 price, bool invalid)

Visibility

external

State Mutability

view

baseAsset

Source

Details

Signature

baseAsset() view returns (bytes32 key)

Visibility

external

State Mutability

view

canLiquidate

Source

Details

Signature

canLiquidate(address account) view returns (bool)

Visibility

external

State Mutability

view

currentFundingRate

Source

Details

Signature

currentFundingRate() view returns (int256 fundingRate)

Visibility

external

State Mutability

view

currentFundingVelocity

Source

Details

Signature

currentFundingVelocity() view returns (int256 fundingVelocity)

Visibility

external

State Mutability

view

delayedOrders

Source

Details

Signature

delayedOrders(address account) view returns (struct IPerpsV2MarketConsolidated.DelayedOrder)

Visibility

external

State Mutability

view

fillPrice

Source

Details

Signature

fillPrice(int256 sizeDelta) view returns (uint256 price, bool invalid)

Visibility

external

State Mutability

view

fundingLastRecomputed

Source

Details

Signature

fundingLastRecomputed() view returns (uint32 timestamp)

Visibility

external

State Mutability

view

fundingRateLastRecomputed

Source

Details

Signature

fundingRateLastRecomputed() view returns (int128 fundingRate)

Visibility

external

State Mutability

view

fundingSequence

Source

Details

Signature

fundingSequence(uint256 index) view returns (int128 netFunding)

Visibility

external

State Mutability

view

fundingSequenceLength

Source

Details

Signature

fundingSequenceLength() view returns (uint256 length)

Visibility

external

State Mutability

view

isFlagged

Source

Details

Signature

isFlagged(address account) view returns (bool)

Visibility

external

State Mutability

view

liquidationFee

Source

Details

Signature

liquidationFee(address account) view returns (uint256)

Visibility

external

State Mutability

view

liquidationPrice

Source

Details

Signature

liquidationPrice(address account) view returns (uint256 price, bool invalid)

Visibility

external

State Mutability

view

marketDebt

Source

Details

Signature

marketDebt() view returns (uint256 debt, bool isInvalid)

Visibility

external

State Mutability

view

marketKey

Source

Details

Signature

marketKey() view returns (bytes32 key)

Visibility

external

State Mutability

view

marketSize

Source

Details

Signature

marketSize() view returns (uint128 size)

Visibility

external

State Mutability

view

marketSizes

Source

Details

Signature

marketSizes() view returns (uint256 long, uint256 short)

Visibility

external

State Mutability

view

marketSkew

Source

Details

Signature

marketSkew() view returns (int128 skew)

Visibility

external

State Mutability

view

notionalValue

Source

Details

Signature

notionalValue(address account) view returns (int256 value, bool invalid)

Visibility

external

State Mutability

view

orderFee

Source

Details

Signature

orderFee(int256 sizeDelta, enum IPerpsV2MarketBaseTypes.OrderType orderType) view returns (uint256 fee, bool invalid)

Visibility

external

State Mutability

view

positions

Source

Details

Signature

positions(address account) view returns (struct IPerpsV2MarketConsolidated.Position)

Visibility

external

State Mutability

view

postTradeDetails

Source

Details

Signature

postTradeDetails(int256 sizeDelta, uint256 tradePrice, enum IPerpsV2MarketBaseTypes.OrderType orderType, address sender) view returns (uint256 margin, int256 size, uint256 price, uint256 liqPrice, uint256 fee, enum IPerpsV2MarketConsolidated.Status status)

Visibility

external

State Mutability

view

profitLoss

Source

Details

Signature

profitLoss(address account) view returns (int256 pnl, bool invalid)

Visibility

external

State Mutability

view

remainingMargin

Source

Details

Signature

remainingMargin(address account) view returns (uint256 marginRemaining, bool invalid)

Visibility

external

State Mutability

view

unrecordedFunding

Source

Details

Signature

unrecordedFunding() view returns (int256 funding, bool invalid)

Visibility

external

State Mutability

view

External Functions

cancelDelayedOrder

Source

Details

Signature

cancelDelayedOrder(address account)

Visibility

external

State Mutability

``

cancelOffchainDelayedOrder

Source

Details

Signature

cancelOffchainDelayedOrder(address account)

Visibility

external

State Mutability

``

closePosition

Source

Details

Signature

closePosition(uint256 desiredFillPrice)

Visibility

external

State Mutability

``

closePositionWithTracking

Source

Details

Signature

closePositionWithTracking(uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

executeDelayedOrder

Source

Details

Signature

executeDelayedOrder(address account)

Visibility

external

State Mutability

``

executeOffchainDelayedOrder

Source

Details

Signature

executeOffchainDelayedOrder(address account, bytes[] priceUpdateData) payable

Visibility

external

State Mutability

payable

flagPosition

Source

Details

Signature

flagPosition(address account)

Visibility

external

State Mutability

``

forceLiquidatePosition

Source

Details

Signature

forceLiquidatePosition(address account)

Visibility

external

State Mutability

``

liquidatePosition

Source

Details

Signature

liquidatePosition(address account)

Visibility

external

State Mutability

``

modifyPosition

Source

Details

Signature

modifyPosition(int256 sizeDelta, uint256 desiredFillPrice)

Visibility

external

State Mutability

``

modifyPositionWithTracking

Source

Details

Signature

modifyPositionWithTracking(int256 sizeDelta, uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

recomputeFunding

Source

Details

Signature

recomputeFunding() returns (uint256 lastIndex)

Visibility

external

State Mutability

``

submitCloseDelayedOrderWithTracking

Source

Details

Signature

submitCloseDelayedOrderWithTracking(uint256 desiredTimeDelta, uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

submitCloseOffchainDelayedOrderWithTracking

Source

Details

Signature

submitCloseOffchainDelayedOrderWithTracking(uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

submitDelayedOrder

Source

Details

Signature

submitDelayedOrder(int256 sizeDelta, uint256 desiredTimeDelta, uint256 desiredFillPrice)

Visibility

external

State Mutability

``

submitDelayedOrderWithTracking

Source

Details

Signature

submitDelayedOrderWithTracking(int256 sizeDelta, uint256 desiredTimeDelta, uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

submitOffchainDelayedOrder

Source

Details

Signature

submitOffchainDelayedOrder(int256 sizeDelta, uint256 desiredFillPrice)

Visibility

external

State Mutability

``

submitOffchainDelayedOrderWithTracking

Source

Details

Signature

submitOffchainDelayedOrderWithTracking(int256 sizeDelta, uint256 desiredFillPrice, bytes32 trackingCode)

Visibility

external

State Mutability

``

transferMargin

Source

Details

Signature

transferMargin(int256 marginDelta)

Visibility

external

State Mutability

``

withdrawAllMargin

Source

Details

Signature

withdrawAllMargin()

Visibility

external

State Mutability

``

Events

DelayedOrderRemoved

Source

Signature: DelayedOrderRemoved(address account, bool isOffchain, uint256 currentRoundId, int256 sizeDelta, uint256 targetRoundId, uint256 commitDeposit, uint256 keeperDeposit, bytes32 trackingCode)

DelayedOrderSubmitted

Source

Signature: DelayedOrderSubmitted(address account, bool isOffchain, int256 sizeDelta, uint256 targetRoundId, uint256 intentionTime, uint256 executableAtTime, uint256 commitDeposit, uint256 keeperDeposit, bytes32 trackingCode)

FundingRecomputed

Source

Signature: FundingRecomputed(int256 funding, int256 fundingRate, uint256 index, uint256 timestamp)

MarginTransferred

Source

Signature: MarginTransferred(address account, int256 marginDelta)

PerpsTracking

Source

Signature: PerpsTracking(bytes32 trackingCode, bytes32 baseAsset, bytes32 marketKey, int256 sizeDelta, uint256 fee)

PositionFlagged

Source

Signature: PositionFlagged(uint256 id, address account, address flagger, uint256 price, uint256 timestamp)

PositionLiquidated

Source

Signature: PositionLiquidated(uint256 id, address account, address liquidator, int256 size, uint256 price, uint256 flaggerFee, uint256 liquidatorFee, uint256 stakersFee)

PositionModified

Source

Signature: PositionModified(uint256 id, address account, uint256 margin, int256 size, int256 tradeSize, uint256 lastPrice, uint256 fundingIndex, uint256 fee, int256 skew)