Core APIS are those APIS that can interact with the network, but do not require any extra data processing than that which is required to run the network. Richer, more complete API endpoints live in a separate executable - imaginatively called Data Node. This document covers the functionality that is required to interact with the network via Core APIS.
Core APIS are endpoints in REST and GRPC only. Vega core previously provided GraphQL endpoints, but this is now only served by Data Node.
There is one 'write' endpoint - transaction
, which will accept signed transaction bundles.
To observe the operation, and validate the state of the protocol, we must be able to obtain data provided by the following domains:
- List all governance proposals, regardless of state
- List all proposals, filtered by the party identitifier of the party that created it.
- Retrieve a specified proposal
- List all votes
- List governance stake for a specific party
- List delegations for a specific party
- List all known markets
- Note: This will not include markets that have not passed a governance vote. To query for these, query governance
- Retrieve a specific market by market identifier.
- All parameters for a market, from market definition.
- Retrieve and stream market data (all fields described in 0021-MDATA - market data) for a market
- List all assets
- Note: This will not include assets that have not passed a governance vote. To query for these, query governance
- List all known parties.
- Return number of pegged orders across all the markets.
- List all Network Parameters and their current value
Separate from the state of trading, we need to be able to see that the network is operational.
- Get statistics
- This includes data such as backlog length, che current version of the application
- Get the current block height
- Get the current timestamp, aka Vega Time
On any Vega node, I can:
Requirement | Acceptance Criteria code |
---|---|
List all governance proposals via REST & GRPC | 0020-APIS-001 |
List all governance proposals by a specified party via REST & GRPC | 0020-APIS-002 |
Retrieve a specific governance proposals by id via REST & GRPC | 0020-APIS-003 |
Retrieve a list of votes via REST & GRPC | 0020-APIS-004 |
Retrieve the governance stake for a specified party via REST & GRPC | 0020-APIS-005 |
List all markets via REST & GRPC | 0020-APIS-006 |
Retrieve a specific market via REST & GRPC | 0020-APIS-007 |
Retrieve all assets via REST & GRPC | 0020-APIS-008 |
List all party IDs via REST & GRPC | 0020-APIS-009 |
List all network parameters & their current values via REST & GRPC | 0020-APIS-010 |
Retrieve the current block height REST & GRPC | 0020-APIS-011 |
Retrieve the current vega time REST & GRPC | 0020-APIS-012 |
Retrieve statistics about the network via REST & GRPC | 0020-APIS-013 |
Submit a valid transaction via REST & GRPC | 0020-APIS-014 |
- 0022-AUTH Authentication details what makes a transaction invalid or valid for submission
- 0062-SPAM Spam protection may also influence which transactions are accepted by submit