Documentation ¶
Index ¶
- Variables
- type DOC
- type DPE
- 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 SPE
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 LSE ¶
type LSE interface { events.Event PartyID() string MarketID() string Amount() *num.Int Timestamp() int64 }
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)
Click to show internal directories.
Click to hide internal directories.