Documentation ¶
Index ¶
- type Account
- func (a *Account) AddAccountBalance(b entities.AccountBalance) error
- func (a *Account) Flush(ctx context.Context) error
- func (a *Account) GetAll(ctx context.Context) ([]entities.Account, error)
- func (a *Account) GetBalancesByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.AccountBalance, error)
- func (a *Account) GetByID(ctx context.Context, id entities.AccountID) (entities.Account, error)
- func (a *Account) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Account, error)
- func (a *Account) ObserveAccountBalances(ctx context.Context, retries int, marketID string, partyID string, ...) (accountCh <-chan []entities.AccountBalance, ref uint64)
- func (a *Account) Obtain(ctx context.Context, acc *entities.Account) error
- func (a *Account) Query(ctx context.Context, filter entities.AccountFilter) ([]entities.Account, error)
- func (a *Account) QueryAggregatedBalances(ctx context.Context, filter entities.AccountFilter, ...) (*[]entities.AggregatedBalance, entities.PageInfo, error)
- func (a *Account) QueryBalances(ctx context.Context, filter entities.AccountFilter, ...) ([]entities.AccountBalance, entities.PageInfo, error)
- type AccountSource
- type AccountStore
- type Asset
- type BalanceStore
- type Block
- type Chain
- type ChainStore
- type Checkpoint
- type Config
- type Delegation
- func (d *Delegation) Add(ctx context.Context, delegation entities.Delegation) error
- func (d *Delegation) Get(ctx context.Context, partyID *string, nodeID *string, epoch *int64, ...) ([]entities.Delegation, entities.PageInfo, error)
- func (d *Delegation) GetAll(ctx context.Context) ([]entities.Delegation, error)
- func (d *Delegation) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Delegation, error)
- type Deposit
- type Epoch
- type EthereumKeyRotation
- func (e *EthereumKeyRotation) Add(ctx context.Context, kr entities.EthereumKeyRotation) error
- func (e *EthereumKeyRotation) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.EthereumKeyRotation, error)
- func (e *EthereumKeyRotation) List(ctx context.Context, nodeID entities.NodeID, ...) ([]entities.EthereumKeyRotation, entities.PageInfo, error)
- type FundingPayment
- type FundingPeriods
- type Governance
- func (g *Governance) AddProposal(ctx context.Context, p entities.Proposal) error
- func (g *Governance) AddVote(ctx context.Context, v entities.Vote) error
- func (g *Governance) GetByPartyConnection(ctx context.Context, partyID string, pagination entities.CursorPagination) ([]entities.Vote, entities.PageInfo, error)
- func (g *Governance) GetConnection(ctx context.Context, proposalID, partyID *string, ...) ([]entities.Vote, entities.PageInfo, error)
- func (g *Governance) GetNoVotesForProposal(ctx context.Context, proposalID string) ([]entities.Vote, error)
- func (g *Governance) GetProposalByID(ctx context.Context, id string) (entities.Proposal, error)
- func (g *Governance) GetProposalByReference(ctx context.Context, ref string) (entities.Proposal, error)
- func (g *Governance) GetProposals(ctx context.Context, inState *entities.ProposalState, partyID *string, ...) ([]entities.Proposal, entities.PageInfo, error)
- func (g *Governance) GetProposalsByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Proposal, error)
- func (g *Governance) GetVotes(ctx context.Context, proposalID, partyID *string, value *entities.VoteValue) ([]entities.Vote, error)
- func (g *Governance) GetVotesByParty(ctx context.Context, partyID string) ([]entities.Vote, error)
- func (g *Governance) GetVotesByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Vote, error)
- func (g *Governance) GetYesVotesForProposal(ctx context.Context, proposalID string) ([]entities.Vote, error)
- func (g *Governance) ObservePartyVotes(ctx context.Context, retries int, partyID string) (<-chan []entities.Vote, uint64)
- func (g *Governance) ObserveProposalVotes(ctx context.Context, retries int, proposalID string) (<-chan []entities.Vote, uint64)
- func (g *Governance) ObserveProposals(ctx context.Context, retries int, partyID *string) (<-chan []entities.Proposal, uint64)
- type KeyRotations
- type Ledger
- func (l *Ledger) AddLedgerEntry(le entities.LedgerEntry) error
- func (l *Ledger) AddTransferResponse(le *vega.LedgerMovement)
- func (l *Ledger) Export(ctx context.Context, partyID string, assetID *string, ...) error
- func (l *Ledger) Flush(ctx context.Context) error
- func (l *Ledger) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.LedgerEntry, error)
- func (l *Ledger) GetSubscribersCount() int32
- func (l *Ledger) Observe(ctx context.Context, retries int) (<-chan []*vega.LedgerMovement, uint64)
- func (l *Ledger) Query(ctx context.Context, filter *entities.LedgerEntryFilter, ...) (*[]entities.AggregatedLedgerEntry, entities.PageInfo, error)
- type LedgerEntriesStore
- type LiquidityProvision
- type MarginLevelsStore
- type MarketData
- func (m *MarketData) Add(data *entities.MarketData) error
- func (m *MarketData) Flush(ctx context.Context) error
- func (m *MarketData) GetHistoricMarketData(ctx context.Context, marketID string, start, end *time.Time, ...) ([]entities.MarketData, entities.PageInfo, error)
- func (m *MarketData) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error)
- func (m *MarketData) GetMarketsData(ctx context.Context) ([]entities.MarketData, error)
- func (m *MarketData) Initialise(ctx context.Context) error
- func (m *MarketData) ObserveMarketData(ctx context.Context, retries int, marketID []string) (<-chan []*entities.MarketData, uint64)
- type MarketDataStore
- type MarketDepth
- func (m *MarketDepth) AddOrder(order *types.Order, vegaTime time.Time, sequenceNumber uint64)
- func (m *MarketDepth) GetAllOrders(market string) map[string]*types.Order
- func (m *MarketDepth) GetBestAskPrice(market string) *num.Uint
- func (m *MarketDepth) GetBestBidPrice(market string) *num.Uint
- func (m *MarketDepth) GetBuyPriceLevels(market string) int
- func (m *MarketDepth) GetMarketDepth(market string, limit uint64) *types.MarketDepth
- func (m *MarketDepth) GetOrderCount(market string) int64
- func (m *MarketDepth) GetOrderCountAtPrice(market string, side types.Side, price uint64) uint64
- func (m *MarketDepth) GetPriceLevels(market string) int
- func (m *MarketDepth) GetSellPriceLevels(market string) int
- func (m *MarketDepth) GetTotalVolume(market string) int64
- func (m *MarketDepth) GetVolumeAtPrice(market string, side types.Side, price uint64) uint64
- func (m *MarketDepth) Initialise(ctx context.Context) error
- func (m *MarketDepth) ObserveDepth(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepth, uint64)
- func (m *MarketDepth) ObserveDepthUpdates(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepthUpdate, uint64)
- func (m *MarketDepth) PublishAtEndOfBlock()
- type MarketStore
- type Markets
- func (m *Markets) GetAllPaged(ctx context.Context, marketID string, pagination entities.CursorPagination, ...) ([]entities.Market, entities.PageInfo, error)
- func (m *Markets) GetByID(ctx context.Context, marketID string) (entities.Market, error)
- func (m *Markets) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Market, error)
- func (m *Markets) GetMarketScalingFactor(ctx context.Context, marketID string) (num.Decimal, bool)
- func (m *Markets) Initialise(ctx context.Context) error
- func (m *Markets) ListSuccessorMarkets(ctx context.Context, marketID string, childrenOnly bool, ...) ([]entities.SuccessorMarket, entities.PageInfo, error)
- func (m *Markets) Upsert(ctx context.Context, market *entities.Market) error
- type MultiSig
- type NetworkLimits
- type NetworkParameter
- type Node
- type Notary
- type OracleData
- type OracleSpec
- type Order
- func (o *Order) Add(order entities.Order) error
- func (o *Order) Flush(ctx context.Context) error
- func (o *Order) GetAll(ctx context.Context) ([]entities.Order, error)
- func (o *Order) GetByMarketAndID(ctx context.Context, marketIDstr string, orderIDs []string) ([]entities.Order, error)
- func (o *Order) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Order, error)
- func (o *Order) GetLiveOrders(ctx context.Context) ([]entities.Order, error)
- func (o *Order) GetOrder(ctx context.Context, orderID string, version *int32) (entities.Order, error)
- func (o *Order) ListOrderVersions(ctx context.Context, orderID string, p entities.CursorPagination) ([]entities.Order, entities.PageInfo, error)
- func (o *Order) ListOrders(ctx context.Context, p entities.CursorPagination, filter entities.OrderFilter) ([]entities.Order, entities.PageInfo, error)
- func (o *Order) ObserveOrders(ctx context.Context, retries int, markets []string, parties []string, ...) (<-chan []entities.Order, uint64)
- type OrderStore
- type Party
- type PartyActivityStreak
- type Position
- func (p *Position) Add(ctx context.Context, pos entities.Position) error
- func (p *Position) Flush(ctx context.Context) error
- func (p *Position) GetAll(ctx context.Context) ([]entities.Position, error)
- func (p *Position) GetByMarket(ctx context.Context, marketID string) ([]entities.Position, error)
- func (p *Position) GetByMarketAndParties(ctx context.Context, marketID string, partyIDs []string) ([]entities.Position, error)
- func (p *Position) GetByMarketAndParty(ctx context.Context, marketID string, partyID string) (entities.Position, error)
- func (p *Position) GetByParty(ctx context.Context, partyID entities.PartyID) ([]entities.Position, error)
- func (p *Position) GetByPartyConnection(ctx context.Context, partyIDs []entities.PartyID, ...) ([]entities.Position, entities.PageInfo, error)
- func (p *Position) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Position, error)
- func (p *Position) Observe(ctx context.Context, retries int, partyID, marketID string) (<-chan []entities.Position, uint64)
- type PositionStore
- type ProposalStore
- type ProtocolUpgrade
- func (p *ProtocolUpgrade) AddProposal(ctx context.Context, pup entities.ProtocolUpgradeProposal) error
- func (p *ProtocolUpgrade) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.ProtocolUpgradeProposal, error)
- func (p *ProtocolUpgrade) GetProtocolUpgradeStarted() bool
- func (p *ProtocolUpgrade) ListProposals(ctx context.Context, status *entities.ProtocolUpgradeProposalStatus, ...) ([]entities.ProtocolUpgradeProposal, entities.PageInfo, error)
- func (p *ProtocolUpgrade) SetProtocolUpgradeStarted()
- type ReferralFeeStats
- type ReferralPrograms
- type ReferralSets
- type Reward
- func (r *Reward) Add(ctx context.Context, reward entities.Reward) error
- func (r *Reward) GetAll(ctx context.Context) ([]entities.Reward, error)
- func (r *Reward) GetByCursor(ctx context.Context, partyID, assetID *string, fromEpoch, toEpoch *uint64, ...) ([]entities.Reward, entities.PageInfo, error)
- func (r *Reward) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Reward, error)
- func (r *Reward) GetEpochRewardSummaries(ctx context.Context, filter entities.RewardSummaryFilter, ...) ([]entities.EpochRewardSummary, entities.PageInfo, error)
- func (r *Reward) GetSummaries(ctx context.Context, partyID *string, assetID *string) ([]entities.RewardSummary, error)
- type Risk
- func (r *Risk) Add(marginLevel entities.MarginLevels) error
- func (r *Risk) Flush(ctx context.Context) error
- func (r *Risk) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.MarginLevels, error)
- func (r *Risk) GetMarginLevelsByIDWithCursorPagination(ctx context.Context, partyID, marketID string, ...) ([]entities.MarginLevels, entities.PageInfo, error)
- func (r *Risk) ObserveMarginLevels(ctx context.Context, retries int, partyID, marketID string) (accountCh <-chan []entities.MarginLevels, ref uint64)
- type RiskFactor
- type SnapshotData
- type StakeLinking
- type StopOrderStore
- type StopOrders
- func (s *StopOrders) Add(order entities.StopOrder) error
- func (s *StopOrders) Flush(ctx context.Context) error
- func (s *StopOrders) GetStopOrder(ctx context.Context, orderID string) (entities.StopOrder, error)
- func (s *StopOrders) ListStopOrders(ctx context.Context, filter entities.StopOrderFilter, ...) ([]entities.StopOrder, entities.PageInfo, error)
- type Teams
- type Trade
- func (t *Trade) Add(trade *entities.Trade) error
- func (t *Trade) Flush(ctx context.Context) error
- func (t *Trade) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Trade, error)
- func (t *Trade) GetLastTradeByMarket(ctx context.Context, market string) ([]entities.Trade, error)
- func (t *Trade) List(ctx context.Context, marketIDs []entities.MarketID, ...) ([]entities.Trade, entities.PageInfo, error)
- func (t *Trade) Observe(ctx context.Context, retries int, marketIDs []string, partyIDs []string) (<-chan []*entities.Trade, uint64)
- type Transfer
- type VestingStats
- type VolumeDiscountPrograms
- type VolumeDiscountStats
- type VoteStore
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccount ¶
func NewAccount(aStore AccountStore, bStore BalanceStore, log *logging.Logger) *Account
func (*Account) AddAccountBalance ¶
func (a *Account) AddAccountBalance(b entities.AccountBalance) error
func (*Account) GetBalancesByTxHash ¶ added in v0.71.0
func (*Account) GetByTxHash ¶ added in v0.71.0
func (*Account) ObserveAccountBalances ¶
func (*Account) QueryAggregatedBalances ¶
func (a *Account) QueryAggregatedBalances(ctx context.Context, filter entities.AccountFilter, dateRange entities.DateRange, pagination entities.CursorPagination) (*[]entities.AggregatedBalance, entities.PageInfo, error)
func (*Account) QueryBalances ¶
func (a *Account) QueryBalances(ctx context.Context, filter entities.AccountFilter, pagination entities.CursorPagination) ([]entities.AccountBalance, entities.PageInfo, error)
type AccountSource ¶
type AccountStore ¶
type AccountStore interface { GetByID(ctx context.Context, id entities.AccountID) (entities.Account, error) GetAll(ctx context.Context) ([]entities.Account, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Account, error) Obtain(ctx context.Context, a *entities.Account) error Query(ctx context.Context, filter entities.AccountFilter) ([]entities.Account, error) QueryBalances(ctx context.Context, filter entities.AccountFilter, pagination entities.CursorPagination) ([]entities.AccountBalance, entities.PageInfo, error) GetBalancesByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.AccountBalance, error) }
type BalanceStore ¶
type BalanceStore interface { Flush(ctx context.Context) ([]entities.AccountBalance, error) Add(b entities.AccountBalance) error Query(ctx context.Context, filter entities.AccountFilter, dateRange entities.DateRange, pagination entities.CursorPagination) (*[]entities.AggregatedBalance, entities.PageInfo, error) }
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func NewChain ¶
func NewChain(store ChainStore) *Chain
func (*Chain) GetChainID ¶
GetChainID returns the current chain ID stored in the database (if one is set).
If one is not set, return empty string and no error. If an error occurs, return empty string and an that error. It caches the result of calling to the store, so that once we have successfully retrieved a chain ID, we don't ask again.
func (*Chain) SetChainID ¶
type ChainStore ¶
type Checkpoint ¶
type Checkpoint struct{ *sqlstore.Checkpoints }
func NewCheckpoint ¶
func NewCheckpoint(store *sqlstore.Checkpoints) *Checkpoint
type Config ¶
Config represent the configuration of the candle package.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type Delegation ¶
type Delegation struct {
// contains filtered or unexported fields
}
func NewDelegation ¶
func NewDelegation(store delegationStore, log *logging.Logger) *Delegation
func (*Delegation) Add ¶
func (d *Delegation) Add(ctx context.Context, delegation entities.Delegation) error
func (*Delegation) Get ¶
func (d *Delegation) Get(ctx context.Context, partyID *string, nodeID *string, epoch *int64, p entities.Pagination) ([]entities.Delegation, entities.PageInfo, error)
func (*Delegation) GetAll ¶
func (d *Delegation) GetAll(ctx context.Context) ([]entities.Delegation, error)
func (*Delegation) GetByTxHash ¶ added in v0.71.0
func (d *Delegation) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Delegation, error)
type Deposit ¶
func NewDeposit ¶
type EthereumKeyRotation ¶
type EthereumKeyRotation struct {
// contains filtered or unexported fields
}
func NewEthereumKeyRotation ¶
func NewEthereumKeyRotation(service ethereumKeyRotationsStore, log *logging.Logger) *EthereumKeyRotation
func (*EthereumKeyRotation) Add ¶
func (e *EthereumKeyRotation) Add(ctx context.Context, kr entities.EthereumKeyRotation) error
func (*EthereumKeyRotation) GetByTxHash ¶ added in v0.71.0
func (e *EthereumKeyRotation) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.EthereumKeyRotation, error)
func (*EthereumKeyRotation) List ¶
func (e *EthereumKeyRotation) List(ctx context.Context, nodeID entities.NodeID, pagination entities.CursorPagination, ) ([]entities.EthereumKeyRotation, entities.PageInfo, error)
type FundingPayment ¶ added in v0.73.0
type FundingPayment struct{ *sqlstore.FundingPayments }
func NewFundingPayment ¶ added in v0.73.0
func NewFundingPayment(store *sqlstore.FundingPayments) *FundingPayment
type FundingPeriods ¶ added in v0.73.0
type FundingPeriods struct{ *sqlstore.FundingPeriods }
func NewFundingPeriods ¶ added in v0.73.0
func NewFundingPeriods(store *sqlstore.FundingPeriods) *FundingPeriods
type Governance ¶
type Governance struct {
// contains filtered or unexported fields
}
func NewGovernance ¶
func NewGovernance(pStore ProposalStore, vStore VoteStore, log *logging.Logger) *Governance
func (*Governance) AddProposal ¶
func (*Governance) GetByPartyConnection ¶
func (*Governance) GetConnection ¶ added in v0.63.0
func (*Governance) GetNoVotesForProposal ¶
func (*Governance) GetProposalByID ¶
func (*Governance) GetProposalByReference ¶
func (*Governance) GetProposals ¶
func (g *Governance) GetProposals(ctx context.Context, inState *entities.ProposalState, partyID *string, proposalType *entities.ProposalType, pagination entities.CursorPagination, ) ([]entities.Proposal, entities.PageInfo, error)
func (*Governance) GetProposalsByTxHash ¶ added in v0.71.0
func (*Governance) GetVotesByParty ¶
func (*Governance) GetVotesByTxHash ¶ added in v0.71.0
func (*Governance) GetYesVotesForProposal ¶
func (*Governance) ObservePartyVotes ¶
func (*Governance) ObserveProposalVotes ¶
func (*Governance) ObserveProposals ¶
type KeyRotations ¶
type KeyRotations struct{ *sqlstore.KeyRotations }
func NewKeyRotations ¶
func NewKeyRotations(store *sqlstore.KeyRotations) *KeyRotations
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
func (*Ledger) AddLedgerEntry ¶
func (l *Ledger) AddLedgerEntry(le entities.LedgerEntry) error
func (*Ledger) AddTransferResponse ¶
func (l *Ledger) AddTransferResponse(le *vega.LedgerMovement)
func (*Ledger) GetByTxHash ¶ added in v0.71.0
func (*Ledger) GetSubscribersCount ¶
type LedgerEntriesStore ¶ added in v0.58.0
type LedgerEntriesStore interface { Query(filter *entities.LedgerEntryFilter, dateRange entities.DateRange, pagination entities.CursorPagination) (*[]entities.AggregatedLedgerEntry, entities.PageInfo, error) Export(ctx context.Context, partyID, assetID string, dateRange entities.DateRange, pagination entities.CursorPagination) ([]byte, entities.PageInfo, error) }
type LiquidityProvision ¶
type LiquidityProvision struct{ *sqlstore.LiquidityProvision }
func NewLiquidityProvision ¶
func NewLiquidityProvision(store *sqlstore.LiquidityProvision) *LiquidityProvision
type MarginLevelsStore ¶
type MarginLevelsStore interface { Add(marginLevel entities.MarginLevels) error Flush(ctx context.Context) ([]entities.MarginLevels, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.MarginLevels, error) GetMarginLevelsByIDWithCursorPagination(ctx context.Context, partyID, marketID string, pagination entities.CursorPagination) ([]entities.MarginLevels, entities.PageInfo, error) }
type MarketData ¶
type MarketData struct {
// contains filtered or unexported fields
}
func NewMarketData ¶
func NewMarketData(store MarketDataStore, log *logging.Logger) *MarketData
func (*MarketData) Add ¶
func (m *MarketData) Add(data *entities.MarketData) error
func (*MarketData) GetHistoricMarketData ¶ added in v0.73.0
func (m *MarketData) GetHistoricMarketData(ctx context.Context, marketID string, start, end *time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error)
func (*MarketData) GetMarketDataByID ¶
func (m *MarketData) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error)
func (*MarketData) GetMarketsData ¶
func (m *MarketData) GetMarketsData(ctx context.Context) ([]entities.MarketData, error)
func (*MarketData) Initialise ¶
func (m *MarketData) Initialise(ctx context.Context) error
func (*MarketData) ObserveMarketData ¶
func (m *MarketData) ObserveMarketData( ctx context.Context, retries int, marketID []string, ) (<-chan []*entities.MarketData, uint64)
type MarketDataStore ¶
type MarketDataStore interface { Add(data *entities.MarketData) error Flush(ctx context.Context) ([]*entities.MarketData, error) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error) GetMarketsData(ctx context.Context) ([]entities.MarketData, error) GetHistoricMarketData(ctx context.Context, marketID string, start, end *time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) }
type MarketDepth ¶
type MarketDepth struct {
// contains filtered or unexported fields
}
func NewMarketDepth ¶
func NewMarketDepth(orderStore OrderStore, logger *logging.Logger) *MarketDepth
func (*MarketDepth) GetAllOrders ¶
func (m *MarketDepth) GetAllOrders(market string) map[string]*types.Order
func (*MarketDepth) GetBestAskPrice ¶
func (m *MarketDepth) GetBestAskPrice(market string) *num.Uint
GetBestAskPrice returns the highest bid price in the book.
func (*MarketDepth) GetBestBidPrice ¶
func (m *MarketDepth) GetBestBidPrice(market string) *num.Uint
GetBestBidPrice returns the highest bid price in the book.
func (*MarketDepth) GetBuyPriceLevels ¶
func (m *MarketDepth) GetBuyPriceLevels(market string) int
GetBuyPriceLevels returns the number of non empty buy price levels.
func (*MarketDepth) GetMarketDepth ¶
func (m *MarketDepth) GetMarketDepth(market string, limit uint64) *types.MarketDepth
GetMarketDepth builds up the structure to be sent out to any market depth listeners.
func (*MarketDepth) GetOrderCount ¶
func (m *MarketDepth) GetOrderCount(market string) int64
GetOrderCount returns the number of live orders for the given market.
func (*MarketDepth) GetOrderCountAtPrice ¶
GetOrderCountAtPrice returns the number of orders at the given price level.
func (*MarketDepth) GetPriceLevels ¶
func (m *MarketDepth) GetPriceLevels(market string) int
GetPriceLevels returns the number of non empty price levels.
func (*MarketDepth) GetSellPriceLevels ¶
func (m *MarketDepth) GetSellPriceLevels(market string) int
GetSellPriceLevels returns the number of non empty sell price levels.
func (*MarketDepth) GetTotalVolume ¶
func (m *MarketDepth) GetTotalVolume(market string) int64
GetTotalVolume returns the total volume in the order book.
func (*MarketDepth) GetVolumeAtPrice ¶
GetVolumeAtPrice returns the order volume at the given price level.
func (*MarketDepth) Initialise ¶
func (m *MarketDepth) Initialise(ctx context.Context) error
func (*MarketDepth) ObserveDepth ¶
func (m *MarketDepth) ObserveDepth(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepth, uint64)
func (*MarketDepth) ObserveDepthUpdates ¶
func (m *MarketDepth) ObserveDepthUpdates(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepthUpdate, uint64)
func (*MarketDepth) PublishAtEndOfBlock ¶ added in v0.68.0
func (m *MarketDepth) PublishAtEndOfBlock()
type MarketStore ¶
type MarketStore interface { Upsert(ctx context.Context, market *entities.Market) error GetByID(ctx context.Context, marketID string) (entities.Market, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Market, error) GetAllPaged(ctx context.Context, marketID string, pagination entities.CursorPagination, includeSettled bool) ([]entities.Market, entities.PageInfo, error) ListSuccessorMarkets(ctx context.Context, marketID string, fullHistory bool, pagination entities.CursorPagination) ([]entities.SuccessorMarket, entities.PageInfo, error) }
type Markets ¶
type Markets struct {
// contains filtered or unexported fields
}
func NewMarkets ¶
func NewMarkets(store MarketStore) *Markets
func (*Markets) GetAllPaged ¶
func (*Markets) GetByTxHash ¶ added in v0.71.0
func (*Markets) GetMarketScalingFactor ¶ added in v0.69.0
func (*Markets) ListSuccessorMarkets ¶ added in v0.72.0
type MultiSig ¶
type MultiSig struct {
*sqlstore.ERC20MultiSigSignerEvent
}
func NewMultiSig ¶
func NewMultiSig(store *sqlstore.ERC20MultiSigSignerEvent) *MultiSig
type NetworkLimits ¶
type NetworkLimits struct{ *sqlstore.NetworkLimits }
func NewNetworkLimits ¶
func NewNetworkLimits(store *sqlstore.NetworkLimits) *NetworkLimits
type NetworkParameter ¶
type NetworkParameter struct{ *sqlstore.NetworkParameters }
func NewNetworkParameter ¶
func NewNetworkParameter(store *sqlstore.NetworkParameters) *NetworkParameter
type OracleData ¶
type OracleData struct{ *sqlstore.OracleData }
func NewOracleData ¶
func NewOracleData(store *sqlstore.OracleData) *OracleData
type OracleSpec ¶
type OracleSpec struct{ *sqlstore.OracleSpec }
func NewOracleSpec ¶
func NewOracleSpec(store *sqlstore.OracleSpec) *OracleSpec
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) GetByMarketAndID ¶ added in v0.68.0
func (*Order) GetByTxHash ¶ added in v0.71.0
func (*Order) GetLiveOrders ¶
func (*Order) ListOrderVersions ¶
func (*Order) ListOrders ¶
type OrderStore ¶
type PartyActivityStreak ¶ added in v0.73.0
type PartyActivityStreak struct{ *sqlstore.PartyActivityStreaks }
func NewPartyActivityStreak ¶ added in v0.73.0
func NewPartyActivityStreak(store *sqlstore.PartyActivityStreaks) *PartyActivityStreak
type Position ¶
type Position struct {
// contains filtered or unexported fields
}
func NewPosition ¶
func NewPosition(store PositionStore, log *logging.Logger) *Position
func (*Position) GetByMarket ¶
func (*Position) GetByMarketAndParties ¶ added in v0.68.0
func (*Position) GetByMarketAndParty ¶
func (*Position) GetByParty ¶
func (*Position) GetByPartyConnection ¶
func (*Position) GetByTxHash ¶ added in v0.71.0
type PositionStore ¶
type PositionStore interface { Flush(ctx context.Context) ([]entities.Position, error) Add(ctx context.Context, p entities.Position) error GetByMarketAndParty(ctx context.Context, marketID string, partyID string) (entities.Position, error) GetByMarketAndParties(ctx context.Context, marketIDRaw string, partyIDsRaw []string) ([]entities.Position, error) GetByMarket(ctx context.Context, marketID string) ([]entities.Position, error) GetByParty(ctx context.Context, partyID string) ([]entities.Position, error) GetByPartyConnection(ctx context.Context, partyID []string, marketID []string, pagination entities.CursorPagination) ([]entities.Position, entities.PageInfo, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Position, error) GetAll(ctx context.Context) ([]entities.Position, error) }
type ProposalStore ¶
type ProposalStore interface { Add(ctx context.Context, p entities.Proposal) error GetByID(ctx context.Context, id string) (entities.Proposal, error) GetByReference(ctx context.Context, ref string) (entities.Proposal, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Proposal, error) Get(ctx context.Context, inState *entities.ProposalState, partyIDStr *string, proposalType *entities.ProposalType, pagination entities.CursorPagination) ([]entities.Proposal, entities.PageInfo, error) }
type ProtocolUpgrade ¶ added in v0.59.0
type ProtocolUpgrade struct {
// contains filtered or unexported fields
}
func NewProtocolUpgrade ¶ added in v0.59.0
func NewProtocolUpgrade(pupStore pupStore, log *logging.Logger) *ProtocolUpgrade
func (*ProtocolUpgrade) AddProposal ¶ added in v0.61.0
func (p *ProtocolUpgrade) AddProposal(ctx context.Context, pup entities.ProtocolUpgradeProposal) error
func (*ProtocolUpgrade) GetByTxHash ¶ added in v0.71.0
func (p *ProtocolUpgrade) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.ProtocolUpgradeProposal, error)
func (*ProtocolUpgrade) GetProtocolUpgradeStarted ¶ added in v0.59.0
func (p *ProtocolUpgrade) GetProtocolUpgradeStarted() bool
func (*ProtocolUpgrade) ListProposals ¶ added in v0.61.0
func (p *ProtocolUpgrade) ListProposals(ctx context.Context, status *entities.ProtocolUpgradeProposalStatus, approvedBy *string, pagination entities.CursorPagination, ) ([]entities.ProtocolUpgradeProposal, entities.PageInfo, error)
func (*ProtocolUpgrade) SetProtocolUpgradeStarted ¶ added in v0.59.0
func (p *ProtocolUpgrade) SetProtocolUpgradeStarted()
type ReferralFeeStats ¶
type ReferralFeeStats struct{ *sqlstore.ReferralFeeStats }
func NewReferralFeeStats ¶
func NewReferralFeeStats(store *sqlstore.ReferralFeeStats) *ReferralFeeStats
type ReferralPrograms ¶ added in v0.73.0
type ReferralPrograms struct{ *sqlstore.ReferralPrograms }
func NewReferralPrograms ¶ added in v0.73.0
func NewReferralPrograms(store *sqlstore.ReferralPrograms) *ReferralPrograms
type ReferralSets ¶ added in v0.73.0
type ReferralSets struct{ *sqlstore.ReferralSets }
func NewReferralSets ¶ added in v0.73.0
func NewReferralSets(store *sqlstore.ReferralSets) *ReferralSets
type Reward ¶
type Reward struct {
// contains filtered or unexported fields
}
func (*Reward) GetByCursor ¶
func (*Reward) GetByTxHash ¶ added in v0.71.0
func (*Reward) GetEpochRewardSummaries ¶ added in v0.65.0
func (r *Reward) GetEpochRewardSummaries(ctx context.Context, filter entities.RewardSummaryFilter, p entities.CursorPagination) ([]entities.EpochRewardSummary, entities.PageInfo, error)
func (*Reward) GetSummaries ¶
type Risk ¶
type Risk struct {
// contains filtered or unexported fields
}
func NewRisk ¶
func NewRisk(mlStore MarginLevelsStore, accountSource AccountSource, log *logging.Logger) *Risk
func (*Risk) GetByTxHash ¶ added in v0.71.0
func (*Risk) GetMarginLevelsByIDWithCursorPagination ¶
func (*Risk) ObserveMarginLevels ¶
type RiskFactor ¶
type RiskFactor struct{ *sqlstore.RiskFactors }
func NewRiskFactor ¶
func NewRiskFactor(store *sqlstore.RiskFactors) *RiskFactor
type SnapshotData ¶ added in v0.65.0
type SnapshotData struct {
// contains filtered or unexported fields
}
func NewSnapshotData ¶ added in v0.65.0
func NewSnapshotData(snapStore snapStore) *SnapshotData
func (*SnapshotData) AddSnapshot ¶ added in v0.65.0
func (s *SnapshotData) AddSnapshot(ctx context.Context, snap entities.CoreSnapshotData) error
func (*SnapshotData) ListSnapshots ¶ added in v0.65.0
func (s *SnapshotData) ListSnapshots(ctx context.Context, pagination entities.CursorPagination) ([]entities.CoreSnapshotData, entities.PageInfo, error)
type StakeLinking ¶
type StakeLinking struct{ *sqlstore.StakeLinking }
func NewStakeLinking ¶
func NewStakeLinking(store *sqlstore.StakeLinking) *StakeLinking
type StopOrderStore ¶ added in v0.72.0
type StopOrderStore interface { Add(order entities.StopOrder) error Flush(ctx context.Context) ([]entities.StopOrder, error) GetStopOrder(ctx context.Context, orderID string) (entities.StopOrder, error) ListStopOrders(ctx context.Context, filter entities.StopOrderFilter, p entities.CursorPagination) ([]entities.StopOrder, entities.PageInfo, error) }
type StopOrders ¶ added in v0.72.0
type StopOrders struct {
// contains filtered or unexported fields
}
func NewStopOrders ¶ added in v0.72.0
func NewStopOrders(store StopOrderStore) *StopOrders
func (*StopOrders) GetStopOrder ¶ added in v0.72.0
func (*StopOrders) ListStopOrders ¶ added in v0.72.0
func (s *StopOrders) ListStopOrders(ctx context.Context, filter entities.StopOrderFilter, p entities.CursorPagination) ([]entities.StopOrder, entities.PageInfo, error)
type Trade ¶
type Trade struct {
// contains filtered or unexported fields
}
func (*Trade) GetByTxHash ¶ added in v0.71.0
func (*Trade) GetLastTradeByMarket ¶ added in v0.71.0
type Transfer ¶
func NewTransfer ¶
type VestingStats ¶ added in v0.73.0
type VestingStats struct{ *sqlstore.VestingStats }
func NewVestingStats ¶ added in v0.73.0
func NewVestingStats(store *sqlstore.VestingStats) *VestingStats
type VolumeDiscountPrograms ¶ added in v0.73.0
type VolumeDiscountPrograms struct {
*sqlstore.VolumeDiscountPrograms
}
func NewVolumeDiscountPrograms ¶ added in v0.73.0
func NewVolumeDiscountPrograms(store *sqlstore.VolumeDiscountPrograms) *VolumeDiscountPrograms
type VolumeDiscountStats ¶ added in v0.73.0
type VolumeDiscountStats struct{ *sqlstore.VolumeDiscountStats }
func NewVolumeDiscountStats ¶ added in v0.73.0
func NewVolumeDiscountStats(store *sqlstore.VolumeDiscountStats) *VolumeDiscountStats
type VoteStore ¶
type VoteStore interface { Add(ctx context.Context, v entities.Vote) error GetYesVotesForProposal(ctx context.Context, proposalIDStr string) ([]entities.Vote, error) GetNoVotesForProposal(ctx context.Context, proposalIDStr string) ([]entities.Vote, error) GetByParty(ctx context.Context, partyIDStr string) ([]entities.Vote, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Vote, error) GetByPartyConnection(ctx context.Context, partyIDStr string, pagination entities.CursorPagination) ([]entities.Vote, entities.PageInfo, error) Get(ctx context.Context, proposalID, partyID *string, value *entities.VoteValue) ([]entities.Vote, error) GetConnection( ctx context.Context, proposalIDStr, partyIDStr *string, pagination entities.CursorPagination, ) ([]entities.Vote, entities.PageInfo, error) }
type Withdrawal ¶
type Withdrawal struct{ *sqlstore.Withdrawals }
func NewWithdrawal ¶
func NewWithdrawal(store *sqlstore.Withdrawals) *Withdrawal