package
0.79.0-preview.4
Repository: https://github.com/vegaprotocol/vega.git
Documentation: pkg.go.dev
# 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
- Add the new type in
schema.graphql
- Add binding between golang model and GraphQL type in
gqlgen.yml
- Generate the GraphQL model and resolver with
make gqlgen
- Create a new golang file
my_type_resolver.go
- Implement the
MyTypeResolver
interface- This interface is located in
generated.go
- This interface is located in
- Add a method
MyType()
on structVegaResolverRoot
inresolvers.go
, as follows :
func (r *VegaResolverRoot) MyType() MyTypeResolver {
return (*myTypeResolver)(r)
}
Add a new query?
- Add a new query in
schema.graphql
in theQuery
type - Generate the GraphQL model and resolver with
make gqlgen
- Add a method
MyType()
on structmyQueryResolver
inresolvers.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
}
# Packages
No description provided by the author
Package mocks is a generated GoMock package.
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
New returns a new instance of the grapqhl server.
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
NewResolverRoot instantiate a graphql root resolver.
No description provided by the author
No description provided by the author
No description provided by the author
ProposalVoteFromProto ...
No description provided by the author
No description provided by the author
# Constants
Collateral has deposited in to this Vega network via the bridge.
Vega Time has changed.
The results from processing at transaction.
Collateral has been withdrawn from this Vega network via the bridge.
Composite price is set to the last trade (legacy).
Composite price is calculated as a median of the underlying price sources.
Composite price is calculated as a weighted average of the underlying price sources.
Describes an active data spec.
Describes a data spec that is not listening to data anymore.
Transfers the specified amount or does not transfer anything.
Transfers the specified amount or the max allowable amount if this is less than the specified amount.
Default value, always invalid.
Resume a suspended market.
Suspend the market.
Terminate the market.
Default value, always invalid.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrAmbiguousTradingMode ...
ErrInvalidChange ...
ErrInvalidProposal is returned when invalid governance data is received by proposal resolver.
ErrInvalidStopOrder is returned when an invalid stop order is received by the stop order resolver.
ErrInvalidVotesSubscription is returned if neither proposal ID nor party ID is specified.
ErrMissingIDOrReference is returned when neither id nor reference has been supplied in the query.
ErrMissingNodeID is returned when no node id has been supplied in the query.
ErrMultipleAssetSourcesSpecified is raised when multiple asset source are specified.
ErrMultipleProposalChangesSpecified is raised when multiple proposal changes are set (non-null) for a singe proposal terms.
ErrNilAssetSource returned when an asset source is not specified at creation.
ErrNilPriceMonitoringParameters ...
ErrNilProduct ...
ErrNilRiskModel ...
ErrNilTradingMode ...
ErrUnimplementedAssetSource returned when an asset source specified at creation is not recognised.
ErrUnimplementedTradingMode ...
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Margins for a hypothetical position not related to any existing party.
An auction duration is used to configure 3 auction periods: 1.
No description provided by the author
A Vega builtin asset, mostly for testing purpose.
No description provided by the author
No description provided by the author
Condition describes the condition that must be validated by the data source engine.
No description provided by the author
A mode where Vega tries to execute orders as soon as they are received.
A data source contains the data sent by a data source.
An data source specification describes the data source data that a product (or a risk model) wants to get from the oracle engine.
No description provided by the author
No description provided by the author
Frequent batch auctions trading mode.
Summary of a node's rewards for a given epoch.
An asset originated from an Ethereum ERC20 Token.
Response for the signature bundle to allowlist an ERC20 token in the collateral bridge.
No description provided by the author
Response for the signature bundle to add a particular validator to the signer list of the multisig contract.
No description provided by the author
Response for the signature bundle to remove a particular validator from the signer list of the multisig contract.
Response for the signature bundle to update the token limits (maxLifetimeDeposit and withdrawThreshold) for a given ERC20 token (already allowlisted) in the collateral bridge.
All the data related to the approval of a withdrawal from the network.
Specific details for an erc20 withdrawal.
No description provided by the author
EthCallTrigger is the type of trigger used to make calls to Ethereum network.
An Ethereum data source.
Trigger for an Ethereum call based on the Ethereum block timestamp.
No description provided by the author
externalDataSourceSpec is the type that wraps the DataSourceSpec type in order to be further used/extended by the OracleSpec.
An estimate of the fee to be paid for the order.
Filter describes the conditions under which oracle data is considered of interest or not.
No description provided by the author
No description provided by the author
GraphServer is the graphql server.
Individual party participating in a game and their metrics.
Configuration of a market liquidity monitoring parameters.
The equity-like share of liquidity fee for each liquidity provider.
The SLA statistics for each liquidity provider.
No description provided by the author
The liquidity commitments for this market.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Details on the collection of nodes for particular validator status.
Normaliser to convert the data returned from the contract method into a standard format.
The equity-like share of liquidity fee for each liquidity provider.
The SLA statistics for each liquidity provider.
No description provided by the author
No description provided by the author
No description provided by the author
An estimate of the fee to be paid by the order.
Response for the estimate of the margin level and, if available, collateral was provided in the request, liquidation price for the specified position.
No description provided by the author
Range of valid prices and the associated price monitoring trigger.
PriceMonitoringParameters holds a list of triggers.
Configuration of a market price monitoring auctions triggers.
PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration.
PropertyKey describes the property key contained in a source data.
No description provided by the author
Connection type for retrieving cursor-based paginated proposal vote information.
Edge type containing the proposal vote and cursor information returned by a ProposalVoteConnection.
No description provided by the author
No description provided by the author
No description provided by the author
Indicator showing whether the data-node is ready for the protocol upgrade to begin.
No description provided by the author
Queries allow a caller to read data and filter data via GraphQL.
No description provided by the author
Connection type for retrieving cursor-based paginated reward summary information.
Edge type containing the reward summary and cursor information returned by a RewardSummaryConnection.
No description provided by the author
No description provided by the author
Signer is the authorized signature used for the data.
Describes which property of the data source data should be used as composite price source.
All staking information related to a Party.
Price at which a stop order will trigger.
Percentage movement in the price at which a stop order will trigger.
Subscriptions allow a caller to receive new information as it is available from the Vega network.
TargetStakeParameters contains parameters used in target stake calculation.
Team participating in a game and their metrics.
Team participation information, i.e.
No description provided by the author
The fee paid by the party when a trade occurs.
No description provided by the author
Filter to apply to the trade connection query.
Filter to apply to the trade subscription request.
No description provided by the author
No description provided by the author
A transfer fee record.
No description provided by the author
No description provided by the author
An asset originated from an Ethereum ERC20 Token.
No description provided by the author
No description provided by the author
No description provided by the author
VegaResolverRoot is the root resolver for all graphql types.
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
One of the possible asset sources.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CoreProxyServiceClient ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Union type for wrapped events in stream PROPOSAL is mapped to governance data, something to keep in mind.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
One of the possible asset sources for update assets proposals.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
Event types.
No description provided by the author
Describes the status of the data spec.
No description provided by the author
No description provided by the author
Filter type for specifying the types of transfers to filter for.