package
0.79.0-preview.4
Repository: https://github.com/vegaprotocol/vega.git
Documentation: pkg.go.dev

# Packages

Package mocks is a generated GoMock package.
Package mocks_amm is a generated GoMock package.

# Functions

CalculateTimeWeightedAverageBookPrice calculates the time weighted average of the timepoints where book price was calculated.
CompositePriceByMedian returns the median mark price out of the non stale ones or nil if there is none.
CompositePriceByWeight calculates the mid price out of the non-stale price by the weights assigned to each mid price.
MedianPrice returns the median of the given prices (pBook, pTrades, pOracle1..n).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewMarketActivityTracker instantiates the fees tracker.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PriceFromBookAtTime calculate the mark price as the average price of buying/selling the quantity implied by scaling C by the factors.
PriceFromTrades calculates the mark price from trades in the current price frequency.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
InitialOrderVersion is set on `Version` field for every new order submission read from the network.
PriceMoveAll used to indicate everything has moved.
PriceMoveBestAsk used to indicate that the best ask price has moved.
PriceMoveBestBid used to indicate that the best bid price has moved.
PriceMoveMid used to indicate that the mid price has moved.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
ErrCannotRejectMarketNotInProposedState.
ErrCannotRepriceDuringAuction.
ErrCannotStateOpeningAuctionForMarketNotInProposedState.
No description provided by the author
ErrCommitmentSubmissionNotAllowed no commitment submission are permitted in the current state.
ErrEmptyMarketID is returned if processed market has an empty id.
ErrFOKOrderReceivedAuctionTrading is returned if a fok order hits the market when in auction state.
ErrGFAOrderReceivedDuringContinuousTrading is returned is a gfa order hits the market when the market is in continuous trading state.
ErrGFNOrderReceivedAuctionTrading is returned if a gfn order hits the market when in auction state.
ErrInvalidAmendRemainQuantity signals incorrect remaining qty for a reduce by amend.
ErrInvalidExpiresAtTime is returned if the expire time is before the createdAt time.
ErrInvalidOrderPrice is returned when an order is submitted to a capped future with a price > max price.
ErrInvalidOrderType is returned if processed order has an invalid order type.
ErrIOCOrderReceivedAuctionTrading is returned if a ioc order hits the market when in auction state.
ErrIsolatedMarginFullyCollateralised is returned when a party tries to switch margin modes on a fully collateralised market.
ErrMarginCheckFailed signals that a margin check for a position failed.
ErrMarginCheckInsufficient signals that a margin had not enough funds.
ErrMarketClosed signals that an action have been tried to be applied on a closed market.
No description provided by the author
ErrMissingGeneralAccountForParty ...
ErrNotEnoughStake is returned when a LP update results in not enough commitment.
ErrNotEnoughVolumeToZeroOutNetworkOrder ...
ErrOrderNotFound we cannot find the order in the market.
ErrPartyAlreadyLiquidityProvider is returned when a LP is submitted by a party which is already LP.
ErrPartyDoNotExists signals that the party used does not exists.
No description provided by the author
ErrPartyInsufficientAssetBalance is returned when a party does not have sufficient balance of the required asset to perform an action.
ErrPartyNotLiquidityProvider is returned when a LP update or cancel does not match an LP party.
ErrSellOrderNotAllowed no sell orders are allowed in the current state.
ErrSettlementDataOutOfRange is returned when a capped future receives settlement data that is outside of the acceptable range (either > max price, or neither 0 nor max for binary settlements).
No description provided by the author
No description provided by the author
No description provided by the author
ErrStopOrderNotAllowedDuringOpeningAuction is returned if a trader attempts to send a stop order to a market that is in opening auction.
ErrStopOrderNotAllowedSameExpiryTimeForOCO is returned if both sides of an OCO have the same expiry time.
No description provided by the author
ErrStopOrderSizeOverrideNotSupportedForSpots is returned when a stop order is received with size override for a spot product.
No description provided by the author
No description provided by the author
ErrTradingNotAllowed no trading related functionalities are allowed in the current state.
ErrUnableToReprice we are unable to get a price required to reprice.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
EquityShares module controls the Equity sharing algorithm described on the spec: https://github.com/vegaprotocol/product/blob/02af55e048a92a204e9ee7b7ae6b4475a198c7ff/specs/0042-setting-fees-and-rewarding-lps.md#calculating-liquidity-provider-equity-like-share.
No description provided by the author
No description provided by the author
No description provided by the author
MarketActivityTracker tracks how much fees are paid and received for a market by parties by epoch.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AuctionState ..
No description provided by the author
Broker (no longer need to mock this, use the broker/mocks wrapper).
nolint:interfacebloat.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OracleEngine ...
No description provided by the author
PriceMonitor interface to handle price monitoring/auction triggers @TODO the interface shouldn't be imported here.
No description provided by the author
No description provided by the author
No description provided by the author
TimeService ...

# Type aliases

No description provided by the author