Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 4.62 KB

0020-APIS-core_api.md

File metadata and controls

83 lines (57 loc) · 4.62 KB

Core API

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.

Write

There is one 'write' endpoint - transaction, which will accept signed transaction bundles.

Read

REST API documentation

To observe the operation, and validate the state of the protocol, we must be able to obtain data provided by the following domains:

Governance

Market

  • 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

Party

  • Return number of pegged orders across all the markets.

Configuration

Consensus data

REST API documentation

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

Acceptance Criteria

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

See also