Skip to main content
Version: mainnet (v0.71)

gRPC API overview

gRPC is a low-latency, highly efficient API for interacting with the network and querying for and filtering data.

Core node APIs

Core nodes are responsible for ensuring the consensus rules are met and that a consistent view of the network is seen. They present endpoints that give access to the state of the network (block time, block height etc), allow transactions to be submitted to the network and to subscribe to event streams so that changes of internal state can be seen.

  • Core: Submit transactions to the network and retrieve basic information about the node and network such as the block height, app version, number of peers, etc.
  • Core state: Request information about the present ‘state’ of the Vega node. Importantly, the core node only maintains enough state information such that it can process incoming transactions; it keeps no history beyond what is required for that function. You can request current lists of accounts, parties, proposals etc., which are held in memory by the core node.

Data node API

Data nodes aggregate the outputs from core nodes and produce more meaningful APIs. They are stateful and build up a bigger view of the system from the events emitted from the core nodes. The data nodes give the end user a way to query historic information without the need to be always connected to the network. The data node also builds cumulative data which allows the end user to get a snapshot of the current state of a part of the system.

  • Data: Query the full set of historical data generated by the network (subject to retention policies). Trades, orders, governance, deposits, withdrawals, delegations, and more are all stored by the data node in a PostgreSQL database and queried through this API.