Documentation ¶
Index ¶
- type DaemonLiquidationInfo
- func (ls *DaemonLiquidationInfo) GetBlockHeight() uint32
- func (ls *DaemonLiquidationInfo) GetLiquidatableSubaccountIds() []satypes.SubaccountId
- func (ls *DaemonLiquidationInfo) GetNegativeTncSubaccountIds() []satypes.SubaccountId
- func (ls *DaemonLiquidationInfo) GetSubaccountsWithPositions() map[uint32]*clobtypes.SubaccountOpenPositionInfo
- func (ls *DaemonLiquidationInfo) UpdateBlockHeight(blockHeight uint32)
- func (ls *DaemonLiquidationInfo) UpdateLiquidatableSubaccountIds(updates []satypes.SubaccountId)
- func (ls *DaemonLiquidationInfo) UpdateNegativeTncSubaccountIds(updates []satypes.SubaccountId)
- func (ls *DaemonLiquidationInfo) UpdateSubaccountsWithPositions(subaccountsWithPositions []clobtypes.SubaccountOpenPositionInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaemonLiquidationInfo ¶
DaemonLiquidationInfo maintains the list of subaccount ids to be liquidated in the next block. Methods are goroutine safe.
func NewDaemonLiquidationInfo ¶
func NewDaemonLiquidationInfo() *DaemonLiquidationInfo
NewDaemonLiquidationInfo creates a new `NewDaemonLiquidationInfo` struct.
func (*DaemonLiquidationInfo) GetBlockHeight ¶
func (ls *DaemonLiquidationInfo) GetBlockHeight() uint32
GetBlockHeight returns the block height of the last update.
func (*DaemonLiquidationInfo) GetLiquidatableSubaccountIds ¶
func (ls *DaemonLiquidationInfo) GetLiquidatableSubaccountIds() []satypes.SubaccountId
GetLiquidatableSubaccountIds returns the list of potentially liquidatable subaccount ids reported by the liquidation daemon.
func (*DaemonLiquidationInfo) GetNegativeTncSubaccountIds ¶
func (ls *DaemonLiquidationInfo) GetNegativeTncSubaccountIds() []satypes.SubaccountId
GetNegativeTncSubaccountIds returns the list of subaccount ids with negative total net collateral reported by the liquidation daemon.
func (*DaemonLiquidationInfo) GetSubaccountsWithPositions ¶
func (ls *DaemonLiquidationInfo) GetSubaccountsWithPositions() map[uint32]*clobtypes.SubaccountOpenPositionInfo
GetSubaccountsWithPositions returns the list of subaccount ids with open positions.
func (*DaemonLiquidationInfo) UpdateBlockHeight ¶
func (ls *DaemonLiquidationInfo) UpdateBlockHeight(blockHeight uint32)
UpdateBlockHeight updates the struct with the given block height.
func (*DaemonLiquidationInfo) UpdateLiquidatableSubaccountIds ¶
func (ls *DaemonLiquidationInfo) UpdateLiquidatableSubaccountIds(updates []satypes.SubaccountId)
UpdateLiquidatableSubaccountIds updates the struct with the given a list of potentially liquidatable subaccount ids.
func (*DaemonLiquidationInfo) UpdateNegativeTncSubaccountIds ¶
func (ls *DaemonLiquidationInfo) UpdateNegativeTncSubaccountIds(updates []satypes.SubaccountId)
UpdateNegativeTncSubaccountIds updates the struct with the given a list of subaccount ids with negative total net collateral.
func (*DaemonLiquidationInfo) UpdateSubaccountsWithPositions ¶
func (ls *DaemonLiquidationInfo) UpdateSubaccountsWithPositions( subaccountsWithPositions []clobtypes.SubaccountOpenPositionInfo, )
UpdateSubaccountsWithPositions updates the struct with the given a list of subaccount ids with open positions.