Documentation ¶
Overview ¶
Package node contains functionality for interacting with Vega data nodes.
Index ¶
- type DataNode
- func (n *DataNode) AssetByID(req *dataapipb.AssetByIDRequest) (response *dataapipb.AssetByIDResponse, err error)
- func (n *DataNode) GetAddress() (url.URL, error)
- func (n *DataNode) GetVegaTime() (t time.Time, err error)
- func (n *DataNode) LastBlockData() (*vegaapipb.LastBlockHeightResponse, error)
- func (n *DataNode) MarketDataByID(req *dataapipb.MarketDataByIDRequest) (response *dataapipb.MarketDataByIDResponse, err error)
- func (n *DataNode) Markets(req *dataapipb.MarketsRequest) (response *dataapipb.MarketsResponse, err error)
- func (n *DataNode) ObserveEventBus() (client vegaapipb.CoreService_ObserveEventBusClient, err error)
- func (n *DataNode) PartyAccounts(req *dataapipb.PartyAccountsRequest) (response *dataapipb.PartyAccountsResponse, err error)
- func (n *DataNode) PositionsByParty(req *dataapipb.PositionsByPartyRequest) (response *dataapipb.PositionsByPartyResponse, err error)
- func (n *DataNode) PositionsSubscribe(req *dataapipb.PositionsSubscribeRequest) (client dataapipb.TradingDataService_PositionsSubscribeClient, err error)
- func (n *DataNode) SubmitTransaction(req *vegaapipb.SubmitTransactionRequest) (response *vegaapipb.SubmitTransactionResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) AssetByID ¶ added in v0.41.0
func (n *DataNode) AssetByID(req *dataapipb.AssetByIDRequest) (response *dataapipb.AssetByIDResponse, err error)
AssetByID returns the specified asset.
func (*DataNode) GetAddress ¶ added in v0.41.0
GetAddress gets the address of the node.
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) MarketDataByID ¶ added in v0.41.0
func (n *DataNode) MarketDataByID(req *dataapipb.MarketDataByIDRequest) (response *dataapipb.MarketDataByIDResponse, err error)
MarketDataByID returns market data for the specified market.
func (*DataNode) Markets ¶ added in v0.41.0
func (n *DataNode) Markets(req *dataapipb.MarketsRequest) (response *dataapipb.MarketsResponse, err error)
Markets returns all markets.
func (*DataNode) ObserveEventBus ¶ added in v0.41.0
func (n *DataNode) ObserveEventBus() (client vegaapipb.CoreService_ObserveEventBusClient, err error)
ObserveEventBus opens a stream.
func (*DataNode) PartyAccounts ¶ added in v0.41.0
func (n *DataNode) PartyAccounts(req *dataapipb.PartyAccountsRequest) (response *dataapipb.PartyAccountsResponse, err error)
PartyAccounts returns accounts for the given party.
func (*DataNode) PositionsByParty ¶ added in v0.41.0
func (n *DataNode) PositionsByParty(req *dataapipb.PositionsByPartyRequest) (response *dataapipb.PositionsByPartyResponse, err error)
PositionsByParty returns positions for the given party.
func (*DataNode) PositionsSubscribe ¶ added in v0.41.0
func (n *DataNode) PositionsSubscribe(req *dataapipb.PositionsSubscribeRequest) (client dataapipb.TradingDataService_PositionsSubscribeClient, err error)
PositionsSubscribe opens a stream.
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.