Markets and Market Data

Introduction

Markets on Vega are defined by the Market framework (see Vega Whitepaper for explanation), it is one of the core features of the protocol and central to a design for flexibility. Markets can be proposed on a network and can be voted in using governance. Derivatives markets on a network are composed from a set of parameters and include a risk model.

Both market information and market data are queryable, the following guides show how to use the APIs:

Listing markets on a Vega network

Connect to a Vega API server, and request all markets:

Gitpod ready-to-code What’s Gitpod?

See also REST API reference for further query detail.

See also REST API reference for further query detail.

Make sure vegaapiclient is installed (from PyPI):

pip install --upgrade Vega-API-client

This Python snippet code shows how to query for a list of orders on a market:

See also gRPC API reference for further query detail.

If successful, the response will include:

Field Description
markets A list of zero or more markets available on a Vega network.

Requesting market data

Connect to a Vega API server, and request the market data for a market:

Gitpod ready-to-code What’s Gitpod?

See also REST API reference for further query detail.

See also REST API reference for further query detail.

Make sure vegaapiclient is installed (from PyPI):

pip install --upgrade Vega-API-client

This Python snippet code shows how to query for a list of orders on a market:

See also gRPC API reference for further query detail.

If successful, the response will include:

Field Description
marketData A collection of market data for the specified market. See below more information on each value.

What’s the difference between Market and Market Data?

Market information is the current static information/configuration of the markets available on a Vega network, where as Market Data is the latest data available from trading within the market itself. Information such as the settlement date of a future or the risk model will be found by querying for a Market. Data such as best bid price or open interest will be found in Market Data.

What’s next?