Documentation ¶
Index ¶
- Variables
- type DOC
- type DPE
- type FP
- type LSE
- type Position
- type Positions
- func (p *Positions) GetAllPositions() ([]*types.Position, error)
- func (p *Positions) GetPositionStatesByParty(party string) ([]vega.PositionStatus, error)
- func (p *Positions) GetPositionsByMarket(market string) ([]*types.Position, error)
- func (p *Positions) GetPositionsByMarketAndParty(market, party string) (*types.Position, error)
- func (p *Positions) GetPositionsByParty(party string) ([]*types.Position, error)
- func (p *Positions) GetStateByMarketAndParty(market, party string) (vega.PositionStatus, error)
- func (p *Positions) Push(evts ...events.Event)
- func (p *Positions) Types() []events.Type
- type SDE
- type SE
- type SME
- type SPE
- type TE
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMarketNotFound = errors.New("could not find market")
Functions ¶
This section is empty.
Types ¶
type DPE ¶ added in v0.71.0
type DPE interface { events.Event MarketID() string DistressedParties() []string SafeParties() []string }
DPE DistressedPositionsEvent.
type FP ¶ added in v0.73.0
type FP interface { events.Event MarketID() string IsParty(id string) bool FundingPayments() *eventspb.FundingPayments }
FP FundingPaymentsEvent.
type LSE ¶
type LSE interface { events.Event PartyID() string MarketID() string Amount() *num.Int Timestamp() int64 IsFunding() bool }
LSE LossSocializationEvent.
type Positions ¶
type Positions struct { *subscribers.Base // contains filtered or unexported fields }
Positions plugin taking settlement data to build positions API data.
func NewPositions ¶
func (*Positions) GetAllPositions ¶
GetAllPositions returns all positions, across markets.
func (*Positions) GetPositionStatesByParty ¶ added in v0.71.0
func (p *Positions) GetPositionStatesByParty(party string) ([]vega.PositionStatus, error)
func (*Positions) GetPositionsByMarket ¶
GetPositionsByMarket get all party positions in a given market.
func (*Positions) GetPositionsByMarketAndParty ¶
GetPositionsByMarketAndParty get the position of a single party in a given market.
func (*Positions) GetPositionsByParty ¶
GetPositionsByParty get all positions for a given party.
func (*Positions) GetStateByMarketAndParty ¶ added in v0.71.0
func (p *Positions) GetStateByMarketAndParty(market, party string) (vega.PositionStatus, error)
type SE ¶
type SE interface { events.Event PartyID() string MarketID() string Price() *num.Uint Timestamp() int64 }
SE SettleEvent - common denominator between SPE & SDE.
type SME ¶ added in v0.73.0
type SME interface { MarketID() string SettledPrice() *num.Uint PositionFactor() num.Decimal TxHash() string }
SME SettleMarketEvent.
Click to show internal directories.
Click to hide internal directories.