Documentation ¶
Overview ¶
Package node contains functionality for interacting with Vega data nodes.
Index ¶
- Variables
- type DataNode
- func (n *DataNode) CheckConnection() error
- func (n *DataNode) GetAddress() (url.URL, error)
- func (n *DataNode) GetLatestMarketData(req *dataapipbv2.GetLatestMarketDataRequest) (*dataapipbv2.GetLatestMarketDataResponse, error)
- func (n *DataNode) GetVegaTime() (t time.Time, err error)
- func (n *DataNode) LastBlockData() (*vegaapipb.LastBlockHeightResponse, error)
- func (n *DataNode) ListAccounts(req *dataapipbv2.ListAccountsRequest) (*dataapipbv2.ListAccountsResponse, error)
- func (n *DataNode) ListAssets(req *dataapipbv2.ListAssetsRequest) (*dataapipbv2.ListAssetsResponse, error)
- func (n *DataNode) ListMarkets(req *dataapipbv2.ListMarketsRequest) (*dataapipbv2.ListMarketsResponse, error)
- func (n *DataNode) ListPositions(req *dataapipbv2.ListPositionsRequest) (*dataapipbv2.ListPositionsResponse, error)
- func (n *DataNode) ObserveEventBus() (client vegaapipb.CoreService_ObserveEventBusClient, err error)
- func (n *DataNode) ObservePositions(req *dataapipbv2.ObservePositionsRequest) (dataapipbv2.TradingDataService_ObservePositionsClient, error)
- func (n *DataNode) Statistics(*vegaapipb.StatisticsRequest) (*vegaapipb.StatisticsResponse, error)
- func (n *DataNode) SubmitTransaction(req *vegaapipb.SubmitTransactionRequest) (response *vegaapipb.SubmitTransactionResponse, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedCreateTradingServiceClient = fmt.Errorf("failed to create new trading service client") ErrMsgFailedTradingServiceRequest = "failed request to the trading service client %s service: %w" ErrMsgCheckConnection = "failed connecting to the data-base: %w" )
Functions ¶
This section is empty.
Types ¶
type DataNode ¶ added in v0.41.0
type DataNode struct {
// contains filtered or unexported fields
}
DataNode stores state for a Vega Data node.
func NewDataNode ¶ added in v0.41.0
func NewDataNode(addr url.URL, connectTimeout time.Duration, callTimeout time.Duration) (*DataNode, error)
NewDataNode returns a new node.
func (*DataNode) CheckConnection ¶ added in v0.41.13
func (*DataNode) GetAddress ¶ added in v0.41.0
GetAddress gets the address of the node.
func (*DataNode) GetLatestMarketData ¶ added in v0.41.13
func (n *DataNode) GetLatestMarketData(req *dataapipbv2.GetLatestMarketDataRequest) (*dataapipbv2.GetLatestMarketDataResponse, error)
func (*DataNode) GetVegaTime ¶ added in v0.41.0
GetVegaTime gets the latest block header time from the node.
func (*DataNode) LastBlockData ¶ added in v0.41.0
func (n *DataNode) LastBlockData() (*vegaapipb.LastBlockHeightResponse, error)
LastBlockData gets the latest blockchain data, height, hash and pow parameters.
func (*DataNode) ListAccounts ¶ added in v0.41.13
func (n *DataNode) ListAccounts(req *dataapipbv2.ListAccountsRequest) (*dataapipbv2.ListAccountsResponse, error)
func (*DataNode) ListAssets ¶ added in v0.41.13
func (n *DataNode) ListAssets(req *dataapipbv2.ListAssetsRequest) (*dataapipbv2.ListAssetsResponse, error)
func (*DataNode) ListMarkets ¶ added in v0.41.13
func (n *DataNode) ListMarkets(req *dataapipbv2.ListMarketsRequest) (*dataapipbv2.ListMarketsResponse, error)
func (*DataNode) ListPositions ¶ added in v0.41.13
func (n *DataNode) ListPositions(req *dataapipbv2.ListPositionsRequest) (*dataapipbv2.ListPositionsResponse, error)
func (*DataNode) ObserveEventBus ¶ added in v0.41.0
func (n *DataNode) ObserveEventBus() (client vegaapipb.CoreService_ObserveEventBusClient, err error)
ObserveEventBus opens a stream.
func (*DataNode) ObservePositions ¶ added in v0.41.13
func (n *DataNode) ObservePositions(req *dataapipbv2.ObservePositionsRequest) (dataapipbv2.TradingDataService_ObservePositionsClient, error)
func (*DataNode) Statistics ¶ added in v0.41.13
func (n *DataNode) Statistics(*vegaapipb.StatisticsRequest) (*vegaapipb.StatisticsResponse, error)
func (*DataNode) SubmitTransaction ¶ added in v0.41.0
func (n *DataNode) SubmitTransaction(req *vegaapipb.SubmitTransactionRequest) (response *vegaapipb.SubmitTransactionResponse, err error)
SubmitTransaction submits a signed v2 transaction.
Click to show internal directories.
Click to hide internal directories.