Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

perps_state

Global perps runtime state: last funding time, vault share supply, treasury, insurance fund.

The insurance fund collects liquidation fees and absorbs bad debt; it can go negative when accumulated bad debt exceeds fees collected, with future fees naturally replenishing it. The vault and insurance fund are isolated — external liquidation losses never touch vault margin. See protocol book: perps/4-liquidation-and-adl §7.

Signature

def perps_state(self) -> State

Example

from dango.info import Info
from dango.utils.constants import MAINNET_API_URL
 
info = Info(MAINNET_API_URL, skip_ws=True)
state = info.perps_state()
print(state["vault_share_supply"], state["insurance_fund"])

Returns

State — TypedDict with global runtime fields. See State for the full field list.

See also