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

# README

Conventions Followed in datanode/api Code Implementation

Errors

For all types of errors that are handled in the datanode/api scope, please use errors part of the package. Example:

return nil, apiError(codes.InvalidArgument, ErrMalformedRequest)

The purpose is to have a common way of handling error reporting outside of the core component and keep them clean and simple. Some gradual refactoring work on places where the above is not yet applied is welcomed, though as a friendly and respectful reminder - please consider not breaking the current state.

# Packages

Package mocks is a generated GoMock package.

# Functions

ErrorMap returns a map of error to code, which is a mapping between API errors and Vega API specific numeric codes.
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
NewGRPCServer create a new instance of the GPRC api for the vega node.
No description provided by the author

# Variables

API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
AccountService...
AssetService...
API Errors and descriptions.
Assets...
Blockchain...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
BlockService...
CandleService...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
ErrChannelClosed signals that the channel streaming data is closed.
CheckpointService...
API Errors and descriptions.
CoreSnapshotService...
API Errors and descriptions.
DelegationService...
Delegations...
DepositService...
Deposits...
ErrEmptyMissingMarketID signals to the caller that the request expected a market id but the field is missing or empty.
API Errors and descriptions.
ErrERC20InvalidTokenContractAddress is returned when the ERC20 token contract address is invalid.
ERC20MultiSigSignerEvents...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
EthereumKeyRotationService...
EthereumKeyRotations...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
Network History.
Network History...
Referral Programs.
Volume discount Programs.
ErrGetEpoch is returned when the epoch cannot be retrieved.
Fees stats.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
NetworkLimits...
ErrGetNetworkParameters is returned when the network parameters cannot be retrieved.
API Errors and descriptions.
Rewards.
ErrGetTimeWeightedNotionalPosition is returned when the time weighted notional position cannot be retrieved.
API Errors and descriptions.
API Errors and descriptions.
GovernanceService...
API Errors and descriptions.
API Errors and descriptions.
ErrInvalidAssetID is returned when the Asset ID is not a valid ID.
Amm bounds estimates.
ErrInvalidCandleID signals an invalid candle ID submitted.
ErrInvalidCandleTimestampsRange signals an impossible range with the candle timestamps.
API Errors and descriptions.
ErrInvalidFilter signals that the filter is invalid.
ErrInvalidGameID is returned when the game ID is not a valid ID.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
ErrInvalidMarketID signals to the caller that the request expected a market id but the field is not in the right format.
ErrInvalidOracleSpecID is returned when the ID is not a valid ID.
ErrInvalidOrderID signals that an order ID provided was not a valid ID.
ErrInvalidOrderPrice signals to the caller that the request expected a valid price.
API Errors and descriptions.
ErrInvalidOrderSize signals to the caller that the request expected a valid size.
ErrInvalidPagination signals that the pagination is invalid.
ErrInvalidPartyID signals that the given party id is not a valid ID.
ErrInvalidProposalID returned if proposal id is invalid.
Transfer fee estimates.
API Errors and descriptions.
API Errors and descriptions.
ErrInvalidWithdrawalID is returned when the withdrawal ID is not a valid vega ID.
API Errors and descriptions.
KeyRotationService...
KeyRotations...
ErrLastPaginationNotSupported is returned when last pagination is not supported.
Ledger entries...
API Errors and descriptions.
LedgerService...
Liquidity provision...
LiquidityProvisionService...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
Funding Periods.
API Errors and descriptions.
List Games.
Paid liquidity fees.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
Teams.
API Errors and descriptions.
ErrMalformedRequest signals that the request was malformed.
MarginLevels...
API Errors and descriptions.
MarketService...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
ErrMissingAssetID is returned when the Asset ID is missing from the request.
ErrMissingCandleID returned if candle with this id is missing.
ErrMissingDepositID is returned when the deposit ID is missing from the request.
TxHashes...
ErrMissingMarginFactor is returned when isolated margin mode is specified, but margin factor is not supplied.
ErrMissingNodeID is returned when the node ID is missing from the request.
ErrMissingOracleSpecID is returned when the ID is missing from the request.
ErrMissingOrderID signals that an order ID was required but not specified.
API Errors and descriptions.
ErrMissingPartyID signals that the payload is expected to contain a party id.
ErrMissingPrice signals to the caller that the request expected a price.
ErrMissingProposalID returned if proposal with this id is missing.
ErrMissingProposalIDAndPartyID returned if proposal id and party id is missing.
ErrMissingProposalIDOrPartyID returned if proposal id and party id is missing.
ErrMissingProposalIDOrReference returned if proposal id or reference is missing.
ErrMissingResourceID signals to the caller that the request expected a resource id but the field is missing or empty.
API Errors and descriptions.
ErrMissingWithdrawalID is returned when the withdrawal ID is missing from the request.
MultiSigService...
API Errors and descriptions.
ErrNegativeOrderVersion is returned when a request is made for an order with a negative version.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
NetworkParamaters...
API Errors and descriptions.
API Errors and descriptions.
NodeService...
NotaryService...
ErrNotAValidVegaID signals an invalid id.
ErrNotMapped is when an error cannot be found in the current error map/lookup table.
ErrNoTrustedProxy indactes a forwarded request that did not pass through a trusted proxy.
API Errors and descriptions.
OracleDataService..
ErrOracleServiceSpecID is returned when there was no data found for the given ID.
Oracles...
OracleSpecService..
ErrOracleSpecServiceGetAll is returned when there was no data found for the given ID.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
OrderService...
API Errors and descriptions.
PartyService...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
PositionService...
API Errors and descriptions.
Positions...
API Errors and descriptions.
Proposals...
ProtocolUpgradeProposals...
ProtocolUpgradeService...
API Errors and descriptions.
RiskFactorService...
RiskService...
API Errors and descriptions.
API Errors and descriptions.
ErrServerShutdown signals to the client that the server is shutting down.
Signatures...
StakeLinkingService...
ErrStreamClosed signals to the users that the grpc stream is closing.
ErrStreamInternal signals to the users that the grpc stream has an internal problem.
SummaryService...
TimeService...
API Errors and descriptions.
API Errors and descriptions.
TradeService...
API Errors and descriptions.
API Errors and descriptions.
API Errors and descriptions.
TransferService...
API Errors and descriptions.
Transfers...
Votes...
WithdrawalService...
Withdrawals...
FormatE exports the formatE function (primarily for testing).

# Structs

Config represents the configuration of the api package.
GRPCServer represent the grpc api provided by the vega node.
No description provided by the author

# Interfaces

go:generate go run github.com/golang/mock/mockgen -destination mocks/amm_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api AMMService.
Asset service ..
BlockService ..
CoreServiceClient ..
EpochService go:generate go run github.com/golang/mock/mockgen -destination mocks/epoch_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api EpochService.
EventService ..
MarketDataService ..
MarketsService ..
NetworkHistoryService ..
No description provided by the author
No description provided by the author
RiskFactorService ..
VolumeDiscountService ..

# Type aliases

No description provided by the author