Skip to content

PerpsV2MarketData

Description

Source: contracts/PerpsV2MarketData.sol

Structs

FeeRates

Source

Field Type Description
takerFee uint256 TBA
makerFee uint256 TBA
takerFeeDelayedOrder uint256 TBA
makerFeeDelayedOrder uint256 TBA
takerFeeOffchainDelayedOrder uint256 TBA
makerFeeOffchainDelayedOrder uint256 TBA
overrideCommitFee uint256 TBA

FundingDetails

Source

Field Type Description
currentFundingRate int256 TBA
unrecordedFunding int256 TBA
fundingLastRecomputed uint256 TBA

FundingParameters

Source

Field Type Description
maxFundingVelocity uint256 TBA
skewScale uint256 TBA

FuturesGlobals

Source

Field Type Description
minInitialMargin uint256 TBA
liquidationFeeRatio uint256 TBA
liquidationBufferRatio uint256 TBA
minKeeperFee uint256 TBA
maxKeeperFee uint256 TBA

MarketData

Source

Field Type Description
market address TBA
baseAsset bytes32 TBA
marketKey bytes32 TBA
feeRates struct PerpsV2MarketData.FeeRates TBA
limits struct PerpsV2MarketData.MarketLimits TBA
fundingParameters struct PerpsV2MarketData.FundingParameters TBA
marketSizeDetails struct PerpsV2MarketData.MarketSizeDetails TBA
priceDetails struct PerpsV2MarketData.PriceDetails TBA

MarketLimits

Source

Field Type Description
maxLeverage uint256 TBA
maxMarketValue uint256 TBA

MarketSizeDetails

Source

Field Type Description
marketSize uint256 TBA
sides struct PerpsV2MarketData.Sides TBA
marketDebt uint256 TBA
marketSkew int256 TBA

MarketSummary

Source

Field Type Description
market address TBA
asset bytes32 TBA
key bytes32 TBA
maxLeverage uint256 TBA
price uint256 TBA
marketSize uint256 TBA
marketSkew int256 TBA
marketDebt uint256 TBA
currentFundingRate int256 TBA
currentFundingVelocity int256 TBA
feeRates struct PerpsV2MarketData.FeeRates TBA

PositionData

Source

Field Type Description
position struct IPerpsV2MarketBaseTypes.Position TBA
notionalValue int256 TBA
profitLoss int256 TBA
accruedFunding int256 TBA
remainingMargin uint256 TBA
accessibleMargin uint256 TBA
liquidationPrice uint256 TBA
canLiquidatePosition bool TBA

PriceDetails

Source

Field Type Description
price uint256 TBA
invalid bool TBA

Sides

Source

Field Type Description
long uint256 TBA
short uint256 TBA

Variables

resolverProxy

Source

Type: contract IAddressResolver

Constructor

constructor

Source

Details

Signature

constructor(contract IAddressResolver _resolverProxy)

Visibility

public

State Mutability

``

Views

allMarketSummaries

Source

Details

Signature

allMarketSummaries() view returns (struct PerpsV2MarketData.MarketSummary[])

Visibility

external

State Mutability

view

allProxiedMarketSummaries

Source

Details

Signature

allProxiedMarketSummaries() view returns (struct PerpsV2MarketData.MarketSummary[])

Visibility

external

State Mutability

view

globals

Source

Details

Signature

globals() view returns (struct PerpsV2MarketData.FuturesGlobals)

Visibility

external

State Mutability

view

marketDetails

Source

Details

Signature

marketDetails(contract IPerpsV2MarketViews market) view returns (struct PerpsV2MarketData.MarketData)

Visibility

external

State Mutability

view

marketDetailsForKey

Source

Details

Signature

marketDetailsForKey(bytes32 marketKey) view returns (struct PerpsV2MarketData.MarketData)

Visibility

external

State Mutability

view

marketSummaries

Source

Details

Signature

marketSummaries(address[] markets) view returns (struct PerpsV2MarketData.MarketSummary[])

Visibility

external

State Mutability

view

marketSummariesForKeys

Source

Details

Signature

marketSummariesForKeys(bytes32[] marketKeys) view returns (struct PerpsV2MarketData.MarketSummary[])

Visibility

external

State Mutability

view

parameters

Source

Details

Signature

parameters(bytes32 marketKey) view returns (struct IPerpsV2MarketSettings.Parameters)

Visibility

external

State Mutability

view

positionDetails

Source

Details

Signature

positionDetails(contract IPerpsV2MarketViews market, address account) view returns (struct PerpsV2MarketData.PositionData)

Visibility

external

State Mutability

view

positionDetailsForMarketKey

Source

Details

Signature

positionDetailsForMarketKey(bytes32 marketKey, address account) view returns (struct PerpsV2MarketData.PositionData)

Visibility

external

State Mutability

view

Internal Functions

_accessibleMargin

Source

Details

Signature

_accessibleMargin(contract IPerpsV2MarketViews market, address account) view returns (uint256)

Visibility

internal

State Mutability

view

_accruedFunding

Source

Details

Signature

_accruedFunding(contract IPerpsV2MarketViews market, address account) view returns (int256)

Visibility

internal

State Mutability

view

_fundingParameters

Source

Details

Signature

_fundingParameters(struct IPerpsV2MarketSettings.Parameters params) pure returns (struct PerpsV2MarketData.FundingParameters)

Visibility

internal

State Mutability

pure

_futuresMarketManager

Source

Details

Signature

_futuresMarketManager() view returns (contract IFuturesMarketManager)

Visibility

internal

State Mutability

view

_liquidationPrice

Source

Details

Signature

_liquidationPrice(contract IPerpsV2MarketViews market, address account) view returns (uint256)

Visibility

internal

State Mutability

view

_marketDetails

Source

Details

Signature

_marketDetails(contract IPerpsV2MarketViews market) view returns (struct PerpsV2MarketData.MarketData)

Visibility

internal

State Mutability

view

_marketSizes

Source

Details

Signature

_marketSizes(contract IPerpsV2MarketViews market) view returns (struct PerpsV2MarketData.Sides)

Visibility

internal

State Mutability

view

_marketSummaries

Source

Details

Signature

_marketSummaries(address[] markets) view returns (struct PerpsV2MarketData.MarketSummary[])

Visibility

internal

State Mutability

view

_notionalValue

Source

Details

Signature

_notionalValue(contract IPerpsV2MarketViews market, address account) view returns (int256)

Visibility

internal

State Mutability

view

_parameters

Source

Details

Signature

_parameters(bytes32 marketKey) view returns (struct IPerpsV2MarketSettings.Parameters)

Visibility

internal

State Mutability

view

_perpsV2MarketSettings

Source

Details

Signature

_perpsV2MarketSettings() view returns (contract IPerpsV2MarketSettings)

Visibility

internal

State Mutability

view

_position

Source

Details

Signature

_position(contract IPerpsV2MarketViews market, address account) view returns (struct IPerpsV2MarketBaseTypes.Position)

Visibility

internal

State Mutability

view

_positionDetails

Source

Details

Signature

_positionDetails(contract IPerpsV2MarketViews market, address account) view returns (struct PerpsV2MarketData.PositionData)

Visibility

internal

State Mutability

view

_profitLoss

Source

Details

Signature

_profitLoss(contract IPerpsV2MarketViews market, address account) view returns (int256)

Visibility

internal

State Mutability

view

_remainingMargin

Source

Details

Signature

_remainingMargin(contract IPerpsV2MarketViews market, address account) view returns (uint256)

Visibility

internal

State Mutability

view