gql

package
v0.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 44 Imported by: 0

README

GraphQL

The query interface is accessible on http://localhost:3004/.

Types

Dates (time.Time)
  • Serialization type: String

Note Use vegatime.Format(vegatime.UnixNano(myDate)) to properly convert it.

How to's?
Add new GraphQL type
  1. Add the new type in schema.graphql
  2. Add binding between golang model and GraphQL type in gqlgen.yml
  3. Generate the GraphQL model and resolver with make gqlgen
  4. Create a new golang file my_type_resolver.go
  5. Implement the MyTypeResolver interface
    • This interface is located in generated.go
  6. Add a method MyType() on struct VegaResolverRoot in resolvers.go, as follows :
func (r *VegaResolverRoot) MyType() MyTypeResolver {
    return (*myTypeResolver)(r)
}
Add a new query?
  1. Add a new query in schema.graphql in the the Query type
  2. Generate the GraphQL model and resolver with make gqlgen
  3. Add a method MyType() on struct myQueryResolver in resolvers.go, as follows :
func (r *myQueryResolver) MyType() types.MyType {
	res, err := r.tradingDataClient.MyType(
		ctx, &protoapi.MyTypeRequest{Id: id},
    )
    if err != nil {
   	    return nil, err
    }
   
   return res.MyType, nil
}

Documentation

Overview

Package gql contains code for running the GraphQL-to-gRPC gateway.

In order to add a new GraphQL endpoint, add an entry to either the `Mutation`, `Query` or `Subscription` sections of `gateway/graphql/schema.graphql`. Example:

# SomeNewEndpoint does something
somenewendpoint(
  # somestring
  someStr: String!,
  # someint
  someInt: Int!
): SomeNewEndpointResponse!

type SomeNewEndpointResponse {
  someAnswer: String!
  someStringList: [String!]
}

Then run `make gqlgen`.

Your new endpoint above will require a `SomeNewEndpointRequest` and `SomeNewEndpointResponse` message to be defined in the trading.proto file. Once this is defined you can run `make proto` to generate the structures required to add the resolvers below. e.g.

	message SomeNewEndpointRequest {
	  string orderID = 1;
	  string referenceID = 2;
 }

 message SomeNewEndpointResponse {
	vega.Order order = 1;
 }

Also a function definition needs to be defined in the trading.proto to show the parameters and return strutures for the new function e.g. rpc SomeNewEndpoint (SomeNewEndpointRequest) returns (SomeNewEndpointResponse)

Next, in `gateway/graphql/resolvers.go`, add the endpoint to the `TradingClient` interface if the new endpoint is a mutation, else add it to TradingDataClient if is it just a query, and add a function implementation, using the function definition from `generated.go`. Example:

type TradingClient interface {
    // ...
    SomeNewEndpoint(context.Context, *api.SomeNewEndpointRequest, ...grpc.CallOption) (*api.SomeNewEndpointResponse, error)
    // ...
}

// <<MQS>> is one of: Mutation, Query, Subscription
func (r *My<<MQS>>Resolver) SomeNewEndpoint(ctx context.Context, someStr string, someInt int64) (*SomeNewEndpointResponse, error) {
    req := &protoapi.SomeNewEndpointRequest{
        // ...
    }

    response, err := r.tradingClient.SomeNewEndpoint(ctx, req)
    if err != nil {
        return nil, err
    }

    return &SomeNewEndpointResponse{/* ... */}, nil
}

Now add the new function to the `trading.go` or `trading_data.go` package to actually perform the work

Lastly, make sure mocks are up to date, then run tests: `make mocks test`

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilTradingMode ...
	ErrNilTradingMode = errors.New("nil trading mode")
	// ErrAmbiguousTradingMode ...
	ErrAmbiguousTradingMode = errors.New("more than one trading mode selected")
	// ErrUnimplementedTradingMode ...
	ErrUnimplementedTradingMode = errors.New("unimplemented trading mode")
	// ErrNilProduct ...
	ErrNilProduct = errors.New("nil product")
	// ErrNilRiskModel ...
	ErrNilRiskModel = errors.New("nil risk model")
	// ErrInvalidChange ...
	ErrInvalidChange = errors.New("nil update market, new market and update network")
	// ErrNilAssetSource returned when an asset source is not specified at creation.
	ErrNilAssetSource = errors.New("nil asset source")
	// ErrUnimplementedAssetSource returned when an asset source specified at creation is not recognised.
	ErrUnimplementedAssetSource = errors.New("unimplemented asset source")
	// ErrMultipleProposalChangesSpecified is raised when multiple proposal changes are set
	// (non-null) for a singe proposal terms.
	ErrMultipleProposalChangesSpecified = errors.New("multiple proposal changes specified")
	// ErrMultipleAssetSourcesSpecified is raised when multiple asset source are specified.
	ErrMultipleAssetSourcesSpecified = errors.New("multiple asset sources specified")
	// ErrNilPriceMonitoringParameters ...
	ErrNilPriceMonitoringParameters = errors.New("nil price monitoring parameters")
)
View Source
var (
	// ErrMissingIDOrReference is returned when neither id nor reference has been supplied in the query.
	ErrMissingIDOrReference = errors.New("missing id or reference")
	// ErrMissingNodeID is returned when no node id has been supplied in the query.
	ErrMissingNodeID = errors.New("missing node id")
	// ErrInvalidVotesSubscription is returned if neither proposal ID nor party ID is specified.
	ErrInvalidVotesSubscription = errors.New("invalid subscription, either proposal or party ID required")
	// ErrInvalidProposal is returned when invalid governance data is received by proposal resolver.
	ErrInvalidProposal = errors.New("invalid proposal")
)
View Source
var ErrUnsupportedProduct = errors.New("unsupported product")
View Source
var ErrUnsupportedProposalTermsChanges = errors.New("unsupported proposal terms changes")
View Source
var ErrUnsupportedTransferKind = errors.New("unsupported transfer kind")

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type AccountDetailsResolver added in v0.56.0

type AccountDetailsResolver interface {
	PartyID(ctx context.Context, obj *vega.AccountDetails) (*string, error)
}

type AccountEdgeResolver

type AccountEdgeResolver interface {
	Node(ctx context.Context, obj *v2.AccountEdge) (*vega.Account, error)
}

type AccountResolver

type AccountResolver interface {
	Asset(ctx context.Context, obj *vega.Account) (*vega.Asset, error)

	Market(ctx context.Context, obj *vega.Account) (*vega.Market, error)
	Party(ctx context.Context, obj *vega.Account) (*vega.Party, error)
}

type AccountUpdateResolver added in v0.55.0

type AccountUpdateResolver interface {
	AssetID(ctx context.Context, obj *vega.Account) (string, error)
}

type AssetResolver

type AssetResolver interface {
	Name(ctx context.Context, obj *vega.Asset) (string, error)
	Symbol(ctx context.Context, obj *vega.Asset) (string, error)
	Decimals(ctx context.Context, obj *vega.Asset) (int, error)
	Quantum(ctx context.Context, obj *vega.Asset) (string, error)
	Source(ctx context.Context, obj *vega.Asset) (AssetSource, error)

	InfrastructureFeeAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
	GlobalRewardPoolAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
	TakerFeeRewardAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
	MakerFeeRewardAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
	LpFeeRewardAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
	MarketProposerRewardAccount(ctx context.Context, obj *vega.Asset) (*vega.Account, error)
}

type AssetSource

type AssetSource interface {
	IsAssetSource()
}

One of the possible asset sources

func AssetSourceFromProto

func AssetSourceFromProto(pdetails *types.AssetDetails) (AssetSource, error)

type AuctionDuration

type AuctionDuration struct {
	// Duration of the auction in seconds
	DurationSecs int `json:"durationSecs"`
	// Target uncrossing trading volume
	Volume int `json:"volume"`
}

An auction duration is used to configure 3 auction periods: 1. `duration > 0`, `volume == 0`: The auction will last for at least N seconds. 2. `duration == 0`, `volume > 0`: The auction will end once the given volume will match at uncrossing. 3. `duration > 0`, `volume > 0`: The auction will take at least N seconds, but can end sooner if the market can trade a certain volume.

type AuctionEventResolver

type AuctionEventResolver interface {
	AuctionStart(ctx context.Context, obj *v1.AuctionEvent) (string, error)
	AuctionEnd(ctx context.Context, obj *v1.AuctionEvent) (string, error)
}

type BuiltinAsset

type BuiltinAsset struct {
	// Maximum amount that can be requested by a party through the built-in asset faucet at a time
	MaxFaucetAmountMint string `json:"maxFaucetAmountMint"`
}

A Vega builtin asset, mostly for testing purpose

func BuiltinAssetFromProto

func BuiltinAssetFromProto(ba *types.BuiltinAsset) *BuiltinAsset

func (BuiltinAsset) IsAssetSource

func (BuiltinAsset) IsAssetSource()

type BusEvent

type BusEvent struct {
	// The ID for this event
	ID string `json:"id"`
	// The block hash
	Block string `json:"block"`
	// The type of event
	Type BusEventType `json:"type"`
	// The payload - the wrapped event
	Event Event `json:"event"`
}

type BusEventType

type BusEventType string
const (
	// Vega Time has changed
	BusEventTypeTimeUpdate BusEventType = "TimeUpdate"
	// A balance has been transferred between accounts
	BusEventTypeTransferResponses BusEventType = "TransferResponses"
	// A position resolution event has occurred
	BusEventTypePositionResolution BusEventType = "PositionResolution"
	// An order has been created or updated
	BusEventTypeOrder BusEventType = "Order"
	// An account has been updated
	BusEventTypeAccount BusEventType = "Account"
	// A party has been updated
	BusEventTypeParty BusEventType = "Party"
	// A trade has been created
	BusEventTypeTrade BusEventType = "Trade"
	// Margin levels have changed for a position
	BusEventTypeMarginLevels BusEventType = "MarginLevels"
	// A governance proposal has been created or updated
	BusEventTypeProposal BusEventType = "Proposal"
	// A vote has been placed on a governance proposal
	BusEventTypeVote BusEventType = "Vote"
	// Market data has been updated
	BusEventTypeMarketData BusEventType = "MarketData"
	// Validator node signatures for an event
	BusEventTypeNodeSignature BusEventType = "NodeSignature"
	// A position has been closed without sufficient insurance pool balance to cover it
	BusEventTypeLossSocialization BusEventType = "LossSocialization"
	// A position has been settled
	BusEventTypeSettlePosition BusEventType = "SettlePosition"
	// A distressed position has been settled
	BusEventTypeSettleDistressed BusEventType = "SettleDistressed"
	// A new market has been created
	BusEventTypeMarketCreated BusEventType = "MarketCreated"
	// A market has been updated
	BusEventTypeMarketUpdated BusEventType = "MarketUpdated"
	// An asset has been created or update
	BusEventTypeAsset BusEventType = "Asset"
	// A market has progressed by one tick
	BusEventTypeMarketTick BusEventType = "MarketTick"
	// A market has either entered or exited auction
	BusEventTypeAuction BusEventType = "Auction"
	// A risk factor adjustment was made
	BusEventTypeRiskFactor BusEventType = "RiskFactor"
	// A liquidity commitment change occurred
	BusEventTypeLiquidityProvision BusEventType = "LiquidityProvision"
	// Collateral has deposited in to this Vega network via the bridge
	BusEventTypeDeposit BusEventType = "Deposit"
	// Collateral has been withdrawn from this Vega network via the bridge
	BusEventTypeWithdrawal BusEventType = "Withdrawal"
	// An oracle spec has been registered
	BusEventTypeOracleSpec BusEventType = "OracleSpec"
	// Constant for market events - mainly used for logging
	BusEventTypeMarket BusEventType = "Market"
)

func (BusEventType) IsValid

func (e BusEventType) IsValid() bool

func (BusEventType) MarshalGQL

func (e BusEventType) MarshalGQL(w io.Writer)

func (BusEventType) String

func (e BusEventType) String() string

func (*BusEventType) UnmarshalGQL

func (e *BusEventType) UnmarshalGQL(v interface{}) error

type CandleResolver

type CandleResolver interface {
	PeriodStart(ctx context.Context, obj *v2.Candle) (string, error)
	LastUpdateInPeriod(ctx context.Context, obj *v2.Candle) (string, error)

	Volume(ctx context.Context, obj *v2.Candle) (string, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Account struct {
		Asset   func(childComplexity int) int
		Balance func(childComplexity int) int
		Market  func(childComplexity int) int
		Party   func(childComplexity int) int
		Type    func(childComplexity int) int
	}

	AccountDetails struct {
		AssetId  func(childComplexity int) int
		MarketId func(childComplexity int) int
		PartyID  func(childComplexity int) int
		Type     func(childComplexity int) int
	}

	AccountEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	AccountUpdate struct {
		AssetID  func(childComplexity int) int
		Balance  func(childComplexity int) int
		MarketId func(childComplexity int) int
		Type     func(childComplexity int) int
	}

	AccountsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	AggregatedBalance struct {
		AccountId   func(childComplexity int) int
		AccountType func(childComplexity int) int
		AssetId     func(childComplexity int) int
		Balance     func(childComplexity int) int
		MarketId    func(childComplexity int) int
		PartyId     func(childComplexity int) int
		Timestamp   func(childComplexity int) int
	}

	AggregatedBalanceConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	AggregatedBalanceEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Asset struct {
		Decimals                    func(childComplexity int) int
		GlobalRewardPoolAccount     func(childComplexity int) int
		Id                          func(childComplexity int) int
		InfrastructureFeeAccount    func(childComplexity int) int
		LpFeeRewardAccount          func(childComplexity int) int
		MakerFeeRewardAccount       func(childComplexity int) int
		MarketProposerRewardAccount func(childComplexity int) int
		Name                        func(childComplexity int) int
		Quantum                     func(childComplexity int) int
		Source                      func(childComplexity int) int
		Status                      func(childComplexity int) int
		Symbol                      func(childComplexity int) int
		TakerFeeRewardAccount       func(childComplexity int) int
	}

	AssetEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	AssetsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	AuctionDuration struct {
		DurationSecs func(childComplexity int) int
		Volume       func(childComplexity int) int
	}

	AuctionEvent struct {
		AuctionEnd       func(childComplexity int) int
		AuctionStart     func(childComplexity int) int
		ExtensionTrigger func(childComplexity int) int
		Leave            func(childComplexity int) int
		MarketId         func(childComplexity int) int
		OpeningAuction   func(childComplexity int) int
		Trigger          func(childComplexity int) int
	}

	BuiltinAsset struct {
		MaxFaucetAmountMint func(childComplexity int) int
	}

	BusEvent struct {
		Block func(childComplexity int) int
		Event func(childComplexity int) int
		ID    func(childComplexity int) int
		Type  func(childComplexity int) int
	}

	Candle struct {
		Close              func(childComplexity int) int
		High               func(childComplexity int) int
		LastUpdateInPeriod func(childComplexity int) int
		Low                func(childComplexity int) int
		Open               func(childComplexity int) int
		PeriodStart        func(childComplexity int) int
		Volume             func(childComplexity int) int
	}

	CandleDataConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	CandleEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Condition struct {
		Operator func(childComplexity int) int
		Value    func(childComplexity int) int
	}

	ContinuousTrading struct {
		TickSize func(childComplexity int) int
	}

	Delegation struct {
		Amount func(childComplexity int) int
		Epoch  func(childComplexity int) int
		Node   func(childComplexity int) int
		Party  func(childComplexity int) int
	}

	DelegationEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	DelegationsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Deposit struct {
		Amount            func(childComplexity int) int
		Asset             func(childComplexity int) int
		CreatedTimestamp  func(childComplexity int) int
		CreditedTimestamp func(childComplexity int) int
		Id                func(childComplexity int) int
		Party             func(childComplexity int) int
		Status            func(childComplexity int) int
		TxHash            func(childComplexity int) int
	}

	DepositEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	DepositsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	DiscreteTrading struct {
		Duration func(childComplexity int) int
		TickSize func(childComplexity int) int
	}

	DispatchStrategy struct {
		DispatchMetric        func(childComplexity int) int
		DispatchMetricAssetID func(childComplexity int) int
		MarketIdsInScope      func(childComplexity int) int
	}

	ERC20 struct {
		ContractAddress   func(childComplexity int) int
		LifetimeLimit     func(childComplexity int) int
		WithdrawThreshold func(childComplexity int) int
	}

	ERC20MultiSigSignerAddedBundle struct {
		EpochSeq   func(childComplexity int) int
		NewSigner  func(childComplexity int) int
		Nonce      func(childComplexity int) int
		Signatures func(childComplexity int) int
		Submitter  func(childComplexity int) int
		Timestamp  func(childComplexity int) int
	}

	ERC20MultiSigSignerAddedBundleEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	ERC20MultiSigSignerAddedConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	ERC20MultiSigSignerRemovedBundle struct {
		EpochSeq   func(childComplexity int) int
		Nonce      func(childComplexity int) int
		OldSigner  func(childComplexity int) int
		Signatures func(childComplexity int) int
		Submitter  func(childComplexity int) int
		Timestamp  func(childComplexity int) int
	}

	ERC20MultiSigSignerRemovedBundleEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	ERC20MultiSigSignerRemovedConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	ERC20SetAssetLimitsBundle struct {
		AssetSource   func(childComplexity int) int
		LifetimeLimit func(childComplexity int) int
		Nonce         func(childComplexity int) int
		Signatures    func(childComplexity int) int
		Threshold     func(childComplexity int) int
		VegaAssetID   func(childComplexity int) int
	}

	Epoch struct {
		Delegations           func(childComplexity int, partyID *string, nodeID *string, skip *int, first *int, last *int) int
		DelegationsConnection func(childComplexity int, partyID *string, nodeID *string, pagination *v2.Pagination) int
		ID                    func(childComplexity int) int
		Timestamps            func(childComplexity int) int
		Validators            func(childComplexity int) int
		ValidatorsConnection  func(childComplexity int, pagination *v2.Pagination) int
	}

	EpochData struct {
		Offline func(childComplexity int) int
		Online  func(childComplexity int) int
		Total   func(childComplexity int) int
	}

	EpochParticipation struct {
		Epoch        func(childComplexity int) int
		Offline      func(childComplexity int) int
		Online       func(childComplexity int) int
		TotalRewards func(childComplexity int) int
	}

	EpochTimestamps struct {
		End    func(childComplexity int) int
		Expiry func(childComplexity int) int
		Start  func(childComplexity int) int
	}

	Erc20ListAssetBundle struct {
		AssetSource func(childComplexity int) int
		Nonce       func(childComplexity int) int
		Signatures  func(childComplexity int) int
		VegaAssetID func(childComplexity int) int
	}

	Erc20WithdrawalApproval struct {
		Amount        func(childComplexity int) int
		AssetSource   func(childComplexity int) int
		Creation      func(childComplexity int) int
		Expiry        func(childComplexity int) int
		Nonce         func(childComplexity int) int
		Signatures    func(childComplexity int) int
		TargetAddress func(childComplexity int) int
	}

	Erc20WithdrawalDetails struct {
		ReceiverAddress func(childComplexity int) int
	}

	EthereumEvent struct {
		ContractID func(childComplexity int) int
		Event      func(childComplexity int) int
	}

	EthereumKeyRotation struct {
		BlockHeight func(childComplexity int) int
		NewAddress  func(childComplexity int) int
		NodeId      func(childComplexity int) int
		OldAddress  func(childComplexity int) int
	}

	EthereumKeyRotationEdge struct {
		Cursor              func(childComplexity int) int
		EthereumKeyRotation func(childComplexity int) int
	}

	EthereumKeyRotationsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	FeeFactors struct {
		InfrastructureFee func(childComplexity int) int
		LiquidityFee      func(childComplexity int) int
		MakerFee          func(childComplexity int) int
	}

	Fees struct {
		Factors func(childComplexity int) int
	}

	Filter struct {
		Conditions func(childComplexity int) int
		Key        func(childComplexity int) int
	}

	Future struct {
		OracleSpecBinding               func(childComplexity int) int
		OracleSpecForSettlementPrice    func(childComplexity int) int
		OracleSpecForTradingTermination func(childComplexity int) int
		QuoteName                       func(childComplexity int) int
		SettlementAsset                 func(childComplexity int) int
		SettlementDataDecimals          func(childComplexity int) int
	}

	FutureProduct struct {
		OracleSpecBinding               func(childComplexity int) int
		OracleSpecForSettlementPrice    func(childComplexity int) int
		OracleSpecForTradingTermination func(childComplexity int) int
		QuoteName                       func(childComplexity int) int
		SettlementAsset                 func(childComplexity int) int
		SettlementDataDecimals          func(childComplexity int) int
	}

	Instrument struct {
		Code     func(childComplexity int) int
		Id       func(childComplexity int) int
		Metadata func(childComplexity int) int
		Name     func(childComplexity int) int
		Product  func(childComplexity int) int
	}

	InstrumentConfiguration struct {
		Code          func(childComplexity int) int
		FutureProduct func(childComplexity int) int
		Name          func(childComplexity int) int
	}

	InstrumentMetadata struct {
		Tags func(childComplexity int) int
	}

	KeyRotation struct {
		BlockHeight func(childComplexity int) int
		NewPubKey   func(childComplexity int) int
		NodeId      func(childComplexity int) int
		OldPubKey   func(childComplexity int) int
	}

	KeyRotationConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	KeyRotationEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	LedgerEntry struct {
		Amount      func(childComplexity int) int
		FromAccount func(childComplexity int) int
		Timestamp   func(childComplexity int) int
		ToAccount   func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	LiquidityMonitoringParameters struct {
		TargetStakeParameters func(childComplexity int) int
		TriggeringRatio       func(childComplexity int) int
	}

	LiquidityOrder struct {
		Offset     func(childComplexity int) int
		Proportion func(childComplexity int) int
		Reference  func(childComplexity int) int
	}

	LiquidityOrderReference struct {
		LiquidityOrder func(childComplexity int) int
		Order          func(childComplexity int) int
	}

	LiquidityProviderFeeShare struct {
		AverageEntryValuation func(childComplexity int) int
		EquityLikeShare       func(childComplexity int) int
		Party                 func(childComplexity int) int
	}

	LiquidityProvision struct {
		Buys             func(childComplexity int) int
		CommitmentAmount func(childComplexity int) int
		CreatedAt        func(childComplexity int) int
		Fee              func(childComplexity int) int
		Id               func(childComplexity int) int
		Market           func(childComplexity int) int
		Party            func(childComplexity int) int
		Reference        func(childComplexity int) int
		Sells            func(childComplexity int) int
		Status           func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
		Version          func(childComplexity int) int
	}

	LiquidityProvisionUpdate struct {
		Buys             func(childComplexity int) int
		CommitmentAmount func(childComplexity int) int
		CreatedAt        func(childComplexity int) int
		Fee              func(childComplexity int) int
		Id               func(childComplexity int) int
		MarketId         func(childComplexity int) int
		PartyId          func(childComplexity int) int
		Reference        func(childComplexity int) int
		Sells            func(childComplexity int) int
		Status           func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
		Version          func(childComplexity int) int
	}

	LiquidityProvisionsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	LiquidityProvisionsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	LogNormalModelParams struct {
		Mu    func(childComplexity int) int
		R     func(childComplexity int) int
		Sigma func(childComplexity int) int
	}

	LogNormalRiskModel struct {
		Params                func(childComplexity int) int
		RiskAversionParameter func(childComplexity int) int
		Tau                   func(childComplexity int) int
	}

	LossSocialization struct {
		Amount   func(childComplexity int) int
		MarketID func(childComplexity int) int
		PartyID  func(childComplexity int) int
	}

	MarginCalculator struct {
		ScalingFactors func(childComplexity int) int
	}

	MarginConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	MarginEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MarginLevels struct {
		Asset                  func(childComplexity int) int
		CollateralReleaseLevel func(childComplexity int) int
		InitialLevel           func(childComplexity int) int
		MaintenanceLevel       func(childComplexity int) int
		Market                 func(childComplexity int) int
		Party                  func(childComplexity int) int
		SearchLevel            func(childComplexity int) int
		Timestamp              func(childComplexity int) int
	}

	MarginLevelsUpdate struct {
		Asset                  func(childComplexity int) int
		CollateralReleaseLevel func(childComplexity int) int
		InitialLevel           func(childComplexity int) int
		MaintenanceLevel       func(childComplexity int) int
		MarketId               func(childComplexity int) int
		PartyId                func(childComplexity int) int
		SearchLevel            func(childComplexity int) int
		Timestamp              func(childComplexity int) int
	}

	Market struct {
		Accounts                      func(childComplexity int, partyID *string) int
		AccountsConnection            func(childComplexity int, partyID *string, pagination *v2.Pagination) int
		CandlesConnection             func(childComplexity int, since string, to *string, interval vega.Interval, pagination *v2.Pagination) int
		Data                          func(childComplexity int) int
		DecimalPlaces                 func(childComplexity int) int
		Depth                         func(childComplexity int, maxDepth *int) int
		Fees                          func(childComplexity int) int
		Id                            func(childComplexity int) int
		LiquidityMonitoringParameters func(childComplexity int) int
		LiquidityProvisions           func(childComplexity int, partyID *string) int
		LiquidityProvisionsConnection func(childComplexity int, partyID *string, pagination *v2.Pagination) int
		MarketTimestamps              func(childComplexity int) int
		OpeningAuction                func(childComplexity int) int
		Orders                        func(childComplexity int, skip *int, first *int, last *int) int
		OrdersConnection              func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
		PositionDecimalPlaces         func(childComplexity int) int
		PriceMonitoringSettings       func(childComplexity int) int
		Proposal                      func(childComplexity int) int
		RiskFactors                   func(childComplexity int) int
		State                         func(childComplexity int) int
		TradableInstrument            func(childComplexity int) int
		Trades                        func(childComplexity int, skip *int, first *int, last *int) int
		TradesConnection              func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
		TradingMode                   func(childComplexity int) int
	}

	MarketConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	MarketData struct {
		AuctionEnd                func(childComplexity int) int
		AuctionStart              func(childComplexity int) int
		BestBidPrice              func(childComplexity int) int
		BestBidVolume             func(childComplexity int) int
		BestOfferPrice            func(childComplexity int) int
		BestOfferVolume           func(childComplexity int) int
		BestStaticBidPrice        func(childComplexity int) int
		BestStaticBidVolume       func(childComplexity int) int
		BestStaticOfferPrice      func(childComplexity int) int
		BestStaticOfferVolume     func(childComplexity int) int
		Commitments               func(childComplexity int) int
		ExtensionTrigger          func(childComplexity int) int
		IndicativePrice           func(childComplexity int) int
		IndicativeVolume          func(childComplexity int) int
		LiquidityProviderFeeShare func(childComplexity int) int
		MarkPrice                 func(childComplexity int) int
		Market                    func(childComplexity int) int
		MarketState               func(childComplexity int) int
		MarketTradingMode         func(childComplexity int) int
		MarketValueProxy          func(childComplexity int) int
		MidPrice                  func(childComplexity int) int
		OpenInterest              func(childComplexity int) int
		PriceMonitoringBounds     func(childComplexity int) int
		StaticMidPrice            func(childComplexity int) int
		SuppliedStake             func(childComplexity int) int
		TargetStake               func(childComplexity int) int
		Timestamp                 func(childComplexity int) int
		Trigger                   func(childComplexity int) int
	}

	MarketDataCommitments struct {
		Buys  func(childComplexity int) int
		Sells func(childComplexity int) int
	}

	MarketDataConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	MarketDataEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MarketDepth struct {
		Buy            func(childComplexity int) int
		LastTrade      func(childComplexity int) int
		Market         func(childComplexity int) int
		Sell           func(childComplexity int) int
		SequenceNumber func(childComplexity int) int
	}

	MarketDepthTrade struct {
		ID    func(childComplexity int) int
		Price func(childComplexity int) int
		Size  func(childComplexity int) int
	}

	MarketDepthUpdate struct {
		Buy                    func(childComplexity int) int
		Market                 func(childComplexity int) int
		PreviousSequenceNumber func(childComplexity int) int
		Sell                   func(childComplexity int) int
		SequenceNumber         func(childComplexity int) int
	}

	MarketEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MarketEvent struct {
		MarketID func(childComplexity int) int
		Payload  func(childComplexity int) int
	}

	MarketTick struct {
		MarketID func(childComplexity int) int
		Time     func(childComplexity int) int
	}

	MarketTimestamps struct {
		Close    func(childComplexity int) int
		Open     func(childComplexity int) int
		Pending  func(childComplexity int) int
		Proposed func(childComplexity int) int
	}

	NetworkLimits struct {
		BootstrapBlockCount      func(childComplexity int) int
		BootstrapFinished        func(childComplexity int) int
		CanProposeAsset          func(childComplexity int) int
		CanProposeMarket         func(childComplexity int) int
		GenesisLoaded            func(childComplexity int) int
		ProposeAssetEnabled      func(childComplexity int) int
		ProposeAssetEnabledFrom  func(childComplexity int) int
		ProposeMarketEnabled     func(childComplexity int) int
		ProposeMarketEnabledFrom func(childComplexity int) int
	}

	NetworkParameter struct {
		Key   func(childComplexity int) int
		Value func(childComplexity int) int
	}

	NetworkParameterEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	NetworkParametersConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	NewAsset struct {
		Decimals func(childComplexity int) int
		Name     func(childComplexity int) int
		Quantum  func(childComplexity int) int
		Source   func(childComplexity int) int
		Symbol   func(childComplexity int) int
	}

	NewFreeform struct {
		DoNotUse func(childComplexity int) int
	}

	NewMarket struct {
		DecimalPlaces  func(childComplexity int) int
		Instrument     func(childComplexity int) int
		Metadata       func(childComplexity int) int
		RiskParameters func(childComplexity int) int
	}

	Node struct {
		AvatarUrl             func(childComplexity int) int
		Delegations           func(childComplexity int, partyID *string, skip *int, first *int, last *int) int
		DelegationsConnection func(childComplexity int, partyID *string, pagination *v2.Pagination) int
		EpochData             func(childComplexity int) int
		EthereumAddress       func(childComplexity int) int
		Id                    func(childComplexity int) int
		InfoUrl               func(childComplexity int) int
		Location              func(childComplexity int) int
		Name                  func(childComplexity int) int
		PendingStake          func(childComplexity int) int
		PubKey                func(childComplexity int) int
		RankingScore          func(childComplexity int) int
		RewardScore           func(childComplexity int) int
		StakedByDelegates     func(childComplexity int) int
		StakedByOperator      func(childComplexity int) int
		StakedTotal           func(childComplexity int) int
		Status                func(childComplexity int) int
		TmPubKey              func(childComplexity int) int
	}

	NodeData struct {
		InactiveNodes   func(childComplexity int) int
		StakedTotal     func(childComplexity int) int
		TotalNodes      func(childComplexity int) int
		Uptime          func(childComplexity int) int
		ValidatingNodes func(childComplexity int) int
	}

	NodeEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	NodeSignature struct {
		Id        func(childComplexity int) int
		Kind      func(childComplexity int) int
		Signature func(childComplexity int) int
	}

	NodeSignatureEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	NodeSignaturesConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	NodesConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	ObservableLiquidityProviderFeeShare struct {
		AverageEntryValuation func(childComplexity int) int
		EquityLikeShare       func(childComplexity int) int
		PartyID               func(childComplexity int) int
	}

	ObservableMarketData struct {
		AuctionEnd                func(childComplexity int) int
		AuctionStart              func(childComplexity int) int
		BestBidPrice              func(childComplexity int) int
		BestBidVolume             func(childComplexity int) int
		BestOfferPrice            func(childComplexity int) int
		BestOfferVolume           func(childComplexity int) int
		BestStaticBidPrice        func(childComplexity int) int
		BestStaticBidVolume       func(childComplexity int) int
		BestStaticOfferPrice      func(childComplexity int) int
		BestStaticOfferVolume     func(childComplexity int) int
		ExtensionTrigger          func(childComplexity int) int
		IndicativePrice           func(childComplexity int) int
		IndicativeVolume          func(childComplexity int) int
		LiquidityProviderFeeShare func(childComplexity int) int
		MarkPrice                 func(childComplexity int) int
		MarketID                  func(childComplexity int) int
		MarketState               func(childComplexity int) int
		MarketTradingMode         func(childComplexity int) int
		MarketValueProxy          func(childComplexity int) int
		MidPrice                  func(childComplexity int) int
		OpenInterest              func(childComplexity int) int
		PriceMonitoringBounds     func(childComplexity int) int
		StaticMidPrice            func(childComplexity int) int
		SuppliedStake             func(childComplexity int) int
		TargetStake               func(childComplexity int) int
		Timestamp                 func(childComplexity int) int
		Trigger                   func(childComplexity int) int
	}

	ObservableMarketDepth struct {
		Buy            func(childComplexity int) int
		LastTrade      func(childComplexity int) int
		MarketId       func(childComplexity int) int
		Sell           func(childComplexity int) int
		SequenceNumber func(childComplexity int) int
	}

	ObservableMarketDepthUpdate struct {
		Buy                    func(childComplexity int) int
		MarketId               func(childComplexity int) int
		PreviousSequenceNumber func(childComplexity int) int
		Sell                   func(childComplexity int) int
		SequenceNumber         func(childComplexity int) int
	}

	OneOffTransfer struct {
		DeliverOn func(childComplexity int) int
	}

	OracleData struct {
		BroadcastAt    func(childComplexity int) int
		Data           func(childComplexity int) int
		MatchedSpecIds func(childComplexity int) int
		PubKeys        func(childComplexity int) int
	}

	OracleDataConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	OracleDataEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OracleSpec struct {
		CreatedAt      func(childComplexity int) int
		Data           func(childComplexity int) int
		DataConnection func(childComplexity int, pagination *v2.Pagination) int
		Filters        func(childComplexity int) int
		Id             func(childComplexity int) int
		PubKeys        func(childComplexity int) int
		Status         func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
	}

	OracleSpecConfiguration struct {
		Filters func(childComplexity int) int
		PubKeys func(childComplexity int) int
	}

	OracleSpecEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OracleSpecToFutureBinding struct {
		SettlementPriceProperty    func(childComplexity int) int
		TradingTerminationProperty func(childComplexity int) int
	}

	OracleSpecsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Order struct {
		CreatedAt          func(childComplexity int) int
		ExpiresAt          func(childComplexity int) int
		Id                 func(childComplexity int) int
		LiquidityProvision func(childComplexity int) int
		Market             func(childComplexity int) int
		Party              func(childComplexity int) int
		PeggedOrder        func(childComplexity int) int
		Price              func(childComplexity int) int
		Reference          func(childComplexity int) int
		RejectionReason    func(childComplexity int) int
		Remaining          func(childComplexity int) int
		Side               func(childComplexity int) int
		Size               func(childComplexity int) int
		Status             func(childComplexity int) int
		TimeInForce        func(childComplexity int) int
		Trades             func(childComplexity int) int
		TradesConnection   func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
		Type               func(childComplexity int) int
		UpdatedAt          func(childComplexity int) int
		Version            func(childComplexity int) int
	}

	OrderConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	OrderEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OrderEstimate struct {
		Fee            func(childComplexity int) int
		MarginLevels   func(childComplexity int) int
		TotalFeeAmount func(childComplexity int) int
	}

	OrderUpdate struct {
		CreatedAt            func(childComplexity int) int
		ExpiresAt            func(childComplexity int) int
		Id                   func(childComplexity int) int
		LiquidityProvisionId func(childComplexity int) int
		MarketId             func(childComplexity int) int
		PartyId              func(childComplexity int) int
		PeggedOrder          func(childComplexity int) int
		Price                func(childComplexity int) int
		Reference            func(childComplexity int) int
		RejectionReason      func(childComplexity int) int
		Remaining            func(childComplexity int) int
		Side                 func(childComplexity int) int
		Size                 func(childComplexity int) int
		Status               func(childComplexity int) int
		TimeInForce          func(childComplexity int) int
		Type                 func(childComplexity int) int
		UpdatedAt            func(childComplexity int) int
		Version              func(childComplexity int) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Party struct {
		Accounts                      func(childComplexity int, marketID *string, assetID *string, typeArg *vega.AccountType) int
		AccountsConnection            func(childComplexity int, marketID *string, assetID *string, typeArg *vega.AccountType, pagination *v2.Pagination) int
		Delegations                   func(childComplexity int, nodeID *string, skip *int, first *int, last *int) int
		DelegationsConnection         func(childComplexity int, nodeID *string, pagination *v2.Pagination) int
		Deposits                      func(childComplexity int) int
		DepositsConnection            func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
		Id                            func(childComplexity int) int
		LiquidityProvisions           func(childComplexity int, market *string, reference *string) int
		LiquidityProvisionsConnection func(childComplexity int, marketID *string, reference *string, pagination *v2.Pagination) int
		Margins                       func(childComplexity int, marketID *string) int
		MarginsConnection             func(childComplexity int, marketID *string, pagination *v2.Pagination) int
		Orders                        func(childComplexity int, skip *int, first *int, last *int) int
		OrdersConnection              func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
		Positions                     func(childComplexity int) int
		PositionsConnection           func(childComplexity int, market *string, pagination *v2.Pagination) int
		Proposals                     func(childComplexity int, inState *vega.Proposal_State) int
		ProposalsConnection           func(childComplexity int, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) int
		RewardDetails                 func(childComplexity int) int
		RewardSummaries               func(childComplexity int, assetID *string) int
		Rewards                       func(childComplexity int, assetID *string, skip *int, first *int, last *int) int
		RewardsConnection             func(childComplexity int, assetID *string, pagination *v2.Pagination) int
		Stake                         func(childComplexity int) int
		StakingSummary                func(childComplexity int, pagination *v2.Pagination) int
		Trades                        func(childComplexity int, marketID *string, skip *int, first *int, last *int) int
		TradesConnection              func(childComplexity int, marketID *string, dataRange *v2.DateRange, pagination *v2.Pagination) int
		TransfersConnection           func(childComplexity int, direction *TransferDirection, pagination *v2.Pagination) int
		Votes                         func(childComplexity int) int
		VotesConnection               func(childComplexity int, pagination *v2.Pagination) int
		Withdrawals                   func(childComplexity int) int
		WithdrawalsConnection         func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int
	}

	PartyConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	PartyEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	PartyStake struct {
		CurrentStakeAvailable func(childComplexity int) int
		Linkings              func(childComplexity int) int
	}

	PeggedOrder struct {
		Offset    func(childComplexity int) int
		Reference func(childComplexity int) int
	}

	Position struct {
		AverageEntryPrice func(childComplexity int) int
		Margins           func(childComplexity int) int
		MarginsConnection func(childComplexity int, pagination *v2.Pagination) int
		Market            func(childComplexity int) int
		OpenVolume        func(childComplexity int) int
		Party             func(childComplexity int) int
		RealisedPnl       func(childComplexity int) int
		UnrealisedPnl     func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	PositionConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	PositionEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	PositionResolution struct {
		Closed     func(childComplexity int) int
		Distressed func(childComplexity int) int
		MarkPrice  func(childComplexity int) int
		MarketID   func(childComplexity int) int
	}

	PositionUpdate struct {
		AverageEntryPrice func(childComplexity int) int
		MarketId          func(childComplexity int) int
		OpenVolume        func(childComplexity int) int
		PartyId           func(childComplexity int) int
		RealisedPnl       func(childComplexity int) int
		UnrealisedPnl     func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	PriceLevel struct {
		NumberOfOrders func(childComplexity int) int
		Price          func(childComplexity int) int
		Volume         func(childComplexity int) int
	}

	PriceMonitoringBounds struct {
		MaxValidPrice  func(childComplexity int) int
		MinValidPrice  func(childComplexity int) int
		ReferencePrice func(childComplexity int) int
		Trigger        func(childComplexity int) int
	}

	PriceMonitoringParameters struct {
		Triggers func(childComplexity int) int
	}

	PriceMonitoringSettings struct {
		Parameters func(childComplexity int) int
	}

	PriceMonitoringTrigger struct {
		AuctionExtensionSecs func(childComplexity int) int
		HorizonSecs          func(childComplexity int) int
		Probability          func(childComplexity int) int
	}

	Property struct {
		Name  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	PropertyKey struct {
		Name func(childComplexity int) int
		Type func(childComplexity int) int
	}

	Proposal struct {
		Datetime                func(childComplexity int) int
		ErrorDetails            func(childComplexity int) int
		ID                      func(childComplexity int) int
		Party                   func(childComplexity int) int
		Rationale               func(childComplexity int) int
		Reference               func(childComplexity int) int
		RejectionReason         func(childComplexity int) int
		RequiredLpMajority      func(childComplexity int) int
		RequiredLpParticipation func(childComplexity int) int
		RequiredMajority        func(childComplexity int) int
		RequiredParticipation   func(childComplexity int) int
		State                   func(childComplexity int) int
		Terms                   func(childComplexity int) int
		Votes                   func(childComplexity int) int
	}

	ProposalEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	ProposalRationale struct {
		Description func(childComplexity int) int
		Title       func(childComplexity int) int
	}

	ProposalTerms struct {
		Change             func(childComplexity int) int
		ClosingDatetime    func(childComplexity int) int
		EnactmentDatetime  func(childComplexity int) int
		ValidationDatetime func(childComplexity int) int
	}

	ProposalVote struct {
		ProposalID func(childComplexity int) int
		Vote       func(childComplexity int) int
	}

	ProposalVoteConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	ProposalVoteEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	ProposalVoteSide struct {
		TotalEquityLikeShareWeight func(childComplexity int) int
		TotalNumber                func(childComplexity int) int
		TotalTokens                func(childComplexity int) int
		TotalWeight                func(childComplexity int) int
		Votes                      func(childComplexity int) int
	}

	ProposalVotes struct {
		No  func(childComplexity int) int
		Yes func(childComplexity int) int
	}

	ProposalsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Query struct {
		Asset                              func(childComplexity int, id string) int
		Assets                             func(childComplexity int) int
		AssetsConnection                   func(childComplexity int, id *string, pagination *v2.Pagination) int
		Deposit                            func(childComplexity int, id string) int
		Epoch                              func(childComplexity int, id *string) int
		Erc20ListAssetBundle               func(childComplexity int, assetID string) int
		Erc20MultiSigSignerAddedBundles    func(childComplexity int, nodeID string, submitter *string, epochSeq *string, pagination *v2.Pagination) int
		Erc20MultiSigSignerRemovedBundles  func(childComplexity int, nodeID string, submitter *string, epochSeq *string, pagination *v2.Pagination) int
		Erc20SetAssetLimitsBundle          func(childComplexity int, proposalID string) int
		Erc20WithdrawalApproval            func(childComplexity int, withdrawalID string) int
		EstimateOrder                      func(childComplexity int, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *string, typeArg vega.Order_Type) int
		EthereumKeyRotations               func(childComplexity int, nodeID *string) int
		GetMarketDataHistoryByID           func(childComplexity int, id string, start *int, end *int, skip *int, first *int, last *int) int
		GetMarketDataHistoryConnectionByID func(childComplexity int, id string, start *int, end *int, pagination *v2.Pagination) int
		HistoricBalances                   func(childComplexity int, filter *v2.AccountFilter, groupBy []*v2.AccountField, dateRange *v2.DateRange, pagination *v2.Pagination) int
		KeyRotations                       func(childComplexity int, id *string) int
		KeyRotationsConnection             func(childComplexity int, id *string, pagination *v2.Pagination) int
		LastBlockHeight                    func(childComplexity int) int
		Market                             func(childComplexity int, id string) int
		Markets                            func(childComplexity int, id *string) int
		MarketsConnection                  func(childComplexity int, id *string, pagination *v2.Pagination) int
		NetworkLimits                      func(childComplexity int) int
		NetworkParameter                   func(childComplexity int, key string) int
		NetworkParameters                  func(childComplexity int) int
		NetworkParametersConnection        func(childComplexity int, pagination *v2.Pagination) int
		NetworkParametersProposals         func(childComplexity int, inState *vega.Proposal_State) int
		NewAssetProposals                  func(childComplexity int, inState *vega.Proposal_State) int
		NewFreeformProposals               func(childComplexity int, inState *vega.Proposal_State) int
		NewMarketProposals                 func(childComplexity int, inState *vega.Proposal_State) int
		Node                               func(childComplexity int, id string) int
		NodeData                           func(childComplexity int) int
		NodeSignatures                     func(childComplexity int, resourceID string) int
		NodeSignaturesConnection           func(childComplexity int, resourceID string, pagination *v2.Pagination) int
		Nodes                              func(childComplexity int) int
		NodesConnection                    func(childComplexity int, pagination *v2.Pagination) int
		OracleData                         func(childComplexity int, pagination *OffsetPagination) int
		OracleDataBySpec                   func(childComplexity int, oracleSpecID string, pagination *OffsetPagination) int
		OracleDataBySpecConnection         func(childComplexity int, oracleSpecID string, pagination *v2.Pagination) int
		OracleDataConnection               func(childComplexity int, pagination *v2.Pagination) int
		OracleSpec                         func(childComplexity int, oracleSpecID string) int
		OracleSpecs                        func(childComplexity int, pagination *OffsetPagination) int
		OracleSpecsConnection              func(childComplexity int, pagination *v2.Pagination) int
		OrderByID                          func(childComplexity int, id string, version *int) int
		OrderByReference                   func(childComplexity int, reference string) int
		OrderVersions                      func(childComplexity int, orderID string, skip *int, first *int, last *int) int
		OrderVersionsConnection            func(childComplexity int, orderID *string, pagination *v2.Pagination) int
		Parties                            func(childComplexity int, id *string) int
		PartiesConnection                  func(childComplexity int, id *string, pagination *v2.Pagination) int
		Party                              func(childComplexity int, id string) int
		Proposal                           func(childComplexity int, id *string, reference *string) int
		Proposals                          func(childComplexity int, inState *vega.Proposal_State) int
		ProposalsConnection                func(childComplexity int, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) int
		Statistics                         func(childComplexity int) int
		Transfers                          func(childComplexity int, pubkey string, isFrom *bool, isTo *bool) int
		TransfersConnection                func(childComplexity int, partyID *string, direction *TransferDirection, pagination *v2.Pagination) int
		UpdateMarketProposals              func(childComplexity int, marketID *string, inState *vega.Proposal_State) int
		Withdrawal                         func(childComplexity int, id string) int
	}

	RankingScore struct {
		PerformanceScore func(childComplexity int) int
		PreviousStatus   func(childComplexity int) int
		RankingScore     func(childComplexity int) int
		StakeScore       func(childComplexity int) int
		Status           func(childComplexity int) int
		VotingPower      func(childComplexity int) int
	}

	RecurringTransfer struct {
		DispatchStrategy func(childComplexity int) int
		EndEpoch         func(childComplexity int) int
		Factor           func(childComplexity int) int
		StartEpoch       func(childComplexity int) int
	}

	Reward struct {
		Amount            func(childComplexity int) int
		Asset             func(childComplexity int) int
		Epoch             func(childComplexity int) int
		MarketId          func(childComplexity int) int
		Party             func(childComplexity int) int
		PercentageOfTotal func(childComplexity int) int
		ReceivedAt        func(childComplexity int) int
		RewardType        func(childComplexity int) int
	}

	RewardEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	RewardPerAssetDetail struct {
		Asset       func(childComplexity int) int
		AssetId     func(childComplexity int) int
		Rewards     func(childComplexity int) int
		TotalAmount func(childComplexity int) int
	}

	RewardScore struct {
		MultisigScore     func(childComplexity int) int
		NormalisedScore   func(childComplexity int) int
		PerformanceScore  func(childComplexity int) int
		RawValidatorScore func(childComplexity int) int
		ValidatorScore    func(childComplexity int) int
		ValidatorStatus   func(childComplexity int) int
	}

	RewardSummary struct {
		Amount            func(childComplexity int) int
		Asset             func(childComplexity int) int
		Rewards           func(childComplexity int, skip *int, first *int, last *int) int
		RewardsConnection func(childComplexity int, assetID *string, pagination *v2.Pagination) int
	}

	RewardSummaryConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	RewardSummaryEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	RewardsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	RiskFactor struct {
		Long   func(childComplexity int) int
		Market func(childComplexity int) int
		Short  func(childComplexity int) int
	}

	ScalingFactors struct {
		CollateralRelease func(childComplexity int) int
		InitialMargin     func(childComplexity int) int
		SearchLevel       func(childComplexity int) int
	}

	SettleDistressed struct {
		Margin   func(childComplexity int) int
		MarketID func(childComplexity int) int
		PartyID  func(childComplexity int) int
		Price    func(childComplexity int) int
	}

	SettlePosition struct {
		MarketID         func(childComplexity int) int
		PartyID          func(childComplexity int) int
		Price            func(childComplexity int) int
		TradeSettlements func(childComplexity int) int
	}

	SimpleRiskModel struct {
		Params func(childComplexity int) int
	}

	SimpleRiskModelParams struct {
		FactorLong  func(childComplexity int) int
		FactorShort func(childComplexity int) int
	}

	StakeLinking struct {
		Amount      func(childComplexity int) int
		FinalizedAt func(childComplexity int) int
		Id          func(childComplexity int) int
		Party       func(childComplexity int) int
		Status      func(childComplexity int) int
		Timestamp   func(childComplexity int) int
		TxHash      func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	StakeLinkingEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	StakesConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	StakingSummary struct {
		CurrentStakeAvailable func(childComplexity int) int
		Linkings              func(childComplexity int, pagination *v2.Pagination) int
	}

	Statistics struct {
		AppVersion            func(childComplexity int) int
		AppVersionHash        func(childComplexity int) int
		AverageOrdersPerBlock func(childComplexity int) int
		AverageTxBytes        func(childComplexity int) int
		BacklogLength         func(childComplexity int) int
		BlockDuration         func(childComplexity int) int
		BlockHash             func(childComplexity int) int
		BlockHeight           func(childComplexity int) int
		ChainId               func(childComplexity int) int
		ChainVersion          func(childComplexity int) int
		CurrentTime           func(childComplexity int) int
		GenesisTime           func(childComplexity int) int
		OrdersPerSecond       func(childComplexity int) int
		Status                func(childComplexity int) int
		TotalAmendOrder       func(childComplexity int) int
		TotalCancelOrder      func(childComplexity int) int
		TotalCreateOrder      func(childComplexity int) int
		TotalMarkets          func(childComplexity int) int
		TotalOrders           func(childComplexity int) int
		TotalPeers            func(childComplexity int) int
		TotalTrades           func(childComplexity int) int
		TradesPerSecond       func(childComplexity int) int
		TxPerBlock            func(childComplexity int) int
		Uptime                func(childComplexity int) int
		VegaTime              func(childComplexity int) int
	}

	Subscription struct {
		Accounts            func(childComplexity int, marketID *string, partyID *string, assetID *string, typeArg *vega.AccountType) int
		BusEvents           func(childComplexity int, types []BusEventType, marketID *string, partyID *string, batchSize int) int
		Candles             func(childComplexity int, marketID string, interval vega.Interval) int
		Delegations         func(childComplexity int, partyID *string, nodeID *string) int
		LiquidityProvisions func(childComplexity int, partyID *string, marketID *string) int
		Margins             func(childComplexity int, partyID string, marketID *string) int
		MarketsData         func(childComplexity int, marketIds []string) int
		MarketsDepth        func(childComplexity int, marketIds []string) int
		MarketsDepthUpdate  func(childComplexity int, marketIds []string) int
		Orders              func(childComplexity int, marketID *string, partyID *string) int
		Positions           func(childComplexity int, partyID *string, marketID *string) int
		Proposals           func(childComplexity int, partyID *string) int
		Rewards             func(childComplexity int, assetID *string, partyID *string) int
		Trades              func(childComplexity int, marketID *string, partyID *string) int
		Votes               func(childComplexity int, proposalID *string, partyID *string) int
	}

	TargetStakeParameters struct {
		ScalingFactor func(childComplexity int) int
		TimeWindow    func(childComplexity int) int
	}

	TimeUpdate struct {
		Timestamp func(childComplexity int) int
	}

	TradableInstrument struct {
		Instrument       func(childComplexity int) int
		MarginCalculator func(childComplexity int) int
		RiskModel        func(childComplexity int) int
	}

	Trade struct {
		Aggressor          func(childComplexity int) int
		BuyOrder           func(childComplexity int) int
		Buyer              func(childComplexity int) int
		BuyerAuctionBatch  func(childComplexity int) int
		BuyerFee           func(childComplexity int) int
		CreatedAt          func(childComplexity int) int
		Id                 func(childComplexity int) int
		Market             func(childComplexity int) int
		Price              func(childComplexity int) int
		SellOrder          func(childComplexity int) int
		Seller             func(childComplexity int) int
		SellerAuctionBatch func(childComplexity int) int
		SellerFee          func(childComplexity int) int
		Size               func(childComplexity int) int
		Type               func(childComplexity int) int
	}

	TradeConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	TradeEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	TradeFee struct {
		InfrastructureFee func(childComplexity int) int
		LiquidityFee      func(childComplexity int) int
		MakerFee          func(childComplexity int) int
	}

	TradeSettlement struct {
		Price func(childComplexity int) int
		Size  func(childComplexity int) int
	}

	TradeUpdate struct {
		Aggressor          func(childComplexity int) int
		BuyOrder           func(childComplexity int) int
		BuyerAuctionBatch  func(childComplexity int) int
		BuyerFee           func(childComplexity int) int
		BuyerID            func(childComplexity int) int
		CreatedAt          func(childComplexity int) int
		Id                 func(childComplexity int) int
		MarketId           func(childComplexity int) int
		Price              func(childComplexity int) int
		SellOrder          func(childComplexity int) int
		SellerAuctionBatch func(childComplexity int) int
		SellerFee          func(childComplexity int) int
		SellerID           func(childComplexity int) int
		Size               func(childComplexity int) int
		Type               func(childComplexity int) int
	}

	TransactionSubmitted struct {
		Success func(childComplexity int) int
	}

	Transfer struct {
		Amount          func(childComplexity int) int
		Asset           func(childComplexity int) int
		From            func(childComplexity int) int
		FromAccountType func(childComplexity int) int
		Id              func(childComplexity int) int
		Kind            func(childComplexity int) int
		Reference       func(childComplexity int) int
		Status          func(childComplexity int) int
		Timestamp       func(childComplexity int) int
		To              func(childComplexity int) int
		ToAccountType   func(childComplexity int) int
	}

	TransferBalance struct {
		Account func(childComplexity int) int
		Balance func(childComplexity int) int
	}

	TransferConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	TransferEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	TransferResponse struct {
		Balances  func(childComplexity int) int
		Transfers func(childComplexity int) int
	}

	TransferResponses struct {
		Responses func(childComplexity int) int
	}

	UpdateAsset struct {
		Quantum func(childComplexity int) int
		Source  func(childComplexity int) int
	}

	UpdateERC20 struct {
		LifetimeLimit     func(childComplexity int) int
		WithdrawThreshold func(childComplexity int) int
	}

	UpdateFutureProduct struct {
		OracleSpecBinding               func(childComplexity int) int
		OracleSpecForSettlementPrice    func(childComplexity int) int
		OracleSpecForTradingTermination func(childComplexity int) int
		QuoteName                       func(childComplexity int) int
	}

	UpdateInstrumentConfiguration struct {
		Code    func(childComplexity int) int
		Product func(childComplexity int) int
	}

	UpdateMarket struct {
		MarketId                  func(childComplexity int) int
		UpdateMarketConfiguration func(childComplexity int) int
	}

	UpdateMarketConfiguration struct {
		Instrument                    func(childComplexity int) int
		LiquidityMonitoringParameters func(childComplexity int) int
		Metadata                      func(childComplexity int) int
		PriceMonitoringParameters     func(childComplexity int) int
		RiskParameters                func(childComplexity int) int
	}

	UpdateMarketLogNormalRiskModel struct {
		LogNormal func(childComplexity int) int
	}

	UpdateMarketSimpleRiskModel struct {
		Simple func(childComplexity int) int
	}

	UpdateNetworkParameter struct {
		NetworkParameter func(childComplexity int) int
	}

	Vote struct {
		Datetime               func(childComplexity int) int
		EquityLikeShareWeight  func(childComplexity int) int
		GovernanceTokenBalance func(childComplexity int) int
		GovernanceTokenWeight  func(childComplexity int) int
		Party                  func(childComplexity int) int
		ProposalId             func(childComplexity int) int
		Value                  func(childComplexity int) int
	}

	VoteConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	VoteEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Withdrawal struct {
		Amount             func(childComplexity int) int
		Asset              func(childComplexity int) int
		CreatedTimestamp   func(childComplexity int) int
		Details            func(childComplexity int) int
		Expiry             func(childComplexity int) int
		Id                 func(childComplexity int) int
		Party              func(childComplexity int) int
		Ref                func(childComplexity int) int
		Status             func(childComplexity int) int
		TxHash             func(childComplexity int) int
		WithdrawnTimestamp func(childComplexity int) int
	}

	WithdrawalEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	WithdrawalsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type ContinuousTrading

type ContinuousTrading struct {
	// Size of an increment in price in terms of the quote currency
	TickSize string `json:"tickSize"`
}

A mode where Vega tries to execute orders as soon as they are received

type CoreProxyServiceClient

type CoreProxyServiceClient interface {
	vegaprotoapi.CoreServiceClient
}

CoreProxyServiceClient ...

type DateRangeResolver added in v0.55.0

type DateRangeResolver interface {
	Start(ctx context.Context, obj *v2.DateRange, data *int64) error
	End(ctx context.Context, obj *v2.DateRange, data *int64) error
}

type DelegationResolver

type DelegationResolver interface {
	Party(ctx context.Context, obj *vega.Delegation) (*vega.Party, error)
	Node(ctx context.Context, obj *vega.Delegation) (*vega.Node, error)
	Epoch(ctx context.Context, obj *vega.Delegation) (int, error)
}

type DepositResolver

type DepositResolver interface {
	Party(ctx context.Context, obj *vega.Deposit) (*vega.Party, error)

	Asset(ctx context.Context, obj *vega.Deposit) (*vega.Asset, error)

	CreatedTimestamp(ctx context.Context, obj *vega.Deposit) (string, error)
	CreditedTimestamp(ctx context.Context, obj *vega.Deposit) (*string, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type DiscreteTrading

type DiscreteTrading struct {
	// Duration of the discrete trading batch in nanoseconds. Maximum 1 month.
	Duration int `json:"duration"`
	// Size of an increment in price in terms of the quote currency
	TickSize string `json:"tickSize"`
}

Frequent batch auctions trading mode

type DispatchStrategy

type DispatchStrategy struct {
	// Defines the data that will be used to compare markets so as to distribute rewards appropriately
	DispatchMetric vega.DispatchMetric `json:"dispatchMetric"`
	// The asset to use for measuring contribution to the metric
	DispatchMetricAssetID string `json:"dispatchMetricAssetId"`
	// Scope the dispatch to this market only under the metric asset
	MarketIdsInScope []string `json:"marketIdsInScope"`
}

Dispatch strategy for a recurring transfer

type ERC20MultiSigSignerAddedBundle added in v0.55.0

type ERC20MultiSigSignerAddedBundle struct {
	// The ethereum address of the signer to be added
	NewSigner string `json:"newSigner"`
	// The ethereum address of the submitter
	Submitter string `json:"submitter"`
	// The nonce used in the signing operation
	Nonce string `json:"nonce"`
	// Unix-nano timestamp for when the validator was added
	Timestamp string `json:"timestamp"`
	// The bundle of signatures from current validators to sign in the new signer
	Signatures string `json:"signatures"`
	// The epoch in which the validator was added
	EpochSeq string `json:"epochSeq"`
}

type ERC20MultiSigSignerAddedBundleEdge added in v0.55.0

type ERC20MultiSigSignerAddedBundleEdge struct {
	Node   *ERC20MultiSigSignerAddedBundle `json:"node"`
	Cursor string                          `json:"cursor"`
}

type ERC20MultiSigSignerAddedConnection added in v0.55.0

type ERC20MultiSigSignerAddedConnection struct {
	Edges    []*ERC20MultiSigSignerAddedBundleEdge `json:"edges"`
	PageInfo *v2.PageInfo                          `json:"pageInfo"`
}

Response for the signature bundle to add a particular validator to the signer list of the multisig contract

type ERC20MultiSigSignerRemovedBundle added in v0.55.0

type ERC20MultiSigSignerRemovedBundle struct {
	// The ethereum address of the signer to be removed
	OldSigner string `json:"oldSigner"`
	// The ethereum address of the submitter
	Submitter string `json:"submitter"`
	// The nonce used in the signing operation
	Nonce string `json:"nonce"`
	// Unix-nano timestamp for when the validator was added
	Timestamp string `json:"timestamp"`
	// The bundle of signatures from current validators to sign in the new signer
	Signatures string `json:"signatures"`
	// The epoch in which the validator was removed
	EpochSeq string `json:"epochSeq"`
}

type ERC20MultiSigSignerRemovedBundleEdge added in v0.55.0

type ERC20MultiSigSignerRemovedBundleEdge struct {
	Node   *ERC20MultiSigSignerRemovedBundle `json:"node"`
	Cursor string                            `json:"cursor"`
}

type ERC20MultiSigSignerRemovedConnection added in v0.55.0

type ERC20MultiSigSignerRemovedConnection struct {
	// The list of signer bundles for that validator
	Edges []*ERC20MultiSigSignerRemovedBundleEdge `json:"edges"`
	// The pagination information
	PageInfo *v2.PageInfo `json:"pageInfo"`
}

Response for the signature bundle to remove a particular validator from the signer list of the multisig contract

type ERC20SetAssetLimitsBundle added in v0.55.0

type ERC20SetAssetLimitsBundle struct {
	// The address of the asset on ethereum
	AssetSource string `json:"assetSource"`
	// The ID of the vega asset
	VegaAssetID string `json:"vegaAssetId"`
	// The nonce, which is actually the internal reference for the proposal
	Nonce string `json:"nonce"`
	// The lifetime limit deposit for this asset
	LifetimeLimit string `json:"lifetimeLimit"`
	// The threshold withdraw for this asset
	Threshold string `json:"threshold"`
	// The signatures bundle as hex encoded data, forward by 0x
	// e.g: 0x + sig1 + sig2 + ... + sixN
	Signatures string `json:"signatures"`
}

Response for the signature bundle to update the token limits (maxLifetimeDeposit and withdrawThreshold) for a given ERC20 token (already allowlisted) in the collateral bridge

type EpochParticipation

type EpochParticipation struct {
	Epoch *vega.Epoch `json:"epoch"`
	// RFC3339 timestamp
	Offline *string `json:"offline"`
	// RFC3339 timestamp
	Online *string `json:"online"`
	// Total amount rewarded for participation in the given epoch
	TotalRewards *float64 `json:"totalRewards"`
}

Summary of a node's rewards for a given epoch

type EpochResolver

type EpochResolver interface {
	ID(ctx context.Context, obj *vega.Epoch) (string, error)

	ValidatorsConnection(ctx context.Context, obj *vega.Epoch, pagination *v2.Pagination) (*v2.NodesConnection, error)

	DelegationsConnection(ctx context.Context, obj *vega.Epoch, partyID *string, nodeID *string, pagination *v2.Pagination) (*v2.DelegationsConnection, error)
}

type EpochTimestampsResolver

type EpochTimestampsResolver interface {
	Start(ctx context.Context, obj *vega.EpochTimestamps) (*string, error)
	Expiry(ctx context.Context, obj *vega.EpochTimestamps) (*string, error)
	End(ctx context.Context, obj *vega.EpochTimestamps) (*string, error)
}

type Erc20

type Erc20 struct {
	// The address of the ERC20 contract
	ContractAddress string `json:"contractAddress"`
	// The lifetime limits deposit per address
	// Note: this is a temporary measure for alpha mainnet
	LifetimeLimit string `json:"lifetimeLimit"`
	// The maximum allowed per withdrawal
	// Note: this is a temporary measure for alpha mainnet
	WithdrawThreshold string `json:"withdrawThreshold"`
}

An asset originated from an Ethereum ERC20 Token

func ERC20FromProto

func ERC20FromProto(ea *types.ERC20) *Erc20

func (Erc20) IsAssetSource

func (Erc20) IsAssetSource()

type Erc20ListAssetBundle added in v0.55.0

type Erc20ListAssetBundle struct {
	// The source asset in the ethereum network
	AssetSource string `json:"assetSource"`
	// The ID of the vega asset
	VegaAssetID string `json:"vegaAssetId"`
	// The nonce to be used in the request
	Nonce string `json:"nonce"`
	// Signature aggregate from the nodes, in the following format:
	// 0x + sig1 + sig2 + ... + sigN
	Signatures string `json:"signatures"`
}

Response for the signature bundle to allowlist an ERC20 token in the collateral bridge

type Erc20WithdrawalApproval

type Erc20WithdrawalApproval struct {
	// The source asset in the ethereum network
	AssetSource string `json:"assetSource"`
	// The amount to be withdrawn
	Amount string `json:"amount"`
	// Timestamp in seconds for expiry of the approval
	Expiry string `json:"expiry"`
	// The nonce to be used in the request
	Nonce string `json:"nonce"`
	// Signature aggregate from the nodes, in the following format:
	// 0x + sig1 + sig2 + ... + sigN
	Signatures string `json:"signatures"`
	// The target address which will receive the funds
	TargetAddress string `json:"targetAddress"`
	// Timestamp at which the withdrawal was created
	Creation string `json:"creation"`
}

All the data related to the approval of a withdrawal from the network

type Erc20WithdrawalDetails

type Erc20WithdrawalDetails struct {
	// The ethereum address of the receiver of the asset funds
	ReceiverAddress string `json:"receiverAddress"`
}

Specific details for an erc20 withdrawal

func (Erc20WithdrawalDetails) IsWithdrawalDetails

func (Erc20WithdrawalDetails) IsWithdrawalDetails()

type EthereumEvent

type EthereumEvent struct {
	// The ID of the ethereum contract to use (string)
	ContractID string `json:"contractId"`
	// Name of the Ethereum event to listen to. (string)
	Event string `json:"event"`
}

An Ethereum oracle

func (EthereumEvent) IsOracle

func (EthereumEvent) IsOracle()

type EthereumKeyRotationResolver

type EthereumKeyRotationResolver interface {
	BlockHeight(ctx context.Context, obj *v1.EthereumKeyRotation) (string, error)
}

type Event

type Event interface {
	IsEvent()
}

Union type for wrapped events in stream PROPOSAL is mapped to governance data, something to keep in mind

type FutureProductResolver

type FutureProductResolver interface {
	SettlementAsset(ctx context.Context, obj *vega.FutureProduct) (*vega.Asset, error)
}

type FutureResolver

type FutureResolver interface {
	SettlementAsset(ctx context.Context, obj *vega.Future) (*vega.Asset, error)
}

type GraphServer

type GraphServer struct {
	gateway.Config
	// contains filtered or unexported fields
}

GraphServer is the graphql server.

func New

func New(
	log *logging.Logger,
	config gateway.Config,
	vegaPaths paths.Paths,
) (*GraphServer, error)

New returns a new instance of the grapqhl server.

func (*GraphServer) ReloadConf

func (g *GraphServer) ReloadConf(cfg gateway.Config)

ReloadConf update the internal configuration of the graphql server.

func (*GraphServer) Start

func (g *GraphServer) Start() error

Start start the server in order receive http request.

func (*GraphServer) Stop

func (g *GraphServer) Stop()

Stop will close the http server gracefully.

type InstrumentConfigurationResolver

type InstrumentConfigurationResolver interface {
	FutureProduct(ctx context.Context, obj *vega.InstrumentConfiguration) (*vega.FutureProduct, error)
}

type InstrumentResolver

type InstrumentResolver interface {
	Product(ctx context.Context, obj *vega.Instrument) (Product, error)
}

type KeyRotationResolver

type KeyRotationResolver interface {
	BlockHeight(ctx context.Context, obj *v1.KeyRotation) (string, error)
}

type LedgerEntry

type LedgerEntry struct {
	// Account from which the asset was taken
	FromAccount *vega.AccountDetails `json:"fromAccount"`
	// Account to which the balance was transferred
	ToAccount *vega.AccountDetails `json:"toAccount"`
	// The amount transferred
	Amount string `json:"amount"`
	// Type of ledger entry
	Type string `json:"type"`
	// RFC3339Nano time at which the transfer was made
	Timestamp string `json:"timestamp"`
}

type LiquidityMonitoringParameters

type LiquidityMonitoringParameters struct {
	// Specifies parameters related to target stake calculation
	TargetStakeParameters *TargetStakeParameters `json:"targetStakeParameters"`
	// Specifies the triggering ratio for entering liquidity auction
	TriggeringRatio float64 `json:"triggeringRatio"`
}

Configuration of a market liquidity monitoring parameters

type LiquidityOrderReferenceResolver

type LiquidityOrderReferenceResolver interface {
	Order(ctx context.Context, obj *vega.LiquidityOrderReference) (*vega.Order, error)
}

type LiquidityProviderFeeShare

type LiquidityProviderFeeShare struct {
	// The liquidity provider party ID
	Party *vega.Party `json:"party"`
	// The share owned by this liquidity provider (float)
	EquityLikeShare string `json:"equityLikeShare"`
	// The average entry valuation of the liquidity provider for the market
	AverageEntryValuation string `json:"averageEntryValuation"`
}

The equity like share of liquidity fee for each liquidity provider

type LiquidityProvisionResolver

type LiquidityProvisionResolver interface {
	Party(ctx context.Context, obj *vega.LiquidityProvision) (*vega.Party, error)
	CreatedAt(ctx context.Context, obj *vega.LiquidityProvision) (string, error)
	UpdatedAt(ctx context.Context, obj *vega.LiquidityProvision) (*string, error)
	Market(ctx context.Context, obj *vega.LiquidityProvision) (*vega.Market, error)

	Version(ctx context.Context, obj *vega.LiquidityProvision) (string, error)
}

type LiquidityProvisionUpdateResolver added in v0.55.0

type LiquidityProvisionUpdateResolver interface {
	CreatedAt(ctx context.Context, obj *vega.LiquidityProvision) (string, error)
	UpdatedAt(ctx context.Context, obj *vega.LiquidityProvision) (*string, error)

	Version(ctx context.Context, obj *vega.LiquidityProvision) (string, error)
}

type LossSocialization

type LossSocialization struct {
	// The market ID where loss socialization happened
	MarketID string `json:"marketId"`
	// The party that was part of the loss socialization
	PartyID string `json:"partyId"`
	// The amount lost
	Amount string `json:"amount"`
}

func (LossSocialization) IsEvent

func (LossSocialization) IsEvent()

type MarginLevelsResolver

type MarginLevelsResolver interface {
	Market(ctx context.Context, obj *vega.MarginLevels) (*vega.Market, error)
	Asset(ctx context.Context, obj *vega.MarginLevels) (*vega.Asset, error)
	Party(ctx context.Context, obj *vega.MarginLevels) (*vega.Party, error)
	MaintenanceLevel(ctx context.Context, obj *vega.MarginLevels) (string, error)

	InitialLevel(ctx context.Context, obj *vega.MarginLevels) (string, error)

	Timestamp(ctx context.Context, obj *vega.MarginLevels) (string, error)
}

type MarginLevelsUpdateResolver added in v0.55.0

type MarginLevelsUpdateResolver interface {
	MaintenanceLevel(ctx context.Context, obj *vega.MarginLevels) (string, error)

	InitialLevel(ctx context.Context, obj *vega.MarginLevels) (string, error)

	Timestamp(ctx context.Context, obj *vega.MarginLevels) (string, error)
}

type MarketDataCommitments

type MarketDataCommitments struct {
	// A set of liquidity sell orders to meet the liquidity provision obligation.
	Sells []*vega.LiquidityOrderReference `json:"sells"`
	// A set of liquidity buy orders to meet the liquidity provision obligation.
	Buys []*vega.LiquidityOrderReference `json:"buys"`
}

The liquidity commitments for this market

type MarketDataResolver

type MarketDataResolver interface {
	Market(ctx context.Context, obj *vega.MarketData) (*vega.Market, error)

	BestBidVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestOfferVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestStaticBidVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestStaticOfferVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	Timestamp(ctx context.Context, obj *vega.MarketData) (string, error)
	OpenInterest(ctx context.Context, obj *vega.MarketData) (string, error)
	AuctionEnd(ctx context.Context, obj *vega.MarketData) (*string, error)
	AuctionStart(ctx context.Context, obj *vega.MarketData) (*string, error)

	IndicativeVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	Commitments(ctx context.Context, obj *vega.MarketData) (*MarketDataCommitments, error)
	PriceMonitoringBounds(ctx context.Context, obj *vega.MarketData) ([]*PriceMonitoringBounds, error)

	LiquidityProviderFeeShare(ctx context.Context, obj *vega.MarketData) ([]*LiquidityProviderFeeShare, error)
}

type MarketDepthResolver

type MarketDepthResolver interface {
	Market(ctx context.Context, obj *vega.MarketDepth) (*vega.Market, error)

	LastTrade(ctx context.Context, obj *vega.MarketDepth) (*vega.Trade, error)
	SequenceNumber(ctx context.Context, obj *vega.MarketDepth) (string, error)
}

type MarketDepthTrade

type MarketDepthTrade struct {
	// ID of the trade for the given market (if available)
	ID string `json:"id"`
	// Price of the trade
	Price string `json:"price"`
	// Size of the trade
	Size string `json:"size"`
}

type MarketDepthUpdateResolver

type MarketDepthUpdateResolver interface {
	Market(ctx context.Context, obj *vega.MarketDepthUpdate) (*vega.Market, error)

	SequenceNumber(ctx context.Context, obj *vega.MarketDepthUpdate) (string, error)
	PreviousSequenceNumber(ctx context.Context, obj *vega.MarketDepthUpdate) (string, error)
}

type MarketEvent

type MarketEvent struct {
	// The market ID
	MarketID string `json:"marketId"`
	// The message - market events are used for logging
	Payload string `json:"payload"`
}

func (MarketEvent) IsEvent

func (MarketEvent) IsEvent()

type MarketLogEvent

type MarketLogEvent interface {
	GetMarketID() string
	GetPayload() string
}

type MarketResolver

type MarketResolver interface {
	DecimalPlaces(ctx context.Context, obj *vega.Market) (int, error)
	PositionDecimalPlaces(ctx context.Context, obj *vega.Market) (int, error)
	OpeningAuction(ctx context.Context, obj *vega.Market) (*AuctionDuration, error)
	PriceMonitoringSettings(ctx context.Context, obj *vega.Market) (*PriceMonitoringSettings, error)
	LiquidityMonitoringParameters(ctx context.Context, obj *vega.Market) (*LiquidityMonitoringParameters, error)

	Proposal(ctx context.Context, obj *vega.Market) (*vega.GovernanceData, error)
	Orders(ctx context.Context, obj *vega.Market, skip *int, first *int, last *int) ([]*vega.Order, error)
	OrdersConnection(ctx context.Context, obj *vega.Market, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.OrderConnection, error)
	Accounts(ctx context.Context, obj *vega.Market, partyID *string) ([]*vega.Account, error)
	AccountsConnection(ctx context.Context, obj *vega.Market, partyID *string, pagination *v2.Pagination) (*v2.AccountsConnection, error)
	Trades(ctx context.Context, obj *vega.Market, skip *int, first *int, last *int) ([]*vega.Trade, error)
	TradesConnection(ctx context.Context, obj *vega.Market, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.TradeConnection, error)
	Depth(ctx context.Context, obj *vega.Market, maxDepth *int) (*vega.MarketDepth, error)
	CandlesConnection(ctx context.Context, obj *vega.Market, since string, to *string, interval vega.Interval, pagination *v2.Pagination) (*v2.CandleDataConnection, error)
	Data(ctx context.Context, obj *vega.Market) (*vega.MarketData, error)
	LiquidityProvisions(ctx context.Context, obj *vega.Market, partyID *string) ([]*vega.LiquidityProvision, error)
	LiquidityProvisionsConnection(ctx context.Context, obj *vega.Market, partyID *string, pagination *v2.Pagination) (*v2.LiquidityProvisionsConnection, error)

	RiskFactors(ctx context.Context, obj *vega.Market) (*vega.RiskFactor, error)
}

type MarketTick

type MarketTick struct {
	// The market ID
	MarketID string `json:"marketId"`
	// The block time
	Time string `json:"time"`
}

func (MarketTick) IsEvent

func (MarketTick) IsEvent()

type MarketTimestampsResolver

type MarketTimestampsResolver interface {
	Proposed(ctx context.Context, obj *vega.MarketTimestamps) (*string, error)
	Pending(ctx context.Context, obj *vega.MarketTimestamps) (*string, error)
	Open(ctx context.Context, obj *vega.MarketTimestamps) (*string, error)
	Close(ctx context.Context, obj *vega.MarketTimestamps) (*string, error)
}

type NewAssetResolver

type NewAssetResolver interface {
	Name(ctx context.Context, obj *vega.NewAsset) (string, error)
	Symbol(ctx context.Context, obj *vega.NewAsset) (string, error)
	Decimals(ctx context.Context, obj *vega.NewAsset) (int, error)
	Quantum(ctx context.Context, obj *vega.NewAsset) (string, error)
	Source(ctx context.Context, obj *vega.NewAsset) (AssetSource, error)
}

type NewFreeformResolver

type NewFreeformResolver interface {
	DoNotUse(ctx context.Context, obj *vega.NewFreeform) (*bool, error)
}

type NewMarketResolver

type NewMarketResolver interface {
	Instrument(ctx context.Context, obj *vega.NewMarket) (*vega.InstrumentConfiguration, error)
	DecimalPlaces(ctx context.Context, obj *vega.NewMarket) (int, error)
	RiskParameters(ctx context.Context, obj *vega.NewMarket) (RiskModel, error)
	Metadata(ctx context.Context, obj *vega.NewMarket) ([]string, error)
}

type NodeDataResolver

type NodeDataResolver interface {
	Uptime(ctx context.Context, obj *vega.NodeData) (float64, error)
}

type NodeResolver

type NodeResolver interface {
	DelegationsConnection(ctx context.Context, obj *vega.Node, partyID *string, pagination *v2.Pagination) (*v2.DelegationsConnection, error)
}

type NodeSignatureResolver

type NodeSignatureResolver interface {
	Signature(ctx context.Context, obj *v11.NodeSignature) (*string, error)
}

type ObservableLiquidityProviderFeeShare

type ObservableLiquidityProviderFeeShare struct {
	// The liquidity provider party ID
	PartyID string `json:"partyId"`
	// The share owned by this liquidity provider (float)
	EquityLikeShare string `json:"equityLikeShare"`
	// The average entry valuation of the liquidity provider for the market
	AverageEntryValuation string `json:"averageEntryValuation"`
}

The equity like share of liquidity fee for each liquidity provider

type ObservableMarketDataResolver

type ObservableMarketDataResolver interface {
	MarketID(ctx context.Context, obj *vega.MarketData) (string, error)

	BestBidVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestOfferVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestStaticBidVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	BestStaticOfferVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	Timestamp(ctx context.Context, obj *vega.MarketData) (string, error)
	OpenInterest(ctx context.Context, obj *vega.MarketData) (string, error)
	AuctionEnd(ctx context.Context, obj *vega.MarketData) (*string, error)
	AuctionStart(ctx context.Context, obj *vega.MarketData) (*string, error)

	IndicativeVolume(ctx context.Context, obj *vega.MarketData) (string, error)

	PriceMonitoringBounds(ctx context.Context, obj *vega.MarketData) ([]*PriceMonitoringBounds, error)

	LiquidityProviderFeeShare(ctx context.Context, obj *vega.MarketData) ([]*ObservableLiquidityProviderFeeShare, error)
}

type ObservableMarketDepthResolver

type ObservableMarketDepthResolver interface {
	LastTrade(ctx context.Context, obj *vega.MarketDepth) (*MarketDepthTrade, error)
	SequenceNumber(ctx context.Context, obj *vega.MarketDepth) (string, error)
}

type ObservableMarketDepthUpdateResolver

type ObservableMarketDepthUpdateResolver interface {
	SequenceNumber(ctx context.Context, obj *vega.MarketDepthUpdate) (string, error)
	PreviousSequenceNumber(ctx context.Context, obj *vega.MarketDepthUpdate) (string, error)
}

type OffsetPagination

type OffsetPagination struct {
	// Skip the number of records specified, default is 0
	Skip int `json:"skip"`
	// Limit the number of returned records to the value specified, default is 50
	Limit int `json:"limit"`
	// Descending reverses the order of the records returned
	// default is true, if false the results will be returned in ascending order
	Descending bool `json:"descending"`
}

func (*OffsetPagination) ToProto

func (p *OffsetPagination) ToProto() (protoapi.Pagination, error)

type OneOffTransferResolver

type OneOffTransferResolver interface {
	DeliverOn(ctx context.Context, obj *v1.OneOffTransfer) (*string, error)
}

type Oracle

type Oracle interface {
	IsOracle()
}

type OracleDataResolver

type OracleDataResolver interface {
	BroadcastAt(ctx context.Context, obj *v12.OracleData) (string, error)
}

type OracleSpecResolver

type OracleSpecResolver interface {
	CreatedAt(ctx context.Context, obj *v12.OracleSpec) (string, error)
	UpdatedAt(ctx context.Context, obj *v12.OracleSpec) (*string, error)

	Data(ctx context.Context, obj *v12.OracleSpec) ([]*v12.OracleData, error)
	DataConnection(ctx context.Context, obj *v12.OracleSpec, pagination *v2.Pagination) (*v2.OracleDataConnection, error)
}

type OrderEstimate

type OrderEstimate struct {
	// The estimated fee if the order was to trade
	Fee *TradeFee `json:"fee"`
	// The total estimated amount of fee if the order was to trade
	TotalFeeAmount string `json:"totalFeeAmount"`
	// The margin requirement for this order
	MarginLevels *vega.MarginLevels `json:"marginLevels"`
}

An estimate of the fee to be paid by the order

type OrderResolver

type OrderResolver interface {
	Market(ctx context.Context, obj *vega.Order) (*vega.Market, error)
	Size(ctx context.Context, obj *vega.Order) (string, error)
	Remaining(ctx context.Context, obj *vega.Order) (string, error)
	Party(ctx context.Context, obj *vega.Order) (*vega.Party, error)
	CreatedAt(ctx context.Context, obj *vega.Order) (string, error)
	ExpiresAt(ctx context.Context, obj *vega.Order) (*string, error)

	Trades(ctx context.Context, obj *vega.Order) ([]*vega.Trade, error)
	TradesConnection(ctx context.Context, obj *vega.Order, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.TradeConnection, error)

	RejectionReason(ctx context.Context, obj *vega.Order) (*vega.OrderError, error)
	Version(ctx context.Context, obj *vega.Order) (string, error)
	UpdatedAt(ctx context.Context, obj *vega.Order) (*string, error)

	LiquidityProvision(ctx context.Context, obj *vega.Order) (*vega.LiquidityProvision, error)
}

type OrderUpdateResolver added in v0.55.0

type OrderUpdateResolver interface {
	Size(ctx context.Context, obj *vega.Order) (string, error)
	Remaining(ctx context.Context, obj *vega.Order) (string, error)

	CreatedAt(ctx context.Context, obj *vega.Order) (string, error)
	ExpiresAt(ctx context.Context, obj *vega.Order) (*string, error)

	RejectionReason(ctx context.Context, obj *vega.Order) (*vega.OrderError, error)
	Version(ctx context.Context, obj *vega.Order) (string, error)
	UpdatedAt(ctx context.Context, obj *vega.Order) (*string, error)
}

type PartyResolver

type PartyResolver interface {
	Orders(ctx context.Context, obj *vega.Party, skip *int, first *int, last *int) ([]*vega.Order, error)
	OrdersConnection(ctx context.Context, obj *vega.Party, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.OrderConnection, error)
	Trades(ctx context.Context, obj *vega.Party, marketID *string, skip *int, first *int, last *int) ([]*vega.Trade, error)
	TradesConnection(ctx context.Context, obj *vega.Party, marketID *string, dataRange *v2.DateRange, pagination *v2.Pagination) (*v2.TradeConnection, error)
	Accounts(ctx context.Context, obj *vega.Party, marketID *string, assetID *string, typeArg *vega.AccountType) ([]*vega.Account, error)
	AccountsConnection(ctx context.Context, obj *vega.Party, marketID *string, assetID *string, typeArg *vega.AccountType, pagination *v2.Pagination) (*v2.AccountsConnection, error)
	Positions(ctx context.Context, obj *vega.Party) ([]*vega.Position, error)
	PositionsConnection(ctx context.Context, obj *vega.Party, market *string, pagination *v2.Pagination) (*v2.PositionConnection, error)
	Margins(ctx context.Context, obj *vega.Party, marketID *string) ([]*vega.MarginLevels, error)
	MarginsConnection(ctx context.Context, obj *vega.Party, marketID *string, pagination *v2.Pagination) (*v2.MarginConnection, error)
	Proposals(ctx context.Context, obj *vega.Party, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	ProposalsConnection(ctx context.Context, obj *vega.Party, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) (*v2.GovernanceDataConnection, error)
	Votes(ctx context.Context, obj *vega.Party) ([]*ProposalVote, error)
	VotesConnection(ctx context.Context, obj *vega.Party, pagination *v2.Pagination) (*ProposalVoteConnection, error)
	Withdrawals(ctx context.Context, obj *vega.Party) ([]*vega.Withdrawal, error)
	WithdrawalsConnection(ctx context.Context, obj *vega.Party, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.WithdrawalsConnection, error)
	Deposits(ctx context.Context, obj *vega.Party) ([]*vega.Deposit, error)
	DepositsConnection(ctx context.Context, obj *vega.Party, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.DepositsConnection, error)
	LiquidityProvisions(ctx context.Context, obj *vega.Party, market *string, reference *string) ([]*vega.LiquidityProvision, error)
	LiquidityProvisionsConnection(ctx context.Context, obj *vega.Party, marketID *string, reference *string, pagination *v2.Pagination) (*v2.LiquidityProvisionsConnection, error)
	Delegations(ctx context.Context, obj *vega.Party, nodeID *string, skip *int, first *int, last *int) ([]*vega.Delegation, error)
	DelegationsConnection(ctx context.Context, obj *vega.Party, nodeID *string, pagination *v2.Pagination) (*v2.DelegationsConnection, error)
	Stake(ctx context.Context, obj *vega.Party) (*v13.PartyStakeResponse, error)
	StakingSummary(ctx context.Context, obj *vega.Party, pagination *v2.Pagination) (*StakingSummary, error)
	Rewards(ctx context.Context, obj *vega.Party, assetID *string, skip *int, first *int, last *int) ([]*vega.Reward, error)
	RewardsConnection(ctx context.Context, obj *vega.Party, assetID *string, pagination *v2.Pagination) (*v2.RewardsConnection, error)
	RewardSummaries(ctx context.Context, obj *vega.Party, assetID *string) ([]*vega.RewardSummary, error)
	RewardDetails(ctx context.Context, obj *vega.Party) ([]*vega.RewardSummary, error)
	TransfersConnection(ctx context.Context, obj *vega.Party, direction *TransferDirection, pagination *v2.Pagination) (*v2.TransferConnection, error)
}

type PartyStakeResolver

type PartyStakeResolver interface {
	Linkings(ctx context.Context, obj *v13.PartyStakeResponse) ([]*v1.StakeLinking, error)
}

type PositionResolution

type PositionResolution struct {
	// The market ID where position resolution happened
	MarketID string `json:"marketId"`
	// Number of distressed parties on market
	Distressed int `json:"distressed"`
	// Number of parties closed out
	Closed int `json:"closed"`
	// The mark price at which parties were distressed/closed out
	MarkPrice string `json:"markPrice"`
}

func (PositionResolution) IsEvent

func (PositionResolution) IsEvent()

type PositionResolver

type PositionResolver interface {
	Market(ctx context.Context, obj *vega.Position) (*vega.Market, error)
	Party(ctx context.Context, obj *vega.Position) (*vega.Party, error)
	OpenVolume(ctx context.Context, obj *vega.Position) (string, error)

	Margins(ctx context.Context, obj *vega.Position) ([]*vega.MarginLevels, error)
	MarginsConnection(ctx context.Context, obj *vega.Position, pagination *v2.Pagination) (*v2.MarginConnection, error)
	UpdatedAt(ctx context.Context, obj *vega.Position) (*string, error)
}

type PositionUpdateResolver added in v0.56.0

type PositionUpdateResolver interface {
	OpenVolume(ctx context.Context, obj *vega.Position) (string, error)

	UpdatedAt(ctx context.Context, obj *vega.Position) (*string, error)
}

type PriceLevelResolver

type PriceLevelResolver interface {
	Volume(ctx context.Context, obj *vega.PriceLevel) (string, error)
	NumberOfOrders(ctx context.Context, obj *vega.PriceLevel) (string, error)
}

type PriceMonitoringBounds

type PriceMonitoringBounds struct {
	// Minimum price that isn't currently breaching the specified price monitoring trigger
	MinValidPrice string `json:"minValidPrice"`
	// Maximum price that isn't currently breaching the specified price monitoring trigger
	MaxValidPrice string `json:"maxValidPrice"`
	// Price monitoring trigger associated with the bounds
	Trigger *PriceMonitoringTrigger `json:"trigger"`
	// Reference price used to calculate the valid price range
	ReferencePrice string `json:"referencePrice"`
}

Range of valid prices and the associated price monitoring trigger

type PriceMonitoringParameters

type PriceMonitoringParameters struct {
	// The list of triggers for this price monitoring
	Triggers []*PriceMonitoringTrigger `json:"triggers"`
}

PriceMonitoringParameters holds a list of triggers

type PriceMonitoringSettings

type PriceMonitoringSettings struct {
	// Specified a set of PriceMonitoringParameters to be use for price monitoring purposes
	Parameters *PriceMonitoringParameters `json:"parameters"`
}

Configuration of a market price monitoring auctions triggers

func PriceMonitoringSettingsFromProto

func PriceMonitoringSettingsFromProto(ppmst *types.PriceMonitoringSettings) (*PriceMonitoringSettings, error)

type PriceMonitoringTrigger

type PriceMonitoringTrigger struct {
	// Price monitoring projection horizon τ in seconds (> 0).
	HorizonSecs int `json:"horizonSecs"`
	// Price monitoring probability level p. (>0 and < 1)
	Probability float64 `json:"probability"`
	// Price monitoring auction extension duration in seconds should the price
	// breach its theoretical level over the specified horizon at the specified
	// probability level (> 0)
	AuctionExtensionSecs int `json:"auctionExtensionSecs"`
}

PriceMonitoringParameters holds together price projection horizon τ, probability level p, and auction extension duration

func PriceMonitoringTriggerFromProto

func PriceMonitoringTriggerFromProto(ppmt *types.PriceMonitoringTrigger) (*PriceMonitoringTrigger, error)

type Product

type Product interface {
	IsProduct()
}

type ProposalChange

type ProposalChange interface {
	IsProposalChange()
}

type ProposalResolver

type ProposalResolver interface {
	ID(ctx context.Context, obj *vega.GovernanceData) (*string, error)
	Reference(ctx context.Context, obj *vega.GovernanceData) (string, error)
	Party(ctx context.Context, obj *vega.GovernanceData) (*vega.Party, error)
	State(ctx context.Context, obj *vega.GovernanceData) (vega.Proposal_State, error)
	Datetime(ctx context.Context, obj *vega.GovernanceData) (string, error)
	Rationale(ctx context.Context, obj *vega.GovernanceData) (*vega.ProposalRationale, error)
	Terms(ctx context.Context, obj *vega.GovernanceData) (*vega.ProposalTerms, error)
	Votes(ctx context.Context, obj *vega.GovernanceData) (*ProposalVotes, error)
	RejectionReason(ctx context.Context, obj *vega.GovernanceData) (*vega.ProposalError, error)
	ErrorDetails(ctx context.Context, obj *vega.GovernanceData) (*string, error)
	RequiredMajority(ctx context.Context, obj *vega.GovernanceData) (string, error)
	RequiredParticipation(ctx context.Context, obj *vega.GovernanceData) (string, error)
	RequiredLpMajority(ctx context.Context, obj *vega.GovernanceData) (*string, error)
	RequiredLpParticipation(ctx context.Context, obj *vega.GovernanceData) (*string, error)
}

type ProposalTermsResolver

type ProposalTermsResolver interface {
	ClosingDatetime(ctx context.Context, obj *vega.ProposalTerms) (string, error)
	EnactmentDatetime(ctx context.Context, obj *vega.ProposalTerms) (*string, error)
	ValidationDatetime(ctx context.Context, obj *vega.ProposalTerms) (*string, error)
	Change(ctx context.Context, obj *vega.ProposalTerms) (ProposalChange, error)
}

type ProposalVote

type ProposalVote struct {
	// Cast vote
	Vote *vega.Vote `json:"vote"`
	// Proposal ID the vote is cast on
	ProposalID string `json:"proposalId"`
}

func ProposalVoteFromProto

func ProposalVoteFromProto(v *types.Vote) *ProposalVote

ProposalVoteFromProto ...

type ProposalVoteConnection

type ProposalVoteConnection struct {
	// The proposal votes in this connection
	Edges []*ProposalVoteEdge `json:"edges"`
	// The pagination information
	PageInfo *v2.PageInfo `json:"pageInfo"`
}

Connection type for retrieving cursor-based paginated proposal vote information

type ProposalVoteEdge

type ProposalVoteEdge struct {
	// The proposal vote
	Node *ProposalVote `json:"node"`
	// The cursor for this proposal vote
	Cursor *string `json:"cursor"`
}

Edge type containing the proposal vote and cursor information returned by a ProposalVoteConnection

type ProposalVoteSide

type ProposalVoteSide struct {
	// All votes cast for this side
	Votes []*vega.Vote `json:"votes"`
	// Total number of votes cast for this side
	TotalNumber string `json:"totalNumber"`
	// Total weight of governance token from the votes cast for this side
	TotalWeight string `json:"totalWeight"`
	// Total number of governance tokens from the votes cast for this side
	TotalTokens string `json:"totalTokens"`
	// Total equity like share weight for this side (only for UpdateMarket Proposals)
	TotalEquityLikeShareWeight string `json:"totalEquityLikeShareWeight"`
}

type ProposalVotes

type ProposalVotes struct {
	// Yes votes cast for this proposal
	Yes *ProposalVoteSide `json:"yes"`
	// No votes cast for this proposal
	No *ProposalVoteSide `json:"no"`
}

type QueryResolver

type QueryResolver interface {
	Asset(ctx context.Context, id string) (*vega.Asset, error)
	Assets(ctx context.Context) ([]*vega.Asset, error)
	AssetsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.AssetsConnection, error)
	Deposit(ctx context.Context, id string) (*vega.Deposit, error)
	Epoch(ctx context.Context, id *string) (*vega.Epoch, error)
	Erc20ListAssetBundle(ctx context.Context, assetID string) (*Erc20ListAssetBundle, error)
	Erc20MultiSigSignerAddedBundles(ctx context.Context, nodeID string, submitter *string, epochSeq *string, pagination *v2.Pagination) (*ERC20MultiSigSignerAddedConnection, error)
	Erc20MultiSigSignerRemovedBundles(ctx context.Context, nodeID string, submitter *string, epochSeq *string, pagination *v2.Pagination) (*ERC20MultiSigSignerRemovedConnection, error)
	Erc20SetAssetLimitsBundle(ctx context.Context, proposalID string) (*ERC20SetAssetLimitsBundle, error)
	Erc20WithdrawalApproval(ctx context.Context, withdrawalID string) (*Erc20WithdrawalApproval, error)
	EstimateOrder(ctx context.Context, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *string, typeArg vega.Order_Type) (*OrderEstimate, error)
	EthereumKeyRotations(ctx context.Context, nodeID *string) (*v2.EthereumKeyRotationsConnection, error)
	GetMarketDataHistoryByID(ctx context.Context, id string, start *int, end *int, skip *int, first *int, last *int) ([]*vega.MarketData, error)
	GetMarketDataHistoryConnectionByID(ctx context.Context, id string, start *int, end *int, pagination *v2.Pagination) (*v2.MarketDataConnection, error)
	HistoricBalances(ctx context.Context, filter *v2.AccountFilter, groupBy []*v2.AccountField, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.AggregatedBalanceConnection, error)
	KeyRotations(ctx context.Context, id *string) ([]*v1.KeyRotation, error)
	KeyRotationsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.KeyRotationConnection, error)
	LastBlockHeight(ctx context.Context) (string, error)
	Market(ctx context.Context, id string) (*vega.Market, error)
	Markets(ctx context.Context, id *string) ([]*vega.Market, error)
	MarketsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.MarketConnection, error)
	NetworkLimits(ctx context.Context) (*vega.NetworkLimits, error)
	NetworkParameter(ctx context.Context, key string) (*vega.NetworkParameter, error)
	NetworkParameters(ctx context.Context) ([]*vega.NetworkParameter, error)
	NetworkParametersConnection(ctx context.Context, pagination *v2.Pagination) (*v2.NetworkParameterConnection, error)
	NetworkParametersProposals(ctx context.Context, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	NewAssetProposals(ctx context.Context, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	NewFreeformProposals(ctx context.Context, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	NewMarketProposals(ctx context.Context, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	Node(ctx context.Context, id string) (*vega.Node, error)
	NodeData(ctx context.Context) (*vega.NodeData, error)
	Nodes(ctx context.Context) ([]*vega.Node, error)
	NodesConnection(ctx context.Context, pagination *v2.Pagination) (*v2.NodesConnection, error)
	NodeSignatures(ctx context.Context, resourceID string) ([]*v11.NodeSignature, error)
	NodeSignaturesConnection(ctx context.Context, resourceID string, pagination *v2.Pagination) (*v2.NodeSignaturesConnection, error)
	OracleData(ctx context.Context, pagination *OffsetPagination) ([]*v12.OracleData, error)
	OracleDataBySpec(ctx context.Context, oracleSpecID string, pagination *OffsetPagination) ([]*v12.OracleData, error)
	OracleDataBySpecConnection(ctx context.Context, oracleSpecID string, pagination *v2.Pagination) (*v2.OracleDataConnection, error)
	OracleDataConnection(ctx context.Context, pagination *v2.Pagination) (*v2.OracleDataConnection, error)
	OracleSpec(ctx context.Context, oracleSpecID string) (*v12.OracleSpec, error)
	OracleSpecs(ctx context.Context, pagination *OffsetPagination) ([]*v12.OracleSpec, error)
	OracleSpecsConnection(ctx context.Context, pagination *v2.Pagination) (*v2.OracleSpecsConnection, error)
	OrderByID(ctx context.Context, id string, version *int) (*vega.Order, error)
	OrderByReference(ctx context.Context, reference string) (*vega.Order, error)
	OrderVersions(ctx context.Context, orderID string, skip *int, first *int, last *int) ([]*vega.Order, error)
	OrderVersionsConnection(ctx context.Context, orderID *string, pagination *v2.Pagination) (*v2.OrderConnection, error)
	Parties(ctx context.Context, id *string) ([]*vega.Party, error)
	PartiesConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.PartyConnection, error)
	Party(ctx context.Context, id string) (*vega.Party, error)
	Proposal(ctx context.Context, id *string, reference *string) (*vega.GovernanceData, error)
	Proposals(ctx context.Context, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	ProposalsConnection(ctx context.Context, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) (*v2.GovernanceDataConnection, error)
	UpdateMarketProposals(ctx context.Context, marketID *string, inState *vega.Proposal_State) ([]*vega.GovernanceData, error)
	Statistics(ctx context.Context) (*v14.Statistics, error)
	Transfers(ctx context.Context, pubkey string, isFrom *bool, isTo *bool) ([]*v1.Transfer, error)
	TransfersConnection(ctx context.Context, partyID *string, direction *TransferDirection, pagination *v2.Pagination) (*v2.TransferConnection, error)
	Withdrawal(ctx context.Context, id string) (*vega.Withdrawal, error)
}

type RankingScoreResolver

type RankingScoreResolver interface {
	VotingPower(ctx context.Context, obj *vega.RankingScore) (string, error)
}

type RecurringTransferResolver

type RecurringTransferResolver interface {
	StartEpoch(ctx context.Context, obj *v1.RecurringTransfer) (int, error)
	EndEpoch(ctx context.Context, obj *v1.RecurringTransfer) (*int, error)

	DispatchStrategy(ctx context.Context, obj *v1.RecurringTransfer) (*DispatchStrategy, error)
}

type ResolverRoot

type ResolverRoot interface {
	Account() AccountResolver
	AccountDetails() AccountDetailsResolver
	AccountEdge() AccountEdgeResolver
	AccountUpdate() AccountUpdateResolver
	Asset() AssetResolver
	AuctionEvent() AuctionEventResolver
	Candle() CandleResolver
	Delegation() DelegationResolver
	Deposit() DepositResolver
	Epoch() EpochResolver
	EpochTimestamps() EpochTimestampsResolver
	EthereumKeyRotation() EthereumKeyRotationResolver
	Future() FutureResolver
	FutureProduct() FutureProductResolver
	Instrument() InstrumentResolver
	InstrumentConfiguration() InstrumentConfigurationResolver
	KeyRotation() KeyRotationResolver
	LiquidityOrderReference() LiquidityOrderReferenceResolver
	LiquidityProvision() LiquidityProvisionResolver
	LiquidityProvisionUpdate() LiquidityProvisionUpdateResolver
	MarginLevels() MarginLevelsResolver
	MarginLevelsUpdate() MarginLevelsUpdateResolver
	Market() MarketResolver
	MarketData() MarketDataResolver
	MarketDepth() MarketDepthResolver
	MarketDepthUpdate() MarketDepthUpdateResolver
	MarketTimestamps() MarketTimestampsResolver
	NewAsset() NewAssetResolver
	NewFreeform() NewFreeformResolver
	NewMarket() NewMarketResolver
	Node() NodeResolver
	NodeData() NodeDataResolver
	NodeSignature() NodeSignatureResolver
	ObservableMarketData() ObservableMarketDataResolver
	ObservableMarketDepth() ObservableMarketDepthResolver
	ObservableMarketDepthUpdate() ObservableMarketDepthUpdateResolver
	OneOffTransfer() OneOffTransferResolver
	OracleData() OracleDataResolver
	OracleSpec() OracleSpecResolver
	Order() OrderResolver
	OrderUpdate() OrderUpdateResolver
	Party() PartyResolver
	PartyStake() PartyStakeResolver
	Position() PositionResolver
	PositionUpdate() PositionUpdateResolver
	PriceLevel() PriceLevelResolver
	Proposal() ProposalResolver
	ProposalTerms() ProposalTermsResolver
	Query() QueryResolver
	RankingScore() RankingScoreResolver
	RecurringTransfer() RecurringTransferResolver
	Reward() RewardResolver
	RewardPerAssetDetail() RewardPerAssetDetailResolver
	RewardSummary() RewardSummaryResolver
	StakeLinking() StakeLinkingResolver
	Statistics() StatisticsResolver
	Subscription() SubscriptionResolver
	TradableInstrument() TradableInstrumentResolver
	Trade() TradeResolver
	TradeUpdate() TradeUpdateResolver
	Transfer() TransferResolver
	UpdateAsset() UpdateAssetResolver
	UpdateMarket() UpdateMarketResolver
	UpdateMarketConfiguration() UpdateMarketConfigurationResolver
	UpdateNetworkParameter() UpdateNetworkParameterResolver
	Vote() VoteResolver
	Withdrawal() WithdrawalResolver
	DateRange() DateRangeResolver
}

type RewardPerAssetDetailResolver

type RewardPerAssetDetailResolver interface {
	Asset(ctx context.Context, obj *vega.RewardSummary) (*vega.Asset, error)

	Rewards(ctx context.Context, obj *vega.RewardSummary) ([]*vega.Reward, error)
	TotalAmount(ctx context.Context, obj *vega.RewardSummary) (string, error)
}

type RewardResolver

type RewardResolver interface {
	Asset(ctx context.Context, obj *vega.Reward) (*vega.Asset, error)

	RewardType(ctx context.Context, obj *vega.Reward) (vega.AccountType, error)
	Party(ctx context.Context, obj *vega.Reward) (*vega.Party, error)
	Epoch(ctx context.Context, obj *vega.Reward) (*vega.Epoch, error)

	ReceivedAt(ctx context.Context, obj *vega.Reward) (string, error)
}

type RewardSummaryConnection

type RewardSummaryConnection struct {
	// List of reward summaries available for the connection
	Edges []*RewardSummaryEdge `json:"edges"`
	// Page information for the connection
	PageInfo *v2.PageInfo `json:"pageInfo"`
}

Connection type for retrieving cursor-based paginated reward summary information

type RewardSummaryEdge

type RewardSummaryEdge struct {
	// The reward summary
	Node *vega.RewardSummary `json:"node"`
	// Cursor identifying the reward summary
	Cursor string `json:"cursor"`
}

Edge type containing the reward summary and cursor information returned by a RewardSummaryConnection

type RewardSummaryResolver

type RewardSummaryResolver interface {
	Asset(ctx context.Context, obj *vega.RewardSummary) (*vega.Asset, error)

	Rewards(ctx context.Context, obj *vega.RewardSummary, skip *int, first *int, last *int) ([]*vega.Reward, error)
	RewardsConnection(ctx context.Context, obj *vega.RewardSummary, assetID *string, pagination *v2.Pagination) (*v2.RewardsConnection, error)
}

type RiskModel

type RiskModel interface {
	IsRiskModel()
}

type SettleDistressed

type SettleDistressed struct {
	// The market in which a position was closed out
	MarketID string `json:"marketId"`
	// The party that was closed out
	PartyID string `json:"partyId"`
	// The margin taken from distressed party
	Margin string `json:"margin"`
	// The price at which the position was closed out
	Price string `json:"price"`
}

func (SettleDistressed) IsEvent

func (SettleDistressed) IsEvent()

type SettlePosition

type SettlePosition struct {
	// The market in which a position was settled
	MarketID string `json:"marketId"`
	// The party who settled a position
	PartyID string `json:"partyId"`
	// The settle price
	Price string `json:"price"`
	// The trades that were settled to close the overall position
	TradeSettlements []*TradeSettlement `json:"tradeSettlements"`
}

func (SettlePosition) IsEvent

func (SettlePosition) IsEvent()

type StakeLinkingResolver

type StakeLinkingResolver interface {
	Timestamp(ctx context.Context, obj *v1.StakeLinking) (string, error)
	Party(ctx context.Context, obj *v1.StakeLinking) (*vega.Party, error)

	FinalizedAt(ctx context.Context, obj *v1.StakeLinking) (*string, error)
}

type StakingSummary

type StakingSummary struct {
	// The stake currently available for the party
	CurrentStakeAvailable string `json:"currentStakeAvailable"`
	// The list of all stake link/unlink for the party
	Linkings *v2.StakesConnection `json:"linkings"`
}

All staking information related to a Party. Contains the current recognised balance by the network and all the StakeLink/Unlink seen by the network

type StatisticsResolver

type StatisticsResolver interface {
	BlockHeight(ctx context.Context, obj *v14.Statistics) (string, error)

	BacklogLength(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalPeers(ctx context.Context, obj *v14.Statistics) (string, error)

	Status(ctx context.Context, obj *v14.Statistics) (string, error)
	TxPerBlock(ctx context.Context, obj *v14.Statistics) (string, error)
	AverageTxBytes(ctx context.Context, obj *v14.Statistics) (string, error)
	AverageOrdersPerBlock(ctx context.Context, obj *v14.Statistics) (string, error)
	TradesPerSecond(ctx context.Context, obj *v14.Statistics) (string, error)
	OrdersPerSecond(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalMarkets(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalAmendOrder(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalCancelOrder(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalCreateOrder(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalOrders(ctx context.Context, obj *v14.Statistics) (string, error)
	TotalTrades(ctx context.Context, obj *v14.Statistics) (string, error)

	BlockDuration(ctx context.Context, obj *v14.Statistics) (string, error)
}

type SubscriptionResolver

type SubscriptionResolver interface {
	Accounts(ctx context.Context, marketID *string, partyID *string, assetID *string, typeArg *vega.AccountType) (<-chan []*vega.Account, error)
	BusEvents(ctx context.Context, types []BusEventType, marketID *string, partyID *string, batchSize int) (<-chan []*BusEvent, error)
	Candles(ctx context.Context, marketID string, interval vega.Interval) (<-chan *v2.Candle, error)
	Delegations(ctx context.Context, partyID *string, nodeID *string) (<-chan *vega.Delegation, error)
	LiquidityProvisions(ctx context.Context, partyID *string, marketID *string) (<-chan []*vega.LiquidityProvision, error)
	Margins(ctx context.Context, partyID string, marketID *string) (<-chan *vega.MarginLevels, error)
	MarketsData(ctx context.Context, marketIds []string) (<-chan []*vega.MarketData, error)
	MarketsDepth(ctx context.Context, marketIds []string) (<-chan []*vega.MarketDepth, error)
	MarketsDepthUpdate(ctx context.Context, marketIds []string) (<-chan []*vega.MarketDepthUpdate, error)
	Orders(ctx context.Context, marketID *string, partyID *string) (<-chan []*vega.Order, error)
	Positions(ctx context.Context, partyID *string, marketID *string) (<-chan []*vega.Position, error)
	Proposals(ctx context.Context, partyID *string) (<-chan *vega.GovernanceData, error)
	Rewards(ctx context.Context, assetID *string, partyID *string) (<-chan *vega.Reward, error)
	Trades(ctx context.Context, marketID *string, partyID *string) (<-chan []*vega.Trade, error)
	Votes(ctx context.Context, proposalID *string, partyID *string) (<-chan *ProposalVote, error)
}

type TargetStakeParameters

type TargetStakeParameters struct {
	// Specifies length of time window expressed in seconds for target stake calculation
	TimeWindow int `json:"timeWindow"`
	// Specifies scaling factors used in target stake calculation
	ScalingFactor float64 `json:"scalingFactor"`
}

TargetStakeParameters contains parameters used in target stake calculation

type TimeUpdate

type TimeUpdate struct {
	// RFC3339Nano time of new block time
	Timestamp string `json:"timestamp"`
}

func (TimeUpdate) IsEvent

func (TimeUpdate) IsEvent()

type TradableInstrumentResolver

type TradableInstrumentResolver interface {
	RiskModel(ctx context.Context, obj *vega.TradableInstrument) (RiskModel, error)
}

type TradeFee

type TradeFee struct {
	// The maker fee, paid by the aggressive party to the other party (the one who had an order in the book)
	MakerFee string `json:"makerFee"`
	// The infrastructure fee, a fee paid to the validators to maintain the Vega network
	InfrastructureFee string `json:"infrastructureFee"`
	// The fee paid to the liquidity providers that committed liquidity to the market
	LiquidityFee string `json:"liquidityFee"`
}

The fee paid by the party when a trade occurs

type TradeResolver

type TradeResolver interface {
	Market(ctx context.Context, obj *vega.Trade) (*vega.Market, error)

	Buyer(ctx context.Context, obj *vega.Trade) (*vega.Party, error)
	Seller(ctx context.Context, obj *vega.Trade) (*vega.Party, error)

	Size(ctx context.Context, obj *vega.Trade) (string, error)
	CreatedAt(ctx context.Context, obj *vega.Trade) (string, error)

	BuyerFee(ctx context.Context, obj *vega.Trade) (*TradeFee, error)
	SellerFee(ctx context.Context, obj *vega.Trade) (*TradeFee, error)
	BuyerAuctionBatch(ctx context.Context, obj *vega.Trade) (*int, error)
	SellerAuctionBatch(ctx context.Context, obj *vega.Trade) (*int, error)
}

type TradeSettlement

type TradeSettlement struct {
	// The size of the trade
	Size int `json:"size"`
	// The price of the trade
	Price string `json:"price"`
}

type TradeUpdateResolver added in v0.55.0

type TradeUpdateResolver interface {
	BuyerID(ctx context.Context, obj *vega.Trade) (string, error)
	SellerID(ctx context.Context, obj *vega.Trade) (string, error)

	Size(ctx context.Context, obj *vega.Trade) (string, error)
	CreatedAt(ctx context.Context, obj *vega.Trade) (string, error)

	BuyerFee(ctx context.Context, obj *vega.Trade) (*TradeFee, error)
	SellerFee(ctx context.Context, obj *vega.Trade) (*TradeFee, error)
	BuyerAuctionBatch(ctx context.Context, obj *vega.Trade) (*int, error)
	SellerAuctionBatch(ctx context.Context, obj *vega.Trade) (*int, error)
}

type TradingDataServiceClient

type TradingDataServiceClient interface {
	protoapi.TradingDataServiceClient
}

TradingDataServiceClient ...

type TradingDataServiceClientV2

type TradingDataServiceClientV2 interface {
	v2.TradingDataServiceClient
}

type TransactionSubmitted

type TransactionSubmitted struct {
	Success bool `json:"success"`
}

type TransferBalance

type TransferBalance struct {
	// Account involved in transfer
	Account *vega.AccountDetails `json:"account"`
	// The new balance of the account
	Balance string `json:"balance"`
}

type TransferDirection

type TransferDirection string

Filter type for specifying the types of transfers to filter for

const (
	TransferDirectionTo       TransferDirection = "To"
	TransferDirectionFrom     TransferDirection = "From"
	TransferDirectionToOrFrom TransferDirection = "ToOrFrom"
)

func (TransferDirection) IsValid

func (e TransferDirection) IsValid() bool

func (TransferDirection) MarshalGQL

func (e TransferDirection) MarshalGQL(w io.Writer)

func (TransferDirection) String

func (e TransferDirection) String() string

func (*TransferDirection) UnmarshalGQL

func (e *TransferDirection) UnmarshalGQL(v interface{}) error

type TransferKind

type TransferKind interface {
	IsTransferKind()
}

type TransferResolver

type TransferResolver interface {
	Asset(ctx context.Context, obj *v1.Transfer) (*vega.Asset, error)

	Timestamp(ctx context.Context, obj *v1.Transfer) (string, error)
	Kind(ctx context.Context, obj *v1.Transfer) (TransferKind, error)
}

type TransferResponse

type TransferResponse struct {
	// The ledger entries and balances resulting from a transfer request
	Transfers []*LedgerEntry `json:"transfers"`
	// The balances of accounts involved in the transfer
	Balances []*TransferBalance `json:"balances"`
}

type TransferResponses

type TransferResponses struct {
	// A group of transfer responses - events from core
	Responses []*TransferResponse `json:"responses"`
}

func (TransferResponses) IsEvent

func (TransferResponses) IsEvent()

type UpdateAssetResolver

type UpdateAssetResolver interface {
	Quantum(ctx context.Context, obj *vega.UpdateAsset) (string, error)
	Source(ctx context.Context, obj *vega.UpdateAsset) (UpdateAssetSource, error)
}

type UpdateAssetSource

type UpdateAssetSource interface {
	IsUpdateAssetSource()
}

One of the possible asset sources for update assets proposals

func UpdateAssetSourceFromProto

func UpdateAssetSourceFromProto(pdetails *types.AssetDetailsUpdate) (UpdateAssetSource, error)

type UpdateErc20

type UpdateErc20 struct {
	// The lifetime limits deposit per address
	// Note: this is a temporary measure for alpha mainnet
	LifetimeLimit string `json:"lifetimeLimit"`
	// The maximum allowed per withdrawal
	// Note: this is a temporary measure for alpha mainnet
	WithdrawThreshold string `json:"withdrawThreshold"`
}

An asset originated from an Ethereum ERC20 Token

func UpdateERC20FromProto

func UpdateERC20FromProto(ea *types.ERC20Update) *UpdateErc20

func (UpdateErc20) IsUpdateAssetSource

func (UpdateErc20) IsUpdateAssetSource()

type UpdateInstrumentConfiguration

type UpdateInstrumentConfiguration struct {
	Code    string                    `json:"code"`
	Product *vega.UpdateFutureProduct `json:"product"`
}

type UpdateMarketConfigurationResolver

type UpdateMarketConfigurationResolver interface {
	Instrument(ctx context.Context, obj *vega.UpdateMarketConfiguration) (*UpdateInstrumentConfiguration, error)

	PriceMonitoringParameters(ctx context.Context, obj *vega.UpdateMarketConfiguration) (*PriceMonitoringParameters, error)
	LiquidityMonitoringParameters(ctx context.Context, obj *vega.UpdateMarketConfiguration) (*LiquidityMonitoringParameters, error)
	RiskParameters(ctx context.Context, obj *vega.UpdateMarketConfiguration) (UpdateMarketRiskParameters, error)
}

type UpdateMarketResolver

type UpdateMarketResolver interface {
	UpdateMarketConfiguration(ctx context.Context, obj *vega.UpdateMarket) (*vega.UpdateMarketConfiguration, error)
}

type UpdateMarketRiskParameters

type UpdateMarketRiskParameters interface {
	IsUpdateMarketRiskParameters()
}

type UpdateNetworkParameterResolver

type UpdateNetworkParameterResolver interface {
	NetworkParameter(ctx context.Context, obj *vega.UpdateNetworkParameter) (*vega.NetworkParameter, error)
}

type VegaResolverRoot

type VegaResolverRoot struct {
	gateway.Config
	// contains filtered or unexported fields
}

VegaResolverRoot is the root resolver for all graphql types.

func NewResolverRoot

func NewResolverRoot(
	log *logging.Logger,
	config gateway.Config,
	tradingClient CoreProxyServiceClient,
	tradingDataClient TradingDataServiceClient,
	tradingDataClientV2 TradingDataServiceClientV2,
) *VegaResolverRoot

NewResolverRoot instantiate a graphql root resolver.

func (*VegaResolverRoot) Account

func (r *VegaResolverRoot) Account() AccountResolver

Account returns the accounts resolver.

func (*VegaResolverRoot) AccountDetails added in v0.56.0

func (r *VegaResolverRoot) AccountDetails() AccountDetailsResolver

Account returns the accounts resolver.

func (*VegaResolverRoot) AccountEdge

func (r *VegaResolverRoot) AccountEdge() AccountEdgeResolver

func (*VegaResolverRoot) AccountUpdate added in v0.55.0

func (r *VegaResolverRoot) AccountUpdate() AccountUpdateResolver

func (*VegaResolverRoot) Asset

func (r *VegaResolverRoot) Asset() AssetResolver

Asset ...

func (*VegaResolverRoot) AuctionEvent

func (r *VegaResolverRoot) AuctionEvent() AuctionEventResolver

func (*VegaResolverRoot) Candle

func (r *VegaResolverRoot) Candle() CandleResolver

Candle returns the candles resolver.

func (*VegaResolverRoot) DateRange added in v0.55.0

func (r *VegaResolverRoot) DateRange() DateRangeResolver

func (*VegaResolverRoot) Delegation

func (r *VegaResolverRoot) Delegation() DelegationResolver

func (*VegaResolverRoot) Deposit

func (r *VegaResolverRoot) Deposit() DepositResolver

Deposit ...

func (*VegaResolverRoot) Epoch

func (r *VegaResolverRoot) Epoch() EpochResolver

func (*VegaResolverRoot) EpochTimestamps

func (r *VegaResolverRoot) EpochTimestamps() EpochTimestampsResolver

func (*VegaResolverRoot) EthereumKeyRotation

func (r *VegaResolverRoot) EthereumKeyRotation() EthereumKeyRotationResolver

func (*VegaResolverRoot) Future

func (r *VegaResolverRoot) Future() FutureResolver

func (*VegaResolverRoot) FutureProduct

func (r *VegaResolverRoot) FutureProduct() FutureProductResolver

func (*VegaResolverRoot) Instrument

func (r *VegaResolverRoot) Instrument() InstrumentResolver

func (*VegaResolverRoot) InstrumentConfiguration

func (r *VegaResolverRoot) InstrumentConfiguration() InstrumentConfigurationResolver

func (*VegaResolverRoot) KeyRotation

func (r *VegaResolverRoot) KeyRotation() KeyRotationResolver

func (*VegaResolverRoot) LiquidityOrderReference

func (r *VegaResolverRoot) LiquidityOrderReference() LiquidityOrderReferenceResolver

func (*VegaResolverRoot) LiquidityProvision

func (r *VegaResolverRoot) LiquidityProvision() LiquidityProvisionResolver

func (*VegaResolverRoot) LiquidityProvisionUpdate added in v0.55.0

func (r *VegaResolverRoot) LiquidityProvisionUpdate() LiquidityProvisionUpdateResolver

func (*VegaResolverRoot) MarginLevels

func (r *VegaResolverRoot) MarginLevels() MarginLevelsResolver

MarginLevels returns the market levels resolver.

func (*VegaResolverRoot) MarginLevelsUpdate added in v0.55.0

func (r *VegaResolverRoot) MarginLevelsUpdate() MarginLevelsUpdateResolver

MarginLevelsUpdate returns the market levels resolver.

func (*VegaResolverRoot) Market

func (r *VegaResolverRoot) Market() MarketResolver

Market returns the markets resolver.

func (*VegaResolverRoot) MarketData

func (r *VegaResolverRoot) MarketData() MarketDataResolver

MarketData returns the market data resolver.

func (*VegaResolverRoot) MarketDepth

func (r *VegaResolverRoot) MarketDepth() MarketDepthResolver

MarketDepth returns the market depth resolver.

func (*VegaResolverRoot) MarketDepthUpdate

func (r *VegaResolverRoot) MarketDepthUpdate() MarketDepthUpdateResolver

MarketDepthUpdate returns the market depth update resolver.

func (*VegaResolverRoot) MarketTimestamps

func (r *VegaResolverRoot) MarketTimestamps() MarketTimestampsResolver

func (*VegaResolverRoot) NewAsset

func (r *VegaResolverRoot) NewAsset() NewAssetResolver

func (*VegaResolverRoot) NewFreeform

func (r *VegaResolverRoot) NewFreeform() NewFreeformResolver

func (*VegaResolverRoot) NewMarket

func (r *VegaResolverRoot) NewMarket() NewMarketResolver

func (*VegaResolverRoot) Node

func (r *VegaResolverRoot) Node() NodeResolver

func (*VegaResolverRoot) NodeData

func (r *VegaResolverRoot) NodeData() NodeDataResolver

func (*VegaResolverRoot) NodeSignature

func (r *VegaResolverRoot) NodeSignature() NodeSignatureResolver

NodeSignature ...

func (*VegaResolverRoot) ObservableMarketData

func (r *VegaResolverRoot) ObservableMarketData() ObservableMarketDataResolver

func (*VegaResolverRoot) ObservableMarketDepth

func (r *VegaResolverRoot) ObservableMarketDepth() ObservableMarketDepthResolver

func (*VegaResolverRoot) ObservableMarketDepthUpdate

func (r *VegaResolverRoot) ObservableMarketDepthUpdate() ObservableMarketDepthUpdateResolver

func (*VegaResolverRoot) OneOffTransfer

func (r *VegaResolverRoot) OneOffTransfer() OneOffTransferResolver

func (*VegaResolverRoot) OracleData

func (r *VegaResolverRoot) OracleData() OracleDataResolver

func (*VegaResolverRoot) OracleSpec

func (r *VegaResolverRoot) OracleSpec() OracleSpecResolver

func (*VegaResolverRoot) Order

func (r *VegaResolverRoot) Order() OrderResolver

Order returns the order resolver.

func (*VegaResolverRoot) OrderUpdate added in v0.55.0

func (r *VegaResolverRoot) OrderUpdate() OrderUpdateResolver

OrderUpdate returns the order resolver.

func (*VegaResolverRoot) Party

func (r *VegaResolverRoot) Party() PartyResolver

Party returns the parties resolver.

func (*VegaResolverRoot) PartyStake

func (r *VegaResolverRoot) PartyStake() PartyStakeResolver

func (*VegaResolverRoot) Position

func (r *VegaResolverRoot) Position() PositionResolver

Position returns the positions resolver.

func (*VegaResolverRoot) PositionUpdate added in v0.56.0

func (r *VegaResolverRoot) PositionUpdate() PositionUpdateResolver

PositionUpdate returns the positionUpdate resolver.

func (*VegaResolverRoot) PriceLevel

func (r *VegaResolverRoot) PriceLevel() PriceLevelResolver

PriceLevel returns the price levels resolver.

func (*VegaResolverRoot) Proposal

func (r *VegaResolverRoot) Proposal() ProposalResolver

Proposal returns the proposal resolver.

func (*VegaResolverRoot) ProposalTerms

func (r *VegaResolverRoot) ProposalTerms() ProposalTermsResolver

func (*VegaResolverRoot) Query

func (r *VegaResolverRoot) Query() QueryResolver

Query returns the query resolver.

func (*VegaResolverRoot) RankingScore

func (r *VegaResolverRoot) RankingScore() RankingScoreResolver

func (*VegaResolverRoot) RecurringTransfer

func (r *VegaResolverRoot) RecurringTransfer() RecurringTransferResolver

func (*VegaResolverRoot) Reward

func (r *VegaResolverRoot) Reward() RewardResolver

func (*VegaResolverRoot) RewardPerAssetDetail

func (r *VegaResolverRoot) RewardPerAssetDetail() RewardPerAssetDetailResolver

TODO: RewardPerAssetDetail is deprecated, remove once front end has caught up.

func (*VegaResolverRoot) RewardSummary

func (r *VegaResolverRoot) RewardSummary() RewardSummaryResolver

func (*VegaResolverRoot) StakeLinking

func (r *VegaResolverRoot) StakeLinking() StakeLinkingResolver

func (*VegaResolverRoot) Statistics

func (r *VegaResolverRoot) Statistics() StatisticsResolver

func (*VegaResolverRoot) Subscription

func (r *VegaResolverRoot) Subscription() SubscriptionResolver

Subscription returns the subscriptions resolver.

func (*VegaResolverRoot) TradableInstrument

func (r *VegaResolverRoot) TradableInstrument() TradableInstrumentResolver

func (*VegaResolverRoot) Trade

func (r *VegaResolverRoot) Trade() TradeResolver

Trade returns the trades resolver.

func (*VegaResolverRoot) TradeUpdate added in v0.55.0

func (r *VegaResolverRoot) TradeUpdate() TradeUpdateResolver

func (*VegaResolverRoot) Transfer

func (r *VegaResolverRoot) Transfer() TransferResolver

func (*VegaResolverRoot) UpdateAsset

func (r *VegaResolverRoot) UpdateAsset() UpdateAssetResolver

func (*VegaResolverRoot) UpdateMarket

func (r *VegaResolverRoot) UpdateMarket() UpdateMarketResolver

func (*VegaResolverRoot) UpdateMarketConfiguration

func (r *VegaResolverRoot) UpdateMarketConfiguration() UpdateMarketConfigurationResolver

func (*VegaResolverRoot) UpdateNetworkParameter

func (r *VegaResolverRoot) UpdateNetworkParameter() UpdateNetworkParameterResolver

func (*VegaResolverRoot) Vote

func (r *VegaResolverRoot) Vote() VoteResolver

func (*VegaResolverRoot) Withdrawal

func (r *VegaResolverRoot) Withdrawal() WithdrawalResolver

Withdrawal ...

type VoteResolver

type VoteResolver interface {
	Party(ctx context.Context, obj *vega.Vote) (*vega.Party, error)
	Datetime(ctx context.Context, obj *vega.Vote) (string, error)

	GovernanceTokenBalance(ctx context.Context, obj *vega.Vote) (string, error)
	GovernanceTokenWeight(ctx context.Context, obj *vega.Vote) (string, error)
	EquityLikeShareWeight(ctx context.Context, obj *vega.Vote) (string, error)
}

type WithdrawalDetails

type WithdrawalDetails interface {
	IsWithdrawalDetails()
}

type WithdrawalResolver

type WithdrawalResolver interface {
	Party(ctx context.Context, obj *vega.Withdrawal) (*vega.Party, error)

	Asset(ctx context.Context, obj *vega.Withdrawal) (*vega.Asset, error)

	Expiry(ctx context.Context, obj *vega.Withdrawal) (string, error)
	CreatedTimestamp(ctx context.Context, obj *vega.Withdrawal) (string, error)
	WithdrawnTimestamp(ctx context.Context, obj *vega.Withdrawal) (*string, error)
	TxHash(ctx context.Context, obj *vega.Withdrawal) (*string, error)
	Details(ctx context.Context, obj *vega.Withdrawal) (WithdrawalDetails, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL