Protocol Documentation

Table of Contents

vega/oracles/v1/spec.proto

Top

Condition

Condition describes the condition that must be validated by the

FieldTypeLabelDescription
operator Condition.Operator

comparator is the type of comparison to make on the value.

value string

value is used by the comparator.

Filter

Filter describes the conditions under which an oracle data is considered of

interest or not.

FieldTypeLabelDescription
key PropertyKey

key is the oracle data property key targeted by the filter.

conditions Condition repeated

conditions are the conditions that should be matched by the data to be considered of interest.

OracleSpec

An oracle spec describe the oracle data that a product (or a risk model)

wants to get from the oracle engine.

This message contains additional information used by the API.

FieldTypeLabelDescription
id string

id is a hash generated from the OracleSpec data.

created_at int64

Creation Date time

updated_at int64

Last Updated timestamp

pub_keys string repeated

pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys.

filters Filter repeated

filters describes which oracle data are considered of interest or not for the product (or the risk model).

status OracleSpec.Status

status describes the status of the oracle spec

OracleSpecConfiguration

An oracle spec describe the oracle data that a product (or a risk model)

wants to get from the oracle engine.

FieldTypeLabelDescription
pub_keys string repeated

pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys.

filters Filter repeated

filters describes which oracle data are considered of interest or not for the product (or the risk model).

PropertyKey

PropertyKey describes the property key contained in an oracle data.

FieldTypeLabelDescription
name string

name is the name of the property.

type PropertyKey.Type

type is the type of the property.

Condition.Operator

Comparator describes the type of comparison.

NameNumberDescription
OPERATOR_UNSPECIFIED 0

The default value

OPERATOR_EQUALS 1

Verify if the property values are strictly equal or not.

OPERATOR_GREATER_THAN 2

Verify if the oracle data value is greater than the Condition value.

OPERATOR_GREATER_THAN_OR_EQUAL 3

Verify if the oracle data value is greater than or equal to the Condition value.

OPERATOR_LESS_THAN 4

Verify if the oracle data value is less than the Condition value.

OPERATOR_LESS_THAN_OR_EQUAL 5

Verify if the oracle data value is less or equal to than the Condition value.

OracleSpec.Status

Status describe the status of the oracle spec

NameNumberDescription
STATUS_UNSPECIFIED 0

The default value.

STATUS_ACTIVE 1

STATUS_ACTIVE describes an active oracle spec.

STATUS_DEACTIVATED 2

STATUS_DEACTIVATED describes an oracle spec that is not listening to data anymore.

PropertyKey.Type

Type describes the type of properties that are supported by the oracle

engine.

NameNumberDescription
TYPE_UNSPECIFIED 0

The default value.

TYPE_EMPTY 1

Any type.

TYPE_INTEGER 2

Integer type.

TYPE_STRING 3

String type.

TYPE_BOOLEAN 4

Boolean type.

TYPE_DECIMAL 5

Any floating point decimal type.

TYPE_TIMESTAMP 6

Timestamp date type.

vega/markets.proto

Top

AuctionDuration

An auction duration is used to configure 3 auction periods:

1. `duration > 0`, `volume == 0`:

The auction will last for at least N seconds

2. `duration == 0`, `volume > 0`:

The auction will end once we can close with given traded volume

3. `duration > 0`, `volume > 0`:

The auction will take at least N seconds, but can end sooner if we can trade a certain volume

FieldTypeLabelDescription
duration int64

Duration of the auction in seconds

volume uint64

Target uncrossing trading volume

FeeFactors

Fee factors definition

FieldTypeLabelDescription
maker_fee string

Maker fee

infrastructure_fee string

Infrastructure fee

liquidity_fee string

Liquidity fee

Fees

Fees definition

FieldTypeLabelDescription
factors FeeFactors

Fee factors

Future

Future product definition

FieldTypeLabelDescription
settlement_asset string

The asset for the future

quote_name string

Quote name of the instrument

oracle_spec_for_settlement_price oracles.v1.OracleSpec

The oracle spec describing the settlement price oracle filter

oracle_spec_for_trading_termination oracles.v1.OracleSpec

the oracle spec describing the trading termination oracle filter

oracle_spec_binding OracleSpecToFutureBinding

The binding between the oracle spec and the oracle data

settlement_price_decimals uint32

the number of decimal places implied by the settlement price emitted by the settlement oracle

Instrument

Instrument definition

FieldTypeLabelDescription
id string

Instrument identifier

code string

Code for the instrument

name string

Name of the instrument

metadata InstrumentMetadata

A collection of instrument meta-data

future Future

Future

InstrumentMetadata

Instrument metadata definition

FieldTypeLabelDescription
tags string repeated

A list of 0 or more tags

LiquidityMonitoringParameters

LiquidityMonitoringParameters contains settings used for liquidity monitoring

FieldTypeLabelDescription
target_stake_parameters TargetStakeParameters

Specifies parameters related to target stake calculation

triggering_ratio double

Specifies the triggering ratio for entering liquidity auction

auction_extension int64

Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction

LogNormalModelParams

Risk model parameters for log normal

FieldTypeLabelDescription
mu double

Mu param

r double

R param

sigma double

Sigma param

LogNormalRiskModel

Risk model for log normal

FieldTypeLabelDescription
risk_aversion_parameter double

Risk Aversion Parameter

tau double

Tau

params LogNormalModelParams

Risk model parameters for log normal

MarginCalculator

Margin Calculator definition

FieldTypeLabelDescription
scaling_factors ScalingFactors

Scaling factors for margin calculation

Market

Market definition

FieldTypeLabelDescription
id string

Unique identifier

tradable_instrument TradableInstrument

Tradable instrument configuration

decimal_places uint64

Number of decimal places that a price must be shifted by in order to get a correct price denominated in the currency of the market, for example: `realPrice = price / 10^decimalPlaces`

fees Fees

Fees configuration

opening_auction AuctionDuration

Auction duration specifies how long the opening auction will run (minimum duration and optionally a minimum traded volume)

price_monitoring_settings PriceMonitoringSettings

PriceMonitoringSettings for the market

liquidity_monitoring_parameters LiquidityMonitoringParameters

LiquidityMonitoringParameters for the market

trading_mode Market.TradingMode

Current mode of execution of the market

state Market.State

Current state of the market

market_timestamps MarketTimestamps

Timestamps for when the market stay changes

position_decimal_places uint64

The number of decimal places for position

MarketTimestamps

Time stamps for important times about creating, enacting etc the market

FieldTypeLabelDescription
proposed int64

Time when the market is first proposed

pending int64

Time when the market has been voted in and is created into an opening auction

open int64

Time when the market has left the opening auction and is ready to accept trades

close int64

Time when the market is closed

OracleSpecToFutureBinding

OracleSpecToFutureBinding tells on which property oracle data should be

used as settlement price and which to use the trading terminated trigger

FieldTypeLabelDescription
settlement_price_property string

settlement_price_property holds the name of the property in the oracle data that should be used as settlement price. If it is set to "prices.BTC.value", then the Future will use the value of this property as settlement price.

trading_termination_property string

the name of the property in the oracle data that signals termination of trading

PriceMonitoringParameters

PriceMonitoringParameters contains a collection of triggers to be used for a given market

FieldTypeLabelDescription
triggers PriceMonitoringTrigger repeated

PriceMonitoringSettings

PriceMonitoringSettings contains the settings for price monitoring

FieldTypeLabelDescription
parameters PriceMonitoringParameters

Specifies price monitoring parameters to be used for price monitoring purposes

update_frequency int64

Specifies how often (expressed in seconds) the price monitoring bounds should be updated

PriceMonitoringTrigger

PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration

FieldTypeLabelDescription
horizon int64

Price monitoring projection horizon τ in seconds

probability string

Price monitoring probability level p

auction_extension int64

Price monitoring auction extension duration in seconds should the price breach it's theoretical level over the specified horizon at the specified probability level

ScalingFactors

Scaling Factors (for use in margin calculation)

FieldTypeLabelDescription
search_level double

Search level

initial_margin double

Initial margin level

collateral_release double

Collateral release level

SimpleModelParams

Risk model parameters for simple modelling

FieldTypeLabelDescription
factor_long double

Pre-defined risk factor value for long

factor_short double

Pre-defined risk factor value for short

max_move_up double

Pre-defined maximum price move up that the model considers as valid

min_move_down double

Pre-defined minimum price move down that the model considers as valid

probability_of_trading double

Pre-defined constant probability of trading

SimpleRiskModel

Risk model for simple modelling

FieldTypeLabelDescription
params SimpleModelParams

Risk model params for simple modelling

TargetStakeParameters

TargetStakeParameters contains parameters used in target stake calculation

FieldTypeLabelDescription
time_window int64

Specifies length of time window expressed in seconds for target stake calculation

scaling_factor double

Specifies scaling factors used in target stake calculation

TradableInstrument

Tradable Instrument definition

FieldTypeLabelDescription
instrument Instrument

Instrument details

margin_calculator MarginCalculator

Margin calculator for the instrument

log_normal_risk_model LogNormalRiskModel

Log normal

simple_risk_model SimpleRiskModel

Simple

Market.State

The current state of the Market

NameNumberDescription
STATE_UNSPECIFIED 0

Default value, invalid

STATE_PROPOSED 1

The Governance proposal valid and accepted

STATE_REJECTED 2

Outcome of governance votes is to reject the market

STATE_PENDING 3

Governance vote passes/wins

STATE_CANCELLED 4

Market triggers cancellation condition or governance votes to close before market becomes Active

STATE_ACTIVE 5

Enactment date reached and usual auction exit checks pass

STATE_SUSPENDED 6

Price monitoring or liquidity monitoring trigger

STATE_CLOSED 7

Governance vote (to close)

STATE_TRADING_TERMINATED 8

Defined by the product (i.e. from a product parameter, specified in market definition, giving close date/time)

STATE_SETTLED 9

Settlement triggered and completed as defined by product

Market.TradingMode

The trading mode the market is currently running, also referred to as 'market state'

NameNumberDescription
TRADING_MODE_UNSPECIFIED 0

Default value, this is invalid

TRADING_MODE_CONTINUOUS 1

Normal trading

TRADING_MODE_BATCH_AUCTION 2

Auction trading (FBA)

TRADING_MODE_OPENING_AUCTION 3

Opening auction

TRADING_MODE_MONITORING_AUCTION 4

Auction triggered by monitoring

vega/vega.proto

Top

Account

Represents an account for an asset on Vega for a particular owner or party

FieldTypeLabelDescription
id string

Unique account identifier (used internally by Vega)

owner string

The party that the account belongs to, special values include `network`, which represents the Vega network and is most commonly seen during liquidation of distressed trading positions

balance string

Balance of the asset, the balance is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places and importantly balances cannot be negative

asset string

Asset identifier for the account

market_id string

Market identifier for the account, if [`AccountType`](#vega.AccountType).`ACCOUNT_TYPE_GENERAL` this will be empty

type AccountType

The account type related to this account

AuctionIndicativeState

AuctionIndicativeState is used to emit an event with the indicative price/volume per market during an auction

FieldTypeLabelDescription
market_id string

The market identifier for which this state relates to

indicative_price string

The Indicative Uncrossing Price is the price at which all trades would occur if we uncrossed the auction now

indicative_volume uint64

The Indicative Uncrossing Volume is the volume available at the Indicative crossing price if we uncrossed the auction now

auction_start int64

The timestamp at which the auction started

auction_end int64

The timestamp at which the auction is meant to stop

Candle

Represents the high, low, open, and closing prices for an interval of trading,

referred to commonly as a candlestick or candle

FieldTypeLabelDescription
timestamp int64

Timestamp for the point in time when the candle was initially created/opened, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

datetime string

An ISO-8601 datetime with nanosecond precision for when the candle was last updated

high string

Highest price for trading during the candle interval

low string

Lowest price for trading during the candle interval

open string

Open trade price

close string

Closing trade price

volume uint64

Total trading volume during the candle interval

interval Interval

Time interval for the candle - See [`Interval`](#vega.Interval)

Delegation

FieldTypeLabelDescription
party string

Party which is delegating

node_id string

Node ID

amount string

Amount delegated

epoch_seq string

Epoch of delegation

Deposit

A deposit on to the Vega network

FieldTypeLabelDescription
id string

Unique identifier for the deposit

status Deposit.Status

Status of the deposit

party_id string

Party identifier of the user initiating the deposit

asset string

The Vega asset targeted by this deposit

amount string

The amount to be deposited

tx_hash string

The hash of the transaction from the foreign chain

credited_timestamp int64

Timestamp for when the Vega account was updated with the deposit

created_timestamp int64

Timestamp for when the deposit was created on the Vega network

DispatchStrategy

FieldTypeLabelDescription
asset_for_metric string

The asset to use for metric

metric DispatchMetric

The metric to apply

markets string repeated

Optional markets in scope

Epoch

FieldTypeLabelDescription
seq uint64

Sequence is used as epoch identifier

timestamps EpochTimestamps

Timestamps for start/end etc

validators Node repeated

Validators that participated in this epoch

delegations Delegation repeated

List of all delegations in epoch

EpochData

FieldTypeLabelDescription
total int32

Total number of epochs since node was created

offline int32

Total number of offline epochs since node was created

online int32

Total number of online epochs since node was created

EpochParticipation

FieldTypeLabelDescription
epoch Epoch

offline uint64

online uint64

total_rewards double

EpochTimestamps

Describes in both human readable and block time when an epoch spans

FieldTypeLabelDescription
start_time int64

Timestamp of epoch start in nanoseconds - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

expiry_time int64

Timestamp of epoch expiry in nanoseconds - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

end_time int64

Timestamp of epoch end in nanoseconds, empty if not started - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

first_block uint64

Height of first block in the epoch

last_block uint64

Height of last block in the epoch, empty if not ended

Erc20WithdrawExt

An extension of data required for the withdraw submissions

FieldTypeLabelDescription
receiver_address string

The address into which the bridge will release the funds

ErrorDetail

Represents Vega domain specific error information over gRPC/Protobuf

FieldTypeLabelDescription
code int32

A Vega API domain specific unique error code, useful for client side mappings, e.g. 10004

message string

A message that describes the error in more detail, should describe the problem encountered

inner string

Any inner error information that could add more context, or be helpful for error reporting

EthereumConfig

Ethereum configuration details.

FieldTypeLabelDescription
network_id string

Network identifier of this Ethereum network.

chain_id string

Chain identifier of this Ethereum network.

collateral_bridge_contract EthereumContractConfig

Contract configuration of the collateral bridge contract for this Ethereum network.

confirmations uint32

Number of block confirmations to wait to consider an Ethereum transaction trusted. An Ethereum block is trusted when there are at least "n" blocks confirmed by the network, "n" being the number of `confirmations` required. If `confirmations` was set to `3`, and the current block to be forged (or mined) on Ethereum is block 14, block 10 would be considered as trusted, but not block 11.

staking_bridge_contract EthereumContractConfig

Contract configuration of the stacking bridge contract for this Ethereum network.

token_vesting_contract EthereumContractConfig

Contract configuration of the token vesting contract for this Ethereum network.

multisig_control_contract EthereumContractConfig

Contract configuration of the multisig controld contract for this Ethereum network.

EthereumContractConfig

FieldTypeLabelDescription
address string

Address of the contract for this Ethereum network. The address should start with "0x".

deployment_block_height uint64

Block height at which the stacking contract has been deployed for this Ethereum network.

Fee

Represents any fees paid by a party, resulting from a trade

FieldTypeLabelDescription
maker_fee string

Fee amount paid to the non-aggressive party of the trade

infrastructure_fee string

Fee amount paid for maintaining the Vega infrastructure

liquidity_fee string

Fee amount paid to market makers

FinancialAmount

Asset value information used within a transfer

FieldTypeLabelDescription
amount string

A signed integer amount of asset

asset string

Asset identifier

KeyValueBundle

FieldTypeLabelDescription
key string

tolerance string

value StateVarValue

LedgerEntry

Represents a ledger entry on Vega

FieldTypeLabelDescription
from_account string

One or more accounts to transfer from

to_account string

One or more accounts to transfer to

amount string

An amount to transfer

reference string

A reference for auditing purposes

type string

Type of ledger entry

timestamp int64

Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

LiquidityOrder

Represents a liquidity order

FieldTypeLabelDescription
reference PeggedReference

The pegged reference point for the order

proportion uint32

The relative proportion of the commitment to be allocated at a price level

offset string

The offset/amount of units away for the order

LiquidityOrderReference

A pair of a liquidity order and the id of the generated order by the core

FieldTypeLabelDescription
order_id string

Unique identifier of the pegged order generated by the core to fulfil this liquidity order

liquidity_order LiquidityOrder

The liquidity order from the original submission

LiquidityProviderFeeShare

The equity like share of liquidity fee for each liquidity provider

FieldTypeLabelDescription
party string

The liquidity provider party id

equity_like_share string

The share own by this liquidity provider (float)

average_entry_valuation string

The average entry valuation of the liquidity provider for the market

LiquidityProvision

An Liquidity provider commitment

FieldTypeLabelDescription
id string

Unique identifier

party_id string

Unique party identifier for the creator of the provision

created_at int64

Timestamp for when the order was created at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

updated_at int64

Timestamp for when the order was updated at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

market_id string

Market identifier for the order, required field

commitment_amount string

Specified as a unitless number that represents the amount of settlement asset of the market

fee string

Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers

sells LiquidityOrderReference repeated

A set of liquidity sell orders to meet the liquidity provision obligation

buys LiquidityOrderReference repeated

A set of liquidity buy orders to meet the liquidity provision obligation

version uint64

Version of this liquidity provision order

status LiquidityProvision.Status

Status of this liquidity provision order

reference string

A reference shared between this liquidity provision and all it's orders

MarginLevels

Represents the margin levels for a party on a market at a given time

FieldTypeLabelDescription
maintenance_margin string

Maintenance margin value

search_level string

Search level value

initial_margin string

Initial margin value

collateral_release_level string

Collateral release level value

party_id string

Party identifier

market_id string

Market identifier

asset string

Asset identifier

timestamp int64

Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

MarketData

Represents data generated by a market when open

FieldTypeLabelDescription
mark_price string

Mark price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

best_bid_price string

Highest price level on an order book for buy orders, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

best_bid_volume uint64

Aggregated volume being bid at the best bid price

best_offer_price string

Lowest price level on an order book for offer orders

best_offer_volume uint64

Aggregated volume being offered at the best offer price, as an integer, for example `123456` is a correctly // formatted price of `1.23456` assuming market configured to 5 decimal places

best_static_bid_price string

Highest price on the order book for buy orders not including pegged orders

best_static_bid_volume uint64

Total volume at the best static bid price excluding pegged orders

best_static_offer_price string

Lowest price on the order book for sell orders not including pegged orders

best_static_offer_volume uint64

Total volume at the best static offer price excluding pegged orders

mid_price string

Arithmetic average of the best bid price and best offer price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

static_mid_price string

Arithmetic average of the best static bid price and best static offer price

market string

Market identifier for the data

timestamp int64

Timestamp at which this mark price was relevant, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

open_interest uint64

The sum of the size of all positions greater than 0 on the market

auction_end int64

Time in seconds until the end of the auction (0 if currently not in auction period)

auction_start int64

Time until next auction (used in FBA's) - currently always 0

indicative_price string

Indicative price (zero if not in auction)

indicative_volume uint64

Indicative volume (zero if not in auction)

market_trading_mode Market.TradingMode

The current trading mode for the market

trigger AuctionTrigger

When a market is in an auction trading mode, this field indicates what triggered the auction

extension_trigger AuctionTrigger

When a market auction is extended, this field indicates what caused the extension

target_stake string

Targeted stake for the given market

supplied_stake string

Available stake for the given market

price_monitoring_bounds PriceMonitoringBounds repeated

One or more price monitoring bounds for the current timestamp

market_value_proxy string

the market value proxy

liquidity_provider_fee_share LiquidityProviderFeeShare repeated

the equity like share of liquidity fee for each liquidity provider

MarketDepth

Represents market depth or order book data for the specified market on Vega

FieldTypeLabelDescription
market_id string

Market identifier

buy PriceLevel repeated

Collection of price levels for the buy side of the book

sell PriceLevel repeated

Collection of price levels for the sell side of the book

sequence_number uint64

Sequence number for the market depth data returned

MarketDepthUpdate

Represents the changed market depth since the last update

FieldTypeLabelDescription
market_id string

Market identifier

buy PriceLevel repeated

Collection of updated price levels for the buy side of the book

sell PriceLevel repeated

Collection of updated price levels for the sell side of the book

sequence_number uint64

Sequence number for the market depth update data returned. It is increasing but not monotonic.

previous_sequence_number uint64

Sequence number of of the previous market depth update, for checking there are no gaps.

MatrixValue

FieldTypeLabelDescription
value VectorValue repeated

NetworkLimits

Network limits, defined in the genesis file

FieldTypeLabelDescription
can_propose_market bool

Are market proposals allowed at this point in time

can_propose_asset bool

Are asset proposals allowed at this point in time

bootstrap_finished bool

True once block count > bootstrapBlockCount

propose_market_enabled bool

Are market proposals enabled on this chain

propose_asset_enabled bool

Are asset proposals enabled on this chain

bootstrap_block_count uint32

How many blocks before the chain comes out of bootstrap mode

genesis_loaded bool

True once the genesis file is loaded

propose_market_enabled_from int64

The date/timestamp in unix nanoseconds at which market proposals will be enabled (0 indicates not set)

propose_asset_enabled_from int64

The date/timestamp in unix nanoseconds at which asset proposals will be enabled (0 indicates not set)

NetworkParameter

Represents a network parameter on Vega

FieldTypeLabelDescription
key string

The unique key

value string

The value for the network parameter

Node

FieldTypeLabelDescription
id string

The node ID (wallet ID)

pub_key string

Pub key of the node operator

tm_pub_key string

Public key of Tendermint

ethereum_adddress string

Ethereum public key of the node

info_url string

URL where I can find out more info on the node

location string

Country code for the location of the node

staked_by_operator string

The amount the node has put up themselves

staked_by_delegates string

The amount of stake that has been delegated by token holders

staked_total string

Total amount staked on node

max_intended_stake string

Max amount of (wanted) stake, is this a network param or a node param

pending_stake string

Amount of stake on the next epoch

epoch_data EpochData

Informantion about epoch

status NodeStatus

Node status

delegations Delegation repeated

Node's delegations

reward_score RewardScore

Node reward score

ranking_score RankingScore

Node ranking information

name string

Node name

avatar_url string

Avatar url

NodeData

FieldTypeLabelDescription
staked_total string

Total staked amount across all nodes

total_nodes uint32

Total number of nodes

inactive_nodes uint32

Number of inactive nodes

validating_nodes uint32

Number of nodes validating

uptime float

Total uptime for all epochs across all nodes

Order

An order can be submitted, amended and cancelled on Vega in an attempt to make trades with other parties

FieldTypeLabelDescription
id string

Unique identifier for the order (set by the system after consensus)

market_id string

Market identifier for the order

party_id string

Party identifier for the order

side Side

Side for the order, e.g. SIDE_BUY or SIDE_SELL - See [`Side`](#vega.Side)

price string

Price for the order, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

size uint64

Size for the order, for example, in a futures market the size equals the number of contracts

remaining uint64

Size remaining, when this reaches 0 then the order is fully filled and status becomes STATUS_FILLED

time_in_force Order.TimeInForce

Time in force indicates how long an order will remain active before it is executed or expires. - See [`Order.TimeInForce`](#vega.Order.TimeInForce)

type Order.Type

Type for the order - See [`Order.Type`](#vega.Order.Type)

created_at int64

Timestamp for when the order was created at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

status Order.Status

The current status for the order. See [`Order.Status`](#vega.Order.Status) - For detail on `STATUS_REJECTED` please check the [`OrderError`](#vega.OrderError) value given in the `reason` field

expires_at int64

Timestamp for when the order will expire, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`, valid only for [`Order.TimeInForce`](#vega.Order.TimeInForce)`.TIME_IN_FORCE_GTT`

reference string

Reference given for the order, this is typically used to retrieve an order submitted through consensus - Currently set internally by the node to return a unique reference identifier for the order submission

reason OrderError

If the Order `status` is `STATUS_REJECTED` then an [`OrderError`](#vega.OrderError) reason will be specified - The default for this field is `ORDER_ERROR_NONE` which signifies that there were no errors

updated_at int64

Timestamp for when the Order was last updated, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

version uint64

The version for the order, initial value is version 1 and is incremented after each successful amend

batch_id uint64

Batch identifier for the order, used internally for orders submitted during auctions to keep track of the auction batch this order falls under (required for fees calculation)

pegged_order PeggedOrder

Pegged order details, used only if the order represents a pegged order.

liquidity_provision_id string

Is this order created as part of a liquidity provision, will be empty if not.

OrderCancellationConfirmation

Used when cancelling an Order

FieldTypeLabelDescription
order Order

The order that was cancelled

OrderConfirmation

Used when confirming an Order

FieldTypeLabelDescription
order Order

The order that was confirmed

trades Trade repeated

0 or more trades that were emitted

passive_orders_affected Order repeated

0 or more passive orders that were affected

Party

A party represents an entity who wishes to trade on or query a Vega network

FieldTypeLabelDescription
id string

A unique identifier for the party, typically represented by a public key

PeggedOrder

Pegged orders are limit orders where the price is specified in the form REFERENCE +/- OFFSET

They can be used for any limit order that is valid during continuous trading

FieldTypeLabelDescription
reference PeggedReference

Which price point are we linked to

offset string

Offset from the price reference

Position

Represents position data for a party on the specified market on Vega

FieldTypeLabelDescription
market_id string

Market identifier

party_id string

Party identifier

open_volume int64

Open volume for the position, value is signed +ve for long and -ve for short

realised_pnl string

Realised profit and loss for the position, value is signed +ve for long and -ve for short

unrealised_pnl string

Unrealised profit and loss for the position, value is signed +ve for long and -ve for short

average_entry_price string

Average entry price for the position, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

updated_at int64

Timestamp for the latest time the position was updated

PositionTrade

FieldTypeLabelDescription
volume int64

Volume for the position trade, value is signed +ve for long and -ve for short

price string

Price for the position trade, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

Price

FieldTypeLabelDescription
value string

Price value, given as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

PriceLevel

Represents a price level from market depth or order book data

FieldTypeLabelDescription
price string

Price for the price level, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

number_of_orders uint64

Number of orders at the price level

volume uint64

Volume at the price level

PriceMonitoringBounds

Represents a list of valid (at the current timestamp) price ranges per associated trigger

FieldTypeLabelDescription
min_valid_price string

Minimum price that isn't currently breaching the specified price monitoring trigger

max_valid_price string

Maximum price that isn't currently breaching the specified price monitoring trigger

trigger PriceMonitoringTrigger

Price monitoring trigger associated with the bounds

reference_price string

Reference price used to calculate the valid price range

RankingScore

FieldTypeLabelDescription
stake_score string

stake based score - no anti-whaling

performance_score string

performance based score

previous_status ValidatorNodeStatus

the status of the validator in the previous epoch

status ValidatorNodeStatus

the status of the validator in the current epoch

voting_power uint32

tendermint voting power of the validator

ranking_score string

final score

Reward

Details for a single reward payment

FieldTypeLabelDescription
asset_id string

party_id string

epoch uint64

amount string

percentage_of_total string

received_at int64

market_id string

reward_type string

RewardScore

FieldTypeLabelDescription
raw_validator_score string

stake based score - with anti-whaling

performance_score string

performance based score

multisig_score string

multisig score

validator_score string

un-normalised score

normalised_score string

normalised validator score for rewards

validator_status ValidatorNodeStatus

the status of the validator for reward

RewardSummary

Details for rewards for a single asset

FieldTypeLabelDescription
asset_id string

party_id string

amount string

Total amount of rewards for the asset

RiskFactor

Risk factors are used to calculate the current risk associated with orders trading on a given market

FieldTypeLabelDescription
market string

Market ID that relates to this risk factor

short string

Short Risk factor value

long string

Long Risk factor value

ScalarValue

FieldTypeLabelDescription
value string

StateValueProposal

FieldTypeLabelDescription
state_var_id string

state variable identifier

event_id string

event identifier

kvb KeyValueBundle repeated

key value tolerance triplets

StateVarValue

FieldTypeLabelDescription
scalar_val ScalarValue

vector_val VectorValue

matrix_val MatrixValue

Timestamp

A timestamp in nanoseconds since epoch

See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

FieldTypeLabelDescription
value int64

Timestamp value

Trade

A trade occurs when an aggressive order crosses one or more passive orders on the order book for a market on Vega

FieldTypeLabelDescription
id string

Unique identifier for the trade (generated by Vega)

market_id string

Market identifier (the market that the trade occurred on)

price string

Price for the trade, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

size uint64

Size filled for the trade

buyer string

Unique party identifier for the buyer

seller string

Unique party identifier for the seller

aggressor Side

Direction of the aggressive party e.g. SIDE_BUY or SIDE_SELL - See [`Side`](#vega.Side)

buy_order string

Identifier of the order from the buy side

sell_order string

Identifier of the order from the sell side

timestamp int64

Timestamp for when the trade occurred, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

type Trade.Type

Type for the trade - See [`Trade.Type`](#vega.Trade.Type)

buyer_fee Fee

Fee amount charged to the buyer party for the trade

seller_fee Fee

Fee amount charged to the seller party for the trade

buyer_auction_batch uint64

Auction batch number that the buy side order was placed in

seller_auction_batch uint64

Auction batch number that the sell side order was placed in

TradeSet

FieldTypeLabelDescription
trades Trade repeated

A set of one or more trades

Transfer

Represents a financial transfer within Vega

FieldTypeLabelDescription
owner string

Party identifier for the owner of the transfer

amount FinancialAmount

A financial amount (of an asset) to transfer

type TransferType

The type of transfer, gives the reason for the transfer

min_amount string

A minimum amount

market_id string

optional dispatch strategy

TransferBalance

Represents the balance for an account during a transfer

FieldTypeLabelDescription
account Account

The account relating to the transfer

balance string

The balance relating to the transfer

TransferRequest

Represents a request to transfer from one set of accounts to another

FieldTypeLabelDescription
from_account Account repeated

One or more accounts to transfer from

to_account Account repeated

One or more accounts to transfer to

amount string

An amount to transfer for the asset

min_amount string

A minimum amount

asset string

Asset identifier

reference string

A reference for auditing purposes

TransferResponse

Represents the response from a transfer

FieldTypeLabelDescription
transfers LedgerEntry repeated

One or more ledger entries representing the transfers

balances TransferBalance repeated

One or more account balances

Uint64Value

FieldTypeLabelDescription
value uint64

VectorValue

FieldTypeLabelDescription
value string repeated

WithdrawExt

Withdrawal external details

FieldTypeLabelDescription
erc20 Erc20WithdrawExt

ERC20 withdrawal details

Withdrawal

A withdrawal from the Vega network

FieldTypeLabelDescription
id string

Unique identifier for the withdrawal

party_id string

Unique party identifier of the user initiating the withdrawal

amount string

The amount to be withdrawn

asset string

The asset we want to withdraw funds from

status Withdrawal.Status

The status of the withdrawal

ref string

The reference which is used by the foreign chain to refer to this withdrawal

expiry int64

The time until when the withdrawal is valid

tx_hash string

The hash of the foreign chain for this transaction

created_timestamp int64

Timestamp for when the network started to process this withdrawal

withdrawn_timestamp int64

Timestamp for when the withdrawal was finalised by the network

ext WithdrawExt

Foreign chain specifics

AccountType

Various collateral/account types as used by Vega

NameNumberDescription
ACCOUNT_TYPE_UNSPECIFIED 0

Default value

ACCOUNT_TYPE_INSURANCE 1

Insurance pool accounts contain insurance pool funds for a market

ACCOUNT_TYPE_SETTLEMENT 2

Settlement accounts exist only during settlement or mark-to-market

ACCOUNT_TYPE_MARGIN 3

Margin accounts contain margin funds for a party and each party will have multiple margin accounts, one for each market they have traded in Margin account funds will alter as margin requirements on positions change

ACCOUNT_TYPE_GENERAL 4

General accounts contains general funds for a party. A party will have multiple general accounts, one for each asset they want to trade with General accounts are where funds are initially deposited or withdrawn from, it is also the account where funds are taken to fulfil fees and initial margin requirements

ACCOUNT_TYPE_FEES_INFRASTRUCTURE 5

Infrastructure accounts contain fees earned by providing infrastructure on Vega

ACCOUNT_TYPE_FEES_LIQUIDITY 6

Liquidity accounts contain fees earned by providing liquidity on Vega markets

ACCOUNT_TYPE_FEES_MAKER 7

This account is created to hold fees earned by placing orders that sit on the book and are then matched with an incoming order to create a trade - These fees reward parties who provide the best priced liquidity that actually allows trading to take place

ACCOUNT_TYPE_LOCK_WITHDRAW 8

This account is created to lock funds to be withdrawn by parties

ACCOUNT_TYPE_BOND 9

This account is created to maintain liquidity providers funds commitments

ACCOUNT_TYPE_EXTERNAL 10

External account represents an external source (deposit/withdrawal)

ACCOUNT_TYPE_GLOBAL_INSURANCE 11

Global insurance account for the asset

ACCOUNT_TYPE_GLOBAL_REWARD 12

Global reward account for the asset

ACCOUNT_TYPE_PENDING_TRANSFERS 13

Per asset account used to store pending transfers (if any)

ACCOUNT_TYPE_REWARD_TAKER_PAID_FEES 14

Per asset reward account for fees paid by takers

ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES 15

Per asset reward account for fees received by makers

ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES 16

Per asset reward account for fees received by liquidity providers

ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS 17

Per asset reward account for market proposers when the market goes above some trading threshold

AuctionTrigger

Auction triggers indicate what condition triggered an auction (if market is in auction mode)

NameNumberDescription
AUCTION_TRIGGER_UNSPECIFIED 0

Default value for AuctionTrigger, no auction triggered

AUCTION_TRIGGER_BATCH 1

Batch auction

AUCTION_TRIGGER_OPENING 2

Opening auction

AUCTION_TRIGGER_PRICE 3

Price monitoring trigger

AUCTION_TRIGGER_LIQUIDITY 4

Liquidity monitoring trigger

ChainStatus

The Vega blockchain status as reported by the node the caller is connected to

NameNumberDescription
CHAIN_STATUS_UNSPECIFIED 0

Default value, always invalid

CHAIN_STATUS_DISCONNECTED 1

Blockchain is disconnected

CHAIN_STATUS_REPLAYING 2

Blockchain is replaying historic transactions

CHAIN_STATUS_CONNECTED 3

Blockchain is connected and receiving transactions

Deposit.Status

The status of the deposit

NameNumberDescription
STATUS_UNSPECIFIED 0

Default value, always invalid

STATUS_OPEN 1

The deposit is being processed by the network

STATUS_CANCELLED 2

The deposit has been cancelled by the network

STATUS_FINALIZED 3

The deposit has been finalised and accounts have been updated

DispatchMetric

NameNumberDescription
DISPATCH_METRIC_UNSPECIFIED 0

DISPATCH_METRIC_TAKER_FEES_PAID 1

Dispatch metric that is using the total taker fees paid in the market

DISPATCH_METRIC_MAKER_FEES_RECEIVED 2

Dispatch metric that is using the total maker fees received in the market

DISPATCH_METRIC_LP_FEES_RECEIVED 3

Dispatch metric that is using the total LP fees received in the market

DISPATCH_METRIC_MARKET_VALUE 4

Dispatch metric that is using total value of the market if above the required threshold and not paid given proposer bonus yet

EpochAction

What epoch action has occurred

NameNumberDescription
EPOCH_ACTION_UNSPECIFIED 0

EPOCH_ACTION_START 1

The epoch update is for a new epoch

EPOCH_ACTION_END 2

The epoch update is for the end of an epoch

Interval

Represents a set of time intervals that are used when querying for candle-stick data

NameNumberDescription
INTERVAL_UNSPECIFIED 0

Default value, always invalid

INTERVAL_I1M 60

1 minute.

INTERVAL_I5M 300

5 minutes.

INTERVAL_I15M 900

15 minutes.

INTERVAL_I1H 3600

1 hour.

INTERVAL_I6H 21600

6 hours.

INTERVAL_I1D 86400

1 day.

LiquidityProvision.Status

Status of a liquidity provision order

NameNumberDescription
STATUS_UNSPECIFIED 0

The default value

STATUS_ACTIVE 1

The liquidity provision is active

STATUS_STOPPED 2

The liquidity provision was stopped by the network

STATUS_CANCELLED 3

The liquidity provision was cancelled by the liquidity provider

STATUS_REJECTED 4

The liquidity provision was invalid and got rejected

STATUS_UNDEPLOYED 5

The liquidity provision is valid and accepted by network, but orders aren't deployed

STATUS_PENDING 6

The liquidity provision is valid and accepted by network but have never been deployed. I when it's possible to deploy them for the first time margin check fails, then they will be cancelled without any penalties.

NodeStatus

Node status type

NameNumberDescription
NODE_STATUS_UNSPECIFIED 0

NODE_STATUS_VALIDATOR 1

The node is validating

NODE_STATUS_NON_VALIDATOR 2

The node is non-validating

Order.Status

Status values for an order

See resulting status in [What order types are available to trade on Vega?](https://docs.testnet.vega.xyz/docs/trading-questions/#what-order-types-are-available-to-trade-on-vega) for more detail.

NameNumberDescription
STATUS_UNSPECIFIED 0

Default value, always invalid

STATUS_ACTIVE 1

Used for active unfilled or partially filled orders

STATUS_EXPIRED 2

Used for expired GTT orders

STATUS_CANCELLED 3

Used for orders cancelled by the party that created the order

STATUS_STOPPED 4

Used for unfilled FOK or IOC orders, and for orders that were stopped by the network

STATUS_FILLED 5

Used for closed fully filled orders

STATUS_REJECTED 6

Used for orders when not enough collateral was available to fill the margin requirements

STATUS_PARTIALLY_FILLED 7

Used for closed partially filled IOC orders

STATUS_PARKED 8

Order has been removed from the order book and has been parked, this applies to pegged orders only

Order.TimeInForce

Time In Force for an order

See [What order types are available to trade on Vega?](https://docs.testnet.vega.xyz/docs/trading-questions/#what-order-types-are-available-to-trade-on-vega) for more detail

NameNumberDescription
TIME_IN_FORCE_UNSPECIFIED 0

Default value for TimeInForce, can be valid for an amend

TIME_IN_FORCE_GTC 1

Good until cancelled

TIME_IN_FORCE_GTT 2

Good until specified time

TIME_IN_FORCE_IOC 3

Immediate or cancel

TIME_IN_FORCE_FOK 4

Fill or kill

TIME_IN_FORCE_GFA 5

Good for auction

TIME_IN_FORCE_GFN 6

Good for normal

Order.Type

Type values for an order

NameNumberDescription
TYPE_UNSPECIFIED 0

Default value, always invalid

TYPE_LIMIT 1

Used for Limit orders

TYPE_MARKET 2

Used for Market orders

TYPE_NETWORK 3

Used for orders where the initiating party is the network (with distressed parties)

OrderError

OrderError codes are returned in the `[Order](#vega.Order).reason` field - If there is an issue

with an order during its life-cycle, it will be marked with `status.ORDER_STATUS_REJECTED`

NameNumberDescription
ORDER_ERROR_UNSPECIFIED 0

Default value, no error reported

ORDER_ERROR_INVALID_MARKET_ID 1

Order was submitted for a market that does not exist

ORDER_ERROR_INVALID_ORDER_ID 2

Order was submitted with an invalid identifier

ORDER_ERROR_OUT_OF_SEQUENCE 3

Order was amended with a sequence number that was not previous version + 1

ORDER_ERROR_INVALID_REMAINING_SIZE 4

Order was amended with an invalid remaining size (e.g. remaining greater than total size)

ORDER_ERROR_TIME_FAILURE 5

Node was unable to get Vega (blockchain) time

ORDER_ERROR_REMOVAL_FAILURE 6

Failed to remove an order from the book

ORDER_ERROR_INVALID_EXPIRATION_DATETIME 7

An order with `TimeInForce.TIME_IN_FORCE_GTT` was submitted or amended with an expiration that was badly formatted or otherwise invalid

ORDER_ERROR_INVALID_ORDER_REFERENCE 8

Order was submitted or amended with an invalid reference field

ORDER_ERROR_EDIT_NOT_ALLOWED 9

Order amend was submitted for an order field that cannot not be amended (e.g. order identifier)

ORDER_ERROR_AMEND_FAILURE 10

Amend failure because amend details do not match original order

ORDER_ERROR_NOT_FOUND 11

Order not found in an order book or store

ORDER_ERROR_INVALID_PARTY_ID 12

Order was submitted with an invalid or missing party identifier

ORDER_ERROR_MARKET_CLOSED 13

Order was submitted for a market that has closed

ORDER_ERROR_MARGIN_CHECK_FAILED 14

Order was submitted, but the party did not have enough collateral to cover the order

ORDER_ERROR_MISSING_GENERAL_ACCOUNT 15

Order was submitted, but the party did not have an account for this asset

ORDER_ERROR_INTERNAL_ERROR 16

Unspecified internal error

ORDER_ERROR_INVALID_SIZE 17

Order was submitted with an invalid or missing size (e.g. 0)

ORDER_ERROR_INVALID_PERSISTENCE 18

Order was submitted with an invalid persistence for its type

ORDER_ERROR_INVALID_TYPE 19

Order was submitted with an invalid type field

ORDER_ERROR_SELF_TRADING 20

Order was stopped as it would have traded with another order submitted from the same party

ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES 21

Order was submitted, but the party did not have enough collateral to cover the fees for the order

ORDER_ERROR_INCORRECT_MARKET_TYPE 22

Order was submitted with an incorrect or invalid market type

ORDER_ERROR_INVALID_TIME_IN_FORCE 23

Order was submitted with invalid time in force

ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION 24

A GFN order has got to the market when it is in auction mode

ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING 25

A GFA order has got to the market when it is in continuous trading mode

ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT 26

Attempt to amend order to GTT without ExpiryAt

ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT 27

Attempt to amend ExpiryAt to a value before CreatedAt

ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT 28

Attempt to amend to GTC without an ExpiryAt value

ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC 29

Amending to FOK or IOC is invalid

ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN 30

Amending to GFA or GFN is invalid

ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN 31

Amending from GFA or GFN is invalid

ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION 32

IOC orders are not allowed during auction

ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION 33

FOK orders are not allowed during auction

ORDER_ERROR_MUST_BE_LIMIT_ORDER 34

Pegged orders must be LIMIT orders

ORDER_ERROR_MUST_BE_GTT_OR_GTC 35

Pegged orders can only have TIF GTC or GTT

ORDER_ERROR_WITHOUT_REFERENCE_PRICE 36

Pegged order must have a reference price

ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE 37

Buy pegged order cannot reference best ask price

ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO 40

Pegged order offset must be >= 0

ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE 41

Sell pegged order cannot reference best bid price

ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO 42

Pegged order offset must be > zero

ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE 43

The party has an insufficient balance, or does not have a general account to submit the order (no deposits made for the required asset)

ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER 44

Cannot amend a non pegged orders details

ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER 45

We are unable to re-price a pegged order because a market price is unavailable

ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER 46

It is not possible to amend the price of an existing pegged order

ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS 47

An FOK, IOC, or GFN order was rejected because it resulted in trades outside the price bounds

PeggedReference

A pegged reference defines which price point a pegged order is linked to - meaning

the price for a pegged order is calculated from the value of the reference price point

NameNumberDescription
PEGGED_REFERENCE_UNSPECIFIED 0

Default value for PeggedReference, no reference given

PEGGED_REFERENCE_MID 1

Mid price reference

PEGGED_REFERENCE_BEST_BID 2

Best bid price reference

PEGGED_REFERENCE_BEST_ASK 3

Best ask price reference

Side

A side relates to the direction of an order, to Buy, or Sell

NameNumberDescription
SIDE_UNSPECIFIED 0

Default value, always invalid

SIDE_BUY 1

Buy order

SIDE_SELL 2

Sell order

Trade.Type

Type values for a trade

NameNumberDescription
TYPE_UNSPECIFIED 0

Default value, always invalid

TYPE_DEFAULT 1

Normal trading between two parties

TYPE_NETWORK_CLOSE_OUT_GOOD 2

Trading initiated by the network with another party on the book, which helps to zero-out the positions of one or more distressed parties

TYPE_NETWORK_CLOSE_OUT_BAD 3

Trading initiated by the network with another party off the book, with a distressed party in order to zero-out the position of the party

TransferType

Transfers can occur between parties on Vega, these are the types that indicate why a transfer took place

NameNumberDescription
TRANSFER_TYPE_UNSPECIFIED 0

Default value, always invalid

TRANSFER_TYPE_LOSS 1

Loss

TRANSFER_TYPE_WIN 2

Win

TRANSFER_TYPE_CLOSE 3

Close

TRANSFER_TYPE_MTM_LOSS 4

Mark to market loss

TRANSFER_TYPE_MTM_WIN 5

Mark to market win

TRANSFER_TYPE_MARGIN_LOW 6

Margin too low

TRANSFER_TYPE_MARGIN_HIGH 7

Margin too high

TRANSFER_TYPE_MARGIN_CONFISCATED 8

Margin was confiscated

TRANSFER_TYPE_MAKER_FEE_PAY 9

Pay maker fee

TRANSFER_TYPE_MAKER_FEE_RECEIVE 10

Receive maker fee

TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY 11

Pay infrastructure fee

TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE 12

Receive infrastructure fee

TRANSFER_TYPE_LIQUIDITY_FEE_PAY 13

Pay liquidity fee

TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE 14

Receive liquidity fee

TRANSFER_TYPE_BOND_LOW 15

Bond too low

TRANSFER_TYPE_BOND_HIGH 16

Bond too high

TRANSFER_TYPE_WITHDRAW_LOCK 17

Lock amount for withdraw

TRANSFER_TYPE_WITHDRAW 18

Actual withdraw from system

TRANSFER_TYPE_DEPOSIT 19

Deposit funds

TRANSFER_TYPE_BOND_SLASHING 20

Bond slashing

TRANSFER_TYPE_STAKE_REWARD 21

Stake reward

TRANSFER_TYPE_TRANSFER_FUNDS_SEND 22

Transfer funds

TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE 23

Transfer funds

ValidatorNodeStatus

Validation status of the node

NameNumberDescription
VALIDATOR_NODE_STATUS_UNSPECIFIED 0

VALIDATOR_NODE_STATUS_TENDERMINT 1

The node is a tendermint validator

VALIDATOR_NODE_STATUS_ERSATZ 2

The node is an ersatz validator

VALIDATOR_NODE_STATUS_PENDING 3

The node is a pending validator

Withdrawal.Status

The status of the withdrawal

NameNumberDescription
STATUS_UNSPECIFIED 0

Default value, always invalid

STATUS_OPEN 1

The withdrawal is open and being processed by the network

STATUS_REJECTED 2

The withdrawal have been cancelled

STATUS_FINALIZED 3

The withdrawal went through and is fully finalised, the funds are removed from the Vega network and are unlocked on the foreign chain bridge, for example, on the Ethereum network

vega/assets.proto

Top

Asset

The Vega representation of an external asset

FieldTypeLabelDescription
id string

Internal identifier of the asset

details AssetDetails

The definition of the external source for this asset

AssetDetails

The Vega representation of an external asset

FieldTypeLabelDescription
name string

Name of the asset (e.g: Great British Pound)

symbol string

Symbol of the asset (e.g: GBP)

total_supply string

Total circulating supply for the asset

decimals uint64

Number of decimal / precision handled by this asset

quantum string

The minimum economically meaningful amount in the asset

builtin_asset BuiltinAsset

A built-in asset

erc20 ERC20

An Ethereum ERC20 asset

AssetDetailsUpdate

The changes to apply on an existing asset.

FieldTypeLabelDescription
name string

Name of the asset (e.g: Great British Pound)

symbol string

Symbol of the asset (e.g: GBP)

total_supply string

Total circulating supply for the asset

decimals uint64

Number of decimal / precision handled by this asset

quantum string

The minimum economically meaningful amount in the asset

erc20 ERC20Update

An Ethereum ERC20 asset

BuiltinAsset

A Vega internal asset

FieldTypeLabelDescription
max_faucet_amount_mint string

Maximum amount that can be requested by a party through the built-in asset faucet at a time

ERC20

An ERC20 token based asset, living on the ethereum network

FieldTypeLabelDescription
contract_address string

The address of the contract for the token, on the ethereum network

lifetime_limit string

The lifetime limits deposit per address note: this is a temporary measure for restricted mainnet

withdraw_threshold string

The maximum allowed per withdraw note: this is a temporary measure for restricted mainnet

ERC20Update

FieldTypeLabelDescription
lifetime_limit string

The lifetime limits deposit per address. This is will be interpreted against the asset decimals. note: this is a temporary measure for restricted mainnet

withdraw_threshold string

The maximum allowed per withdraw. This is will be interpreted against the asset decimals. note: this is a temporary measure for restricted mainnet

vega/governance.proto

Top

FutureProduct

Future product configuration

FieldTypeLabelDescription
settlement_asset string

Product settlement asset identifier

quote_name string

Product quote name

oracle_spec_for_settlement_price oracles.v1.OracleSpecConfiguration

The oracle spec describing the oracle data of settlement price

oracle_spec_for_trading_termination oracles.v1.OracleSpecConfiguration

The oracle spec describing the oracle data of trading termination

oracle_spec_binding OracleSpecToFutureBinding

The binding between the oracle spec and the settlement price

settlement_price_decimals uint32

the number of decimal places implied by the settlement price emitted by the settlement oracle

GovernanceData

Governance data

FieldTypeLabelDescription
proposal Proposal

The governance proposal

yes Vote repeated

All "yes" votes in favour of the proposal above

no Vote repeated

All "no" votes against the proposal above

yes_party GovernanceData.YesPartyEntry repeated

All latest YES votes by party (guaranteed to be unique), where key (string) is the party ID (public key) and value (Vote) is the vote cast by the given party

no_party GovernanceData.NoPartyEntry repeated

All latest NO votes by party (guaranteed to be unique), where key (string) is the party ID (public key) and value (Vote) is the vote cast by the given party

GovernanceData.NoPartyEntry

FieldTypeLabelDescription
key string

value Vote

GovernanceData.YesPartyEntry

FieldTypeLabelDescription
key string

value Vote

InstrumentConfiguration

Instrument configuration

FieldTypeLabelDescription
name string

Instrument name

code string

Instrument code

future FutureProduct

Future

NewAsset

New asset on Vega

FieldTypeLabelDescription
changes AssetDetails

The configuration of the new asset

NewFreeform

Freeform proposal

This message is just used as a placeholder to sort out the nature of the

proposal once parsed.

NewMarket

New market on Vega

FieldTypeLabelDescription
changes NewMarketConfiguration

The configuration of the new market

liquidity_commitment NewMarketCommitment

The commitment from the party creating the NewMarket proposal

NewMarketCommitment

A commitment of liquidity to be made by the party which proposes a market

FieldTypeLabelDescription
commitment_amount string

Specified as a unitless number that represents the amount of settlement asset of the market

fee string

Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers

sells LiquidityOrder repeated

A set of liquidity sell orders to meet the liquidity provision obligation

buys LiquidityOrder repeated

A set of liquidity buy orders to meet the liquidity provision obligation

reference string

A reference to be associated to all orders created from this commitment

NewMarketConfiguration

Configuration for a new market on Vega

FieldTypeLabelDescription
instrument InstrumentConfiguration

New market instrument configuration

decimal_places uint64

Decimal places used for the new market

metadata string repeated

Optional new market meta data, tags

price_monitoring_parameters PriceMonitoringParameters

Price monitoring parameters

liquidity_monitoring_parameters LiquidityMonitoringParameters

Liquidity monitoring parameters

simple SimpleModelParams

Simple risk model parameters, valid only if MODEL_SIMPLE is selected

log_normal LogNormalRiskModel

Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected

position_decimal_places uint64

Decimal places for order sizes

Proposal

Governance proposal

FieldTypeLabelDescription
id string

Unique proposal identifier

reference string

Proposal reference

party_id string

Party identifier of the author (the party submitting the proposal)

state Proposal.State

Proposal state - See (Proposal.State)[#vega.Proposal.State] definition

timestamp int64

Proposal timestamp for date and time (in nanoseconds) when proposal was submitted to the network

terms ProposalTerms

Proposal configuration and the actual change that is meant to be executed when proposal is enacted

reason ProposalError

A reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses

error_details string

The detailed error associated to the reason.

rationale ProposalRationale

The rationale behind a proposal.

ProposalRationale

The rationale behind a proposal.

FieldTypeLabelDescription
description string

Description to show a short title / something in case the link goes offline. This is to be between 0 and 1024 unicode characters. This is mandatory for all proposal.

hash string

Cryptographically secure hash (SHA3-512) of the text pointed by the `url` property so that viewers can check that the text hasn't been changed over time. Optional except for FreeFrom proposal where it's mandatory. If set, the `url` property must be set.

url string

Link to a text file describing the proposal in depth. Optional except for FreeFrom proposal where it's mandatory. If set, the `url` property must be set.

ProposalTerms

Terms for a governance proposal on Vega

FieldTypeLabelDescription
closing_timestamp int64

Timestamp (Unix time in seconds) when voting closes for this proposal, constrained by `minClose` and `maxClose` network parameters

enactment_timestamp int64

Timestamp (Unix time in seconds) when proposal gets enacted (if passed), constrained by `minEnact` and `maxEnact` network parameters

validation_timestamp int64

Validation timestamp (Unix time in seconds)

update_market UpdateMarket

Proposal change for modifying an existing market on Vega

new_market NewMarket

Proposal change for creating new market on Vega

update_network_parameter UpdateNetworkParameter

Proposal change for updating Vega network parameters

new_asset NewAsset

Proposal change for creating new assets on Vega

new_freeform NewFreeform

Proposal change for a freeform voting thing

update_asset UpdateAsset

Proposal change for updating an asset

UpdateAsset

Update an existing asset on Vega

FieldTypeLabelDescription
asset_id string

The asset concerned by the update

changes AssetDetailsUpdate

The changes to apply on an existing asset

UpdateFutureProduct

Future product configuration

FieldTypeLabelDescription
quote_name string

Product quote name

oracle_spec_for_settlement_price oracles.v1.OracleSpecConfiguration

The oracle spec describing the oracle data of settlement price

oracle_spec_for_trading_termination oracles.v1.OracleSpecConfiguration

The oracle spec describing the oracle data of trading termination

oracle_spec_binding OracleSpecToFutureBinding

The binding between the oracle spec and the settlement price

settlement_price_decimals uint32

the number of decimal places implied by the settlement price emitted by the settlement oracle

UpdateInstrumentConfiguration

Instrument configuration

FieldTypeLabelDescription
code string

Instrument code

future UpdateFutureProduct

Future

UpdateMarket

Update an existing market on Vega

FieldTypeLabelDescription
market_id string

The market to update

changes UpdateMarketConfiguration

The updated configuration of the market

UpdateMarketConfiguration

Configuration to update a market on Vega

FieldTypeLabelDescription
instrument UpdateInstrumentConfiguration

Updated market instrument configuration

metadata string repeated

Optional market metadata, tags

price_monitoring_parameters PriceMonitoringParameters

Price monitoring parameters

liquidity_monitoring_parameters LiquidityMonitoringParameters

Liquidity monitoring parameters

simple SimpleModelParams

Simple risk model parameters, valid only if MODEL_SIMPLE is selected

log_normal LogNormalRiskModel

Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected

UpdateNetworkParameter

Update network configuration on Vega

FieldTypeLabelDescription
changes NetworkParameter

The network parameter to update

Vote

Governance vote

FieldTypeLabelDescription
party_id string

Voter's party identifier

value Vote.Value

Actual vote

proposal_id string

Identifier of the proposal being voted on

timestamp int64

Vote timestamp for date and time (in nanoseconds) when vote was submitted to the network

total_governance_token_balance string

Total number of governance token for the party that casted the vote

total_governance_token_weight string

The weight of this vote based on the total of governance token

total_equity_like_share_weight string

The weight of the vote compared to the total number of equity-like share on the market.

Proposal.State

Proposal state transition:

Open ->

- Passed -> Enacted.

- Passed -> Failed.

- Declined

Rejected

Proposal can enter Failed state from any other state

NameNumberDescription
STATE_UNSPECIFIED 0

Default value, always invalid

STATE_FAILED 1

Proposal enactment has failed - even though proposal has passed, its execution could not be performed

STATE_OPEN 2

Proposal is open for voting

STATE_PASSED 3

Proposal has gained enough support to be executed

STATE_REJECTED 4

Proposal wasn't accepted (proposal terms failed validation due to wrong configuration or failing to meet network requirements)

STATE_DECLINED 5

Proposal didn't get enough votes (either failing to gain required participation or majority level)

STATE_ENACTED 6

Proposal enacted

STATE_WAITING_FOR_NODE_VOTE 7

Waiting for node validation of the proposal

ProposalError

A list of possible errors that can cause a proposal to be in state rejected or failed

NameNumberDescription
PROPOSAL_ERROR_UNSPECIFIED 0

Default value

PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON 1

The specified close time is too early base on network parameters

PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE 2

The specified close time is too late based on network parameters

PROPOSAL_ERROR_ENACT_TIME_TOO_SOON 3

The specified enact time is too early based on network parameters

PROPOSAL_ERROR_ENACT_TIME_TOO_LATE 4

The specified enact time is too late based on network parameters

PROPOSAL_ERROR_INSUFFICIENT_TOKENS 5

The proposer for this proposal as insufficient tokens

PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY 6

The instrument quote name and base name were the same

PROPOSAL_ERROR_NO_PRODUCT 7

The proposal has no product

PROPOSAL_ERROR_UNSUPPORTED_PRODUCT 8

The specified product is not supported

PROPOSAL_ERROR_NO_TRADING_MODE 11

The proposal has no trading mode

PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE 12

The proposal has an unsupported trading mode

PROPOSAL_ERROR_NODE_VALIDATION_FAILED 13

The proposal failed node validation

PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD 14

A field is missing in a builtin asset source

PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS 15

The contract address is missing in the ERC20 asset source

PROPOSAL_ERROR_INVALID_ASSET 16

The asset identifier is invalid or does not exist on the Vega network

PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS 17

Proposal terms timestamps are not compatible (Validation < Closing < Enactment)

PROPOSAL_ERROR_NO_RISK_PARAMETERS 18

No risk parameters were specified

PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY 19

Invalid key in update network parameter proposal

PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE 20

Invalid valid in update network parameter proposal

PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED 21

Validation failed for network parameter proposal

PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL 22

Opening auction duration is less than the network minimum opening auction time

PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE 23

Opening auction duration is more than the network minimum opening auction time

PROPOSAL_ERROR_MARKET_MISSING_LIQUIDITY_COMMITMENT 24

Market proposal is missing a liquidity commitment

PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET 25

Market proposal market could not be instantiate in execution

PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT 26

Market proposal market contained invalid product definition

PROPOSAL_ERROR_MISSING_COMMITMENT_AMOUNT 27

Market proposal is missing commitment amount

PROPOSAL_ERROR_INVALID_FEE_AMOUNT 28

Market proposal have invalid fee

PROPOSAL_ERROR_INVALID_SHAPE 29

Market proposal have invalid shape

PROPOSAL_ERROR_INVALID_RISK_PARAMETER 30

Market proposal invalid risk parameter

PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED 31

Proposal was declined because vote didn't reach the majority threshold required

PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED 32

Proposal declined because the participation threshold was not reached

PROPOSAL_ERROR_INVALID_ASSET_DETAILS 33

Asset proposal invalid asset details

PROPOSAL_ERROR_UNKNOWN_TYPE 34

Proposal is an unknown type.

PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE 35

Proposal has an unknown risk parameter type.

PROPOSAL_ERROR_INVALID_FREEFORM 36

Validation failed for freeform proposal.

PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE 37

The party doesn't have enough equity-like share to propose an update on the market targeted by the proposal.

PROPOSAL_ERROR_INVALID_MARKET 38

The market targeted by the proposal does not exist or is not eligible to modification.

PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES 39

The market proposal decimal place is higher to the market settlement asset decimal places

PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS 40

The market proposal contains too many price monitoring triggers

Vote.Value

Vote value

NameNumberDescription
VALUE_UNSPECIFIED 0

Default value, always invalid

VALUE_NO 1

A vote against the proposal

VALUE_YES 2

A vote in favour of the proposal

vega/oracles/v1/data.proto

Top

OracleData

OracleData describes valid oracle data that has been received by the node.

It represents both matched and unmatched oracle data.

FieldTypeLabelDescription
pub_keys string repeated

pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys.

data Property repeated

data holds all the properties of the oracle data

matched_spec_ids string repeated

matched_specs_ids lists all the oracle specs that matched this oracle data. When the array is empty, it means no oracle spec matched this oracle data.

broadcast_at int64

broadcast_at is the time at which the data was broadcast to the markets with a matching oracle spec. It has no value when the oracle date did not match any oracle spec. The value is a Unix timestamp in nanoseconds.

Property

Property describes one property of an oracle spec with a key with its value.

FieldTypeLabelDescription
name string

name is the name of the property.

value string

value is the value of the property.

vega/commands/v1/commands.proto

Top

CancelTransfer

A request for cancelling a recurring transfer

FieldTypeLabelDescription
transfer_id string

The ID of the transfer to cancel

DelegateSubmission

A command to submit an instruction to delegate some stake to a node

FieldTypeLabelDescription
node_id string

The ID for the node to delegate to

amount string

The amount of stake to delegate

Int64Value

Replacement for the google well-known type until we can get rid of this

entirely

FieldTypeLabelDescription
value int64

LiquidityProvisionAmendment

Amend a liquidity provision request

FieldTypeLabelDescription
market_id string

Unique ID for the market with the liquidity provision to be amended

commitment_amount string

From here at least one of the following is required to consider the command valid an empty strings means no change

fee string

an empty strings means no change

sells vega.LiquidityOrder repeated

empty slice means no change

buys vega.LiquidityOrder repeated

empty slice means no change

reference string

empty string means no change

LiquidityProvisionCancellation

Cancel a liquidity provision request

FieldTypeLabelDescription
market_id string

Unique ID for the market with the liquidity provision to be cancelled

LiquidityProvisionSubmission

A liquidity provision submitted for a given market

FieldTypeLabelDescription
market_id string

Market identifier for the order, required field

commitment_amount string

Specified as a unitless number that represents the amount of settlement asset of the market

fee string

Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers

sells vega.LiquidityOrder repeated

A set of liquidity sell orders to meet the liquidity provision obligation

buys vega.LiquidityOrder repeated

A set of liquidity buy orders to meet the liquidity provision obligation

reference string

A reference to be added to every order created out of this liquidityProvisionSubmission

OneOffTransfer

Specific details for a one off transfer

FieldTypeLabelDescription
deliver_on int64

A unix timestamp in second. Time at which the transfer should be delivered in the to account

OrderAmendment

An order amendment is a request to amend or update an existing order on Vega

The `orderID`, `partyID` and `marketID` fields are used for looking up the order only and cannot be amended by this command

FieldTypeLabelDescription
order_id string

Order identifier, this is required to find the order and will not be updated, required field

market_id string

Market identifier, this is required to find the order and will not be updated

price vega.Price

Amend the price for the order, if the Price value is set, otherwise price will remain unchanged - See [`Price`](#vega.Price)

size_delta int64

Amend the size for the order by the delta specified: - To reduce the size from the current value set a negative integer value - To increase the size from the current value, set a positive integer value - To leave the size unchanged set a value of zero

expires_at vega.Timestamp

Amend the expiry time for the order, if the Timestamp value is set, otherwise expiry time will remain unchanged - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

time_in_force vega.Order.TimeInForce

Amend the time in force for the order, set to TIME_IN_FORCE_UNSPECIFIED to remain unchanged - See [`TimeInForce`](#api.VegaTimeResponse).`timestamp`

pegged_offset string

Amend the pegged order offset for the order

pegged_reference vega.PeggedReference

Amend the pegged order reference for the order - See [`PeggedReference`](#vega.PeggedReference)

OrderCancellation

An order cancellation is a request to cancel an existing order on Vega

FieldTypeLabelDescription
order_id string

Unique identifier for the order (set by the system after consensus), required field

market_id string

Market identifier for the order, required field

OrderSubmission

An order submission is a request to submit or create a new order on Vega

FieldTypeLabelDescription
market_id string

Market identifier for the order, required field

price string

Price for the order, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places, , required field for limit orders, however it is not required for market orders

size uint64

Size for the order, for example, in a futures market the size equals the number of contracts, cannot be negative

side vega.Side

Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field - See `Side`

time_in_force vega.Order.TimeInForce

Time in force indicates how long an order will remain active before it is executed or expires, required field - See `Order.TimeInForce`

expires_at int64

Timestamp for when the order will expire, in nanoseconds since the epoch, required field only for `Order.TimeInForce`.TIME_IN_FORCE_GTT` - See `VegaTimeResponse`.`timestamp`

type vega.Order.Type

Type for the order, required field - See `Order.Type`

reference string

Reference given for the order, this is typically used to retrieve an order submitted through consensus, currently set internally by the node to return a unique reference identifier for the order submission

pegged_order vega.PeggedOrder

Used to specify the details for a pegged order - See `PeggedOrder`

ProposalSubmission

A command to submit a new proposal for the

Vega network governance

FieldTypeLabelDescription
reference string

Proposal reference

terms vega.ProposalTerms

Proposal configuration and the actual change that is meant to be executed when proposal is enacted

rationale vega.ProposalRationale

The rationale behind a proposal.

RecurringTransfer

Specific details for a recurring transfer

FieldTypeLabelDescription
start_epoch uint64

The first epoch from which this transfer shall be paid

end_epoch vega.Uint64Value

The last epoch at which this transfer shall be paid

factor string

factor needs to be > 0

dispatch_strategy vega.DispatchStrategy

optional parameter defining how a transfer is dispatched

RestoreSnapshot

A command that loads the state from a given checkpoint

FieldTypeLabelDescription
data bytes

Transfer

A transfer initiated by a party

FieldTypeLabelDescription
from_account_type vega.AccountType

The account type from which the funds of the party should be taken

to string

The public key of the destination account

to_account_type vega.AccountType

The type of the destination account

asset string

The asset

amount string

The amount to be taken from the source account

reference string

The reference to be attached to the transfer

one_off OneOffTransfer

recurring RecurringTransfer

UndelegateSubmission

FieldTypeLabelDescription
node_id string

amount string

optional, if not specified = ALL

method UndelegateSubmission.Method

VoteSubmission

A command to submit a new vote for a governance

proposal.

FieldTypeLabelDescription
proposal_id string

The ID of the proposal to vote for.

value vega.Vote.Value

The actual value of the vote

WithdrawSubmission

Represents the submission request to withdraw funds for a party on Vega

FieldTypeLabelDescription
amount string

The amount to be withdrawn

asset string

The asset to be withdrawn

ext vega.WithdrawExt

Foreign chain specifics

UndelegateSubmission.Method

NameNumberDescription
METHOD_UNSPECIFIED 0

METHOD_NOW 1

METHOD_AT_END_OF_EPOCH 2

METHOD_IN_ANGER 3

vega/commands/v1/oracles.proto

Top

OracleDataSubmission

Command to submit new Oracle data from third party providers

FieldTypeLabelDescription
source OracleDataSubmission.OracleSource

The source from which the data is coming from

payload bytes

The data provided by the third party provider

OracleDataSubmission.OracleSource

The supported Oracle sources

NameNumberDescription
ORACLE_SOURCE_UNSPECIFIED 0

The default value

ORACLE_SOURCE_OPEN_ORACLE 1

Support for Open Oracle standard

ORACLE_SOURCE_JSON 2

Support for custom JSON data

vega/chain_events.proto

Top

BuiltinAssetDeposit

A deposit for a Vega built-in asset

FieldTypeLabelDescription
vega_asset_id string

A Vega network internal asset identifier

party_id string

A Vega party identifier (pub-key)

amount string

The amount to be deposited

BuiltinAssetEvent

An event related to a Vega built-in asset

FieldTypeLabelDescription
deposit BuiltinAssetDeposit

Built-in asset deposit

withdrawal BuiltinAssetWithdrawal

Built-in asset withdrawal

BuiltinAssetWithdrawal

A withdrawal for a Vega built-in asset

FieldTypeLabelDescription
vega_asset_id string

A Vega network internal asset identifier

party_id string

A Vega network party identifier (pub-key)

amount string

The amount to be withdrawn

ERC20AssetDelist

An asset deny-listing for an ERC20 token

FieldTypeLabelDescription
vega_asset_id string

The Vega network internal identifier of the asset

ERC20AssetLimitsUpdated

FieldTypeLabelDescription
vega_asset_id string

The Vega network internal identifier of the asset

source_ethereum_address string

The Ethereum wallet that initiated the deposit

lifetime_limits string

The updated lifetime limits

withdraw_threshold string

The updated withdraw threshold

ERC20AssetList

An asset allow-listing for an ERC20 token

FieldTypeLabelDescription
vega_asset_id string

The Vega network internal identifier of the asset

ERC20Deposit

An asset deposit for an ERC20 token

FieldTypeLabelDescription
vega_asset_id string

The vega network internal identifier of the asset

source_ethereum_address string

The Ethereum wallet that initiated the deposit

target_party_id string

The Vega party identifier (pub-key) which is the target of the deposit

amount string

The amount to be deposited

ERC20Event

An event related to an ERC20 token

FieldTypeLabelDescription
index uint64

Index of the log in the transaction

block uint64

The block in which the transaction was added

asset_list ERC20AssetList

List an ERC20 asset

asset_delist ERC20AssetDelist

De-list an ERC20 asset

deposit ERC20Deposit

Deposit ERC20 asset

withdrawal ERC20Withdrawal

Withdraw ERC20 asset

asset_limits_updated ERC20AssetLimitsUpdated

Update an ERC20 asset

ERC20MultiSigEvent

An event related to the ERC20 MultiSig

FieldTypeLabelDescription
index uint64

Index of the log in the transaction

block uint64

The block in which the transaction was added

signer_added ERC20SignerAdded

Add a signer to the erc20 bridge

signer_removed ERC20SignerRemoved

Remove a signer from the erc20 bridge

threshold_set ERC20ThresholdSet

Threshold set

ERC20SignerAdded

A new signer added to the ERC20 bridge

FieldTypeLabelDescription
new_signer string

The ethereum address of the new signer

nonce string

The nonce create by the vega network used for this new signer

block_time int64

The time at which the block was produced will be used to inform the core at what time the stake was made unavailable.

ERC20SignerRemoved

A signer removed from the ERC20 bridge

FieldTypeLabelDescription
old_signer string

The ethereum address of the old signer

nonce string

The nonce create by the vega network used for this old signer

block_time int64

The time at which the block was produced will be used to inform the core at what time the stake was made unavailable.

ERC20ThresholdSet

The threshold have been updated on the multisigcontrol

FieldTypeLabelDescription
new_threshold uint32

The new threshold

nonce string

The nonce create by the vega network

block_time int64

The time at which the block was produced will be used to inform the core at what time the stake was made unavailable.

ERC20Withdrawal

An asset withdrawal for an ERC20 token

FieldTypeLabelDescription
vega_asset_id string

The Vega network internal identifier of the asset

target_ethereum_address string

The target Ethereum wallet address

reference_nonce string

The reference nonce used for the transaction

StakeDeposited

FieldTypeLabelDescription
ethereum_address string

Ethereum Address of the user depositing stake (hex encode with 0x prefix)

vega_public_key string

The public of the party receiving the stake deposit (hex encode)

amount string

The amount deposited (base 10)

block_time int64

The time at which the block was produced will be used to inform the core at what time the stake started to be available.

StakeRemoved

FieldTypeLabelDescription
ethereum_address string

Ethereum address of the user removing stake (hex encode with 0x prefix)

vega_public_key string

The public key of the party from which to remove stake (hex encode)

amount string

The amount removed (base 10)

block_time int64

The time at which the block was produced will be used to inform the core at what time the stake was made unavailable.

StakeTotalSupply

FieldTypeLabelDescription
token_address string

The address of the staking asset

total_supply string

The total supply observed for the token

StakingEvent

FieldTypeLabelDescription
index uint64

Index of the log in the transaction

block uint64

The block in which the transaction was added

stake_deposited StakeDeposited

stake_removed StakeRemoved

total_supply StakeTotalSupply

vega/commands/v1/signature.proto

Top

Signature

A signature to authenticate a transaction and to be verified by the Vega

network.

FieldTypeLabelDescription
value string

The bytes of the signature (hex-encoded).

algo string

The algorithm used to create the signature.

version uint32

The version of the signature used to create the signature.

vega/commands/v1/validator_commands.proto

Top

AnnounceNode

Used announce a node as a new potential validator

FieldTypeLabelDescription
vega_pub_key string

Vega public key, required field

ethereum_address string

Ethereum public key, required field

chain_pub_key string

Public key for the blockchain, required field

info_url string

URL with more info on the node

country string

Country code (ISO 3166-1 alpha-2) for the location of the node

id string

ID of the validator, (public master key)

name string

Name of the validator

avatar_url string

AvatarURL of the validator

vega_pub_key_index uint32

Vega public key derivation index

from_epoch uint64

The epoch from which the validator is expected to be ready to validate blocks

ethereum_signature Signature

Signature from the validator made using the ethereum wallet

vega_signature Signature

Signature from the validator made using the vega wallet

ChainEvent

An event forwarded to the Vega network to provide information on events happening on other networks

FieldTypeLabelDescription
tx_id string

The identifier of the transaction in which the events happened, usually a hash

nonce uint64

Arbitrary one-time integer used to prevent replay attacks

builtin vega.BuiltinAssetEvent

Built-in asset event

erc20 vega.ERC20Event

Ethereum ERC20 event

staking_event vega.StakingEvent

Ethereum Staking event

erc20_multisig vega.ERC20MultiSigEvent

Ethereum ERC20 multisig event

EthereumKeyRotateSubmission

A transaction to allow validator to rotate their ethereum keys

FieldTypeLabelDescription
target_block uint64

Target block at which the key rotation will take effect on

new_address string

The new adress to rotate to

current_address string

Currently used public address

KeyRotateSubmission

A transaction to allow validator to rotate their vega keys

FieldTypeLabelDescription
new_pub_key_index uint32

New Vega public key derivation index

target_block uint64

Target block at which the key rotation will take effect on

new_pub_key string

The new public key to rotate to

current_pub_key_hash string

Hash of currently used public key

NodeSignature

Represents a signature from a validator, to be used by a foreign chain in order to recognise a decision taken by the Vega network

FieldTypeLabelDescription
id string

The identifier of the resource being signed

sig bytes

The signature

kind NodeSignatureKind

The kind of resource being signed

NodeVote

Used when a node votes for validating a given resource exists or is valid,

for example, an ERC20 deposit is valid and exists on ethereum

FieldTypeLabelDescription
reference string

Reference, required field

StateVariableProposal

FieldTypeLabelDescription
proposal vega.StateValueProposal

The state value proposal details

ValidatorHeartbeat

A message from a validator signaling they are still online and validating blocks

or ready to validate block when they are till a potential validator

FieldTypeLabelDescription
node_id string

the id of the node emitting the heartbeat

ethereum_signature Signature

Signature from the validator made using the ethereum wallet

vega_signature Signature

Signature from the validator made using the vega wallet

NodeSignatureKind

The kind of the signature created by a node, for example, allow-listing a new asset, withdrawal etc

NameNumberDescription
NODE_SIGNATURE_KIND_UNSPECIFIED 0

Represents an unspecified or missing value from the input

NODE_SIGNATURE_KIND_ASSET_NEW 1

Represents a signature for a new asset allow-listing

NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL 2

Represents a signature for an asset withdrawal

NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_ADDED 3

Represents a signature for a new signer added to the erc20 multisig contract

NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_REMOVED 4

Represents a signature for a signer removed from the erc20 multisig contract

NODE_SIGNATURE_KIND_ASSET_UPDATE 5

Represents a signature for an asset update allow-listing

vega/events/v1/events.proto

Top

AuctionEvent

An auction event indicating a change in auction state, for example starting or ending an auction

FieldTypeLabelDescription
market_id string

Market identifier for the event

opening_auction bool

True if the event indicates an auction opening and False otherwise

leave bool

True if the event indicates leaving auction mode and False otherwise

start int64

Timestamp containing the start time for an auction

end int64

Timestamp containing the end time for an auction

trigger vega.AuctionTrigger

the reason this market is/was in auction

extension_trigger vega.AuctionTrigger

If an auction was ongoing, but was extended for whatever reason, this field will be set to the trigger type indicating which component extended the auction

BusEvent

A bus event is a container for event bus events emitted by Vega

FieldTypeLabelDescription
id string

A unique event identifier for the message

block string

The batch (or block) of transactions that the events relate to

type BusEventType

The type of bus event (one of the list below)

time_update TimeUpdate

Time update events - See [TimeUpdate](#vega.TimeUpdate)

transfer_responses TransferResponses

Transfer responses update events - See [TransferResponses](#vega.TransferResponses)

position_resolution PositionResolution

Position resolution events - See [PositionResolution](#vega.PositionResolution)

order vega.Order

Order events

account vega.Account

Account events

party vega.Party

Party events

trade vega.Trade

Trade events

margin_levels vega.MarginLevels

Margin level update events

proposal vega.Proposal

Proposal events (for governance)

vote vega.Vote

Vote events (for governance)

market_data vega.MarketData

Market data events

node_signature vega.commands.v1.NodeSignature

Node signature events

loss_socialization LossSocialization

Loss socialization events - See [LossSocialization](#vega.LossSocialization)

settle_position SettlePosition

Position settlement events - See [SettlePosition](#vega.SettlePosition)

settle_distressed SettleDistressed

Position distressed events - See [SettleDistressed](#vega.SettleDistressed)

market_created vega.Market

Market created events

asset vega.Asset

Asset events

market_tick MarketTick

Market tick events - See [MarketTick](#vega.MarketTick)

withdrawal vega.Withdrawal

Withdrawal events

deposit vega.Deposit

Deposit events

auction AuctionEvent

Auction events - See [AuctionEvent](#vega.AuctionEvent)

risk_factor vega.RiskFactor

Risk factor events

network_parameter vega.NetworkParameter

Network parameter events

liquidity_provision vega.LiquidityProvision

LiquidityProvision events

market_updated vega.Market

Market created events

oracle_spec oracles.v1.OracleSpec

OracleSpec events

oracle_data oracles.v1.OracleData

OracleData events

delegation_balance DelegationBalanceEvent

Delegation balance events

validator_score ValidatorScoreEvent

Validator score calculated

epoch_event EpochEvent

Epoch update events - See [Epoch](#vega.Epoch)

validator_update ValidatorUpdate

Validator update events

stake_linking StakeLinking

Staking event

reward_payout RewardPayoutEvent

Reward payout event

checkpoint CheckpointEvent

Checkpoint was created

key_rotation KeyRotation

Key rotation took place

state_var StateVar

State variable consensus state transition update

network_limits vega.NetworkLimits

Network limits events

transfer Transfer

Transfer event

ranking_event ValidatorRankingEvent

Ranking event

erc20_multisig_signer_event ERC20MultiSigSignerEvent

ERC20 multi sig signer event

erc20_multisig_set_threshold_event ERC20MultiSigThresholdSetEvent

ERC20 multi sig set threshold event

erc20_multisig_signer_added ERC20MultiSigSignerAdded

ERC20 multi sig signer added

erc20_multisig_signer_removed ERC20MultiSigSignerRemoved

ERC20 multi sig signer removed

position_state_event PositionStateEvent

Position status for a party in a market

ethereum_key_rotation EthereumKeyRotation

Ethereum key rotation took place

market MarketEvent

Market tick events - See [MarketEvent](#vega.MarketEvent)

tx_err_event TxErrorEvent

Transaction error events, not included in the ALL event type

version uint32

Version of bus event

chain_id string

tx_hash string

CheckpointEvent

FieldTypeLabelDescription
hash string

block_hash string

block_height uint64

DelegationBalanceEvent

DelegationBalanceEvent - updates on the delegation balance of a party to a node in the current epoch in effect

FieldTypeLabelDescription
party string

node_id string

amount string

epoch_seq string

ERC20MulistSigSignerRemovedSubmitter

FieldTypeLabelDescription
signature_id string

The ID of this signature bundle

submitter string

The address of the submitter of the transaction

ERC20MultiSigSignerAdded

FieldTypeLabelDescription
signature_id string

The identifier of the signature bundle

validator_id string

The vega node ID of the node to be added

timestamp int64

the time at which this happened

new_signer string

The ethereum address of the new signer

submitter string

The address of the submitter of the transaction

nonce string

The nonce used.

epoch_seq string

The epoch that the node was added for

ERC20MultiSigSignerEvent

FieldTypeLabelDescription
id string

type ERC20MultiSigSignerEvent.Type

signer string

nonce string

block_time int64

tx_hash string

log_index uint64

block_number uint64

ERC20MultiSigSignerRemoved

FieldTypeLabelDescription
signature_submitters ERC20MulistSigSignerRemovedSubmitter repeated

A list containing all the IDs of bundle generated There should be one bundle generated for every validators in the validator set

validator_id string

The vega node ID of the node which is to be removed

timestamp int64

the time at which this happened

old_signer string

The ethereum address of the signer to be removed

nonce string

The nonce used.

epoch_seq string

The epoch that the node was removed for

ERC20MultiSigThresholdSetEvent

FieldTypeLabelDescription
id string

new_threshold uint32

nonce string

block_time int64

tx_hash string

log_index uint64

block_number uint64

EpochEvent

Epoch details

FieldTypeLabelDescription
seq uint64

Sequence number that increases by one each epoch

action vega.EpochAction

Action tells us what action is taking place

start_time int64

What time did this epoch start

expire_time int64

What time should this epoch end

end_time int64

What time did it actually end

EthereumKeyRotation

An Ethereum key rotation events contains information about Ethereum key rotation

FieldTypeLabelDescription
node_id string

Node id of the node

old_address string

Old Ethereum address of validator node

new_address string

New Ethereum address of validator node

block_height uint64

Height of the block where key rotation took effect

KeyRotation

A key rotation events contains information about Vega key rotation

FieldTypeLabelDescription
node_id string

Node id of the node

old_pub_key string

Old Vega public key of validator node

new_pub_key string

New Vega public key of validator node

block_height uint64

Height of the block where key rotation took effect

LossSocialization

A loss socialization event contains details on the amount of wins unable to be distributed

FieldTypeLabelDescription
market_id string

Market identifier for the event

party_id string

Party identifier (public key) for the event

amount string

Amount distributed

MarketEvent

MarketEvent - the common denominator for all market events

interface has a method to return a string for logging

FieldTypeLabelDescription
market_id string

Market identifier for the event

payload string

Payload is a unique information string

MarketTick

A market ticket event contains the time value for when a particular market was last processed on Vega

FieldTypeLabelDescription
id string

Market identifier for the event

time int64

Timestamp containing latest update from Vega blockchain aka Vega-time

OneOffTransfer

FieldTypeLabelDescription
deliver_on int64

PositionResolution

A position resolution event contains information on distressed trades

FieldTypeLabelDescription
market_id string

Market identifier for the event

distressed int64

Number of distressed traders

closed int64

Number of close outs

mark_price string

Mark price as a string representing a scaled price

PositionStateEvent

A position state event contains the current position state for a single party in a single market

FieldTypeLabelDescription
party_id string

Party identifier for this position update

market_id string

Market identifier for this position update

size int64

Current position

potential_buys int64

Potential orders

potential_sells int64

vw_buy_price string

Volume weighted prices

vw_sell_price string

RecurringTransfer

FieldTypeLabelDescription
start_epoch uint64

end_epoch vega.Uint64Value

factor string

dispatch_strategy vega.DispatchStrategy

RewardPayoutEvent

FieldTypeLabelDescription
party string

epoch_seq string

asset string

amount string

percent_of_total_reward string

timestamp int64

reward_type string

market string

SettleDistressed

A settle distressed event contains information on distressed trading parties who are closed out

Note: Any PositionResolution event (market level) will most likely be followed by a number of these events

FieldTypeLabelDescription
market_id string

Market identifier for the event

party_id string

Party identifier (public key) for the event

margin string

Margin value as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

price string

Price as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places

SettlePosition

A settle position event contains position settlement information for a party

FieldTypeLabelDescription
market_id string

Market identifier for the event

party_id string

Party identifier (public key) for the event

price string

Price of settlement as a string

trade_settlements TradeSettlement repeated

A collection of 1 or more trade settlements

position_factor string

Position factor - 10 ^ number of position decimal places

StakeLinking

StakeLinking - an event notifying of stake being deposited or removed for a given party

These events are emitted for every Staking deposit or removed accepted by the network

FieldTypeLabelDescription
id string

The internal ID for this staking event

type StakeLinking.Type

The type of event

ts int64

The timestamps at which the event was emitted by ethereum

party string

The party to whom the event is directed at.

amount string

The amount of stake deposited or removed

status StakeLinking.Status

The status of the event

finalized_at int64

The time at which the vega network finalized the state of the event

tx_hash string

The hash of the transaction from which the events happen

block_height uint64

The block when the event happened

block_time int64

The block time

log_index uint64

The log index

ethereum_address string

the ethereum address from which the stake link was iniated

StateVar

StateVarEvent - updates on state changes in state variable consensus

FieldTypeLabelDescription
id string

event_id string

state string

StreamStartEvent

FieldTypeLabelDescription
chain_id string

TimeUpdate

A time update event contains the latest time update from Vega blockchain and indicates the start of a new block

FieldTypeLabelDescription
timestamp int64

Timestamp containing latest update from Vega blockchain aka Vega-time

TradeSettlement

A trade settlement is part of the settle position event

FieldTypeLabelDescription
size int64

Size of trade settlement

price string

Price of settlement as string

Transfer

FieldTypeLabelDescription
id string

from string

from_account_type vega.AccountType

to string

to_account_type vega.AccountType

asset string

amount string

reference string

status Transfer.Status

timestamp int64

one_off OneOffTransfer

recurring RecurringTransfer

TransferResponses

A transfer responses event contains a collection of transfer information

FieldTypeLabelDescription
responses vega.TransferResponse repeated

One or more entries containing internal transfer information

TxErrorEvent

FieldTypeLabelDescription
party_id string

Unique party identifier for the related party

err_msg string

An error message describing what went wrong

order_submission vega.commands.v1.OrderSubmission

order_amendment vega.commands.v1.OrderAmendment

order_cancellation vega.commands.v1.OrderCancellation

proposal vega.commands.v1.ProposalSubmission

vote_submission vega.commands.v1.VoteSubmission

liquidity_provision_submission vega.commands.v1.LiquidityProvisionSubmission

withdraw_submission vega.commands.v1.WithdrawSubmission

delegate_submission vega.commands.v1.DelegateSubmission

undelegate_submission vega.commands.v1.UndelegateSubmission

restore_snapshot vega.commands.v1.RestoreSnapshot

liquidity_provision_cancellation vega.commands.v1.LiquidityProvisionCancellation

liquidity_provision_amendment vega.commands.v1.LiquidityProvisionAmendment

transfer vega.commands.v1.Transfer

cancel_transfer vega.commands.v1.CancelTransfer

announce_node vega.commands.v1.AnnounceNode

oracle_data_submission vega.commands.v1.OracleDataSubmission

ValidatorRankingEvent

An event that explains the status of the validator for the coming epoch

FieldTypeLabelDescription
node_id string

stake_score string

stake based score - no anti-whaling

performance_score string

performance base score

ranking_score string

final score

previous_status string

the status of the validator in the previous epoch

next_status string

the status of the validator in the next epoch

epoch_seq string

the epoch seq for which the status is valid

tm_voting_power uint32

tendermint voting power of the validator

ValidatorScoreEvent

ValidatorScoreEvent is the score a validator gets for a given epoch

FieldTypeLabelDescription
node_id string

epoch_seq string

validator_score string

normalised_score string

validator_performance string

raw_validator_score string

validator_status string

multisig_score string

ValidatorUpdate

A validator update event contains information about validator node

FieldTypeLabelDescription
node_id string

Node id of the node

vega_pub_key string

Vega public key of validator node

ethereum_address string

Ethereum public key of validator node

tm_pub_key string

Public key of Tendermint

info_url string

URL with more info on the node

country string

Country code (ISO 3166-1 alpha-2) for the location of the node

name string

Name of the validator

avatar_url string

AvatarURL of the validator

vega_pub_key_index uint32

Vega public key derivation index

added bool

Flag indicating if the validator has been added to or removed from vega

from_epoch uint64

The epoch from which the validator was added or removed

BusEventType

An (event) bus event type is used to specify a type of event

It has 2 styles of event:

Single values (e.g. BUS_EVENT_TYPE_ORDER) where they represent one data item

Group values (e.g. BUS_EVENT_TYPE_AUCTION) where they represent a group of data items

NameNumberDescription
BUS_EVENT_TYPE_UNSPECIFIED 0

Default value, always invalid

BUS_EVENT_TYPE_ALL 1

Events of ALL event types, used when filtering stream from event bus

BUS_EVENT_TYPE_TIME_UPDATE 2

Event for blockchain time updates

BUS_EVENT_TYPE_TRANSFER_RESPONSES 3

Event for when a transfer happens internally, contains the transfer information

BUS_EVENT_TYPE_POSITION_RESOLUTION 4

Event indicating position resolution has occurred

BUS_EVENT_TYPE_ORDER 5

Event for order updates, both new and existing orders

BUS_EVENT_TYPE_ACCOUNT 6

Event for account updates

BUS_EVENT_TYPE_PARTY 7

Event for party updates

BUS_EVENT_TYPE_TRADE 8

Event indicating a new trade has occurred

BUS_EVENT_TYPE_MARGIN_LEVELS 9

Event indicating margin levels have changed for a party

BUS_EVENT_TYPE_PROPOSAL 10

Event for proposal updates (for governance)

BUS_EVENT_TYPE_VOTE 11

Event indicating a new vote has occurred (for governance)

BUS_EVENT_TYPE_MARKET_DATA 12

Event for market data updates

BUS_EVENT_TYPE_NODE_SIGNATURE 13

Event for a new signature for a Vega node

BUS_EVENT_TYPE_LOSS_SOCIALIZATION 14

Event indicating loss socialisation occurred for a party

BUS_EVENT_TYPE_SETTLE_POSITION 15

Event for when a position is being settled

BUS_EVENT_TYPE_SETTLE_DISTRESSED 16

Event for when a position is distressed

BUS_EVENT_TYPE_MARKET_CREATED 17

Event indicating a new market was created

BUS_EVENT_TYPE_ASSET 18

Event for when an asset is added to Vega

BUS_EVENT_TYPE_MARKET_TICK 19

Event indicating a market tick event

BUS_EVENT_TYPE_WITHDRAWAL 20

Event for when a withdrawal occurs

BUS_EVENT_TYPE_DEPOSIT 21

Event for when a deposit occurs

BUS_EVENT_TYPE_AUCTION 22

Event indicating a change in auction state, for example starting or ending an auction

BUS_EVENT_TYPE_RISK_FACTOR 23

Event indicating a risk factor has been updated

BUS_EVENT_TYPE_NETWORK_PARAMETER 24

Event indicating a network parameter has been added or updated

BUS_EVENT_TYPE_LIQUIDITY_PROVISION 25

Event indicating a liquidity provision has been created or updated

BUS_EVENT_TYPE_MARKET_UPDATED 26

Event indicating a new market was created

BUS_EVENT_TYPE_ORACLE_SPEC 27

Event indicating an oracle spec has been created or updated

BUS_EVENT_TYPE_ORACLE_DATA 28

Event indicating that an oracle data has been broadcast

BUS_EVENT_TYPE_DELEGATION_BALANCE 29

Event indicating that an delegation balance of a party to a node for current epoch has changed

BUS_EVENT_TYPE_VALIDATOR_SCORE 30

Event indicating the validator score for the given epoch

BUS_EVENT_TYPE_EPOCH_UPDATE 31

Event indicating the start or end of an epoch

BUS_EVENT_TYPE_VALIDATOR_UPDATE 32

Event indicating that validator node has been updated

BUS_EVENT_TYPE_STAKE_LINKING 33

Event indicating a new staking event have been processed by the network

BUS_EVENT_TYPE_REWARD_PAYOUT_EVENT 34

Event indicating the payout of a reward has been initiated

BUS_EVENT_TYPE_CHECKPOINT 35

Event indicating a new checkpoint was created

BUS_EVENT_TYPE_STREAM_START 36

Event indicating stream is starting

BUS_EVENT_TYPE_KEY_ROTATION 37

Event indicating key rotation took place

BUS_EVENT_TYPE_STATE_VAR 38

Event indicating state transitions in state variable consensus

BUS_EVENT_TYPE_NETWORK_LIMITS 39

Event indicating network limits set or updated

BUS_EVENT_TYPE_TRANSFER 40

Event indicating a update for a transfert

BUS_EVENT_TYPE_VALIDATOR_RANKING 41

Event indicating the ranking of validator and their status in vega

BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_EVENT 42

Event indicating a new multi sig signer event have been processed

BUS_EVENT_TYPE_ERC20_MULTI_SIG_SET_THRESHOLD 43

Event indicating the erc20 multi sig threshold have been updated

BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_ADDED 44

Event indicating a new signer has been added to the erc20 multisig

BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_REMOVED 45

Event indicating a signer has been removed from the erc20 multisig

BUS_EVENT_TYPE_POSITION_STATE 46

Event indicting that a party's position has changed

BUS_EVENT_TYPE_ETHEREUM_KEY_ROTATION 47

Event indicating Ethereum key rotation took place

BUS_EVENT_TYPE_MARKET 101

Event indicating a market related event, for example when a market opens

BUS_EVENT_TYPE_TX_ERROR 201

Event used to report failed transactions back to a user, this is excluded from the ALL type

ERC20MultiSigSignerEvent.Type

NameNumberDescription
TYPE_UNSPECIFIED 0

TYPE_ADDED 1

TYPE_REMOVED 2

StakeLinking.Status

NameNumberDescription
STATUS_UNSPECIFIED 0

Default value

STATUS_PENDING 1

Indicate an event waiting for confirmation from the vega network

STATUS_ACCEPTED 2

Indicate of an event accepted by the vega network

STATUS_REJECTED 3

Indaicate of an event rejected by the vega network

StakeLinking.Type

NameNumberDescription
TYPE_UNSPECIFIED 0

Default value

TYPE_LINK 1

Indicate of a stake deposit instruction

TYPE_UNLINK 2

Indicate of a stake remove instruction

Transfer.Status

NameNumberDescription
STATUS_UNSPECIFIED 0

Default value

STATUS_PENDING 1

Indicate a transfer still being processed

STATUS_DONE 2

Indicate of an transfer accepted by the vega network

STATUS_REJECTED 3

Indicate of an transfer rejected by the vega network

STATUS_STOPPED 4

Indicate of a transfer stopped by the vega network e.g: no funds left to cover the transfer

STATUS_CANCELLED 5

Indicate of a transfer cancel by the user

data-node/api/v1/trading_data.proto

Top

AccountsSubscribeRequest

Request to subscribe to a stream of (Accounts)[#vega.Account]

FieldTypeLabelDescription
market_id string

Market identifier

party_id string

Party identifier

asset string

Asset identifier

type vega.AccountType

Account type to subscribe to, required field

AccountsSubscribeResponse

FieldTypeLabelDescription
account vega.Account

AssetByIDRequest

Request for an asset given an asset identifier

FieldTypeLabelDescription
id string

Asset identifier, required field

AssetByIDResponse

Response for an asset given an asset identifier

FieldTypeLabelDescription
asset vega.Asset

An asset record, if found

AssetsRequest

Request for a list of all assets enabled on Vega

AssetsResponse

Response for a list of all assets enabled on Vega

FieldTypeLabelDescription
assets vega.Asset repeated

A list of 0 or more assets

CandlesRequest

Request for a list of candles for a market at an interval

FieldTypeLabelDescription
market_id string

Market identifier, required field.

since_timestamp int64

Timestamp to retrieve candles since, in nanoseconds since the epoch, required field - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

interval vega.Interval

Time interval for the candles, required field

CandlesResponse

Response for a list of candles for a market at an interval

FieldTypeLabelDescription
candles vega.Candle repeated

A list of 0 or more candles

CandlesSubscribeRequest

Request to subscribe to a stream of (Candles)[#vega.Candle]

FieldTypeLabelDescription
market_id string

Market identifier, required field

interval vega.Interval

Time interval for the candles, required field.

CandlesSubscribeResponse

FieldTypeLabelDescription
candle vega.Candle

Checkpoint

The actual data regarding a checkpoint

FieldTypeLabelDescription
hash string

block_hash string

at_block uint64

CheckpointsRequest

Request to get all checkpoints. Currently no fields, probably will be expanded to allow filtering data

CheckpointsResponse

Response message containing all checkpoints requested

FieldTypeLabelDescription
checkpoints Checkpoint repeated

DelegationsRequest

both fields optional but 1 of them required at least

party = all delegation for a party

node_id = all delegation for a node

party_id + node_id = all delegation for a node for a given party

FieldTypeLabelDescription
party string

node_id string

epoch_seq string

pagination Pagination

Pagination controls

DelegationsResponse

FieldTypeLabelDescription
delegations vega.Delegation repeated

DepositRequest

A request to get a specific deposit by identifier

FieldTypeLabelDescription
id string

The identifier of the deposit

DepositResponse

A response for a deposit

FieldTypeLabelDescription
deposit vega.Deposit

The deposit matching the identifier from the request

DepositsRequest

A request to get a list of deposit from a given party

FieldTypeLabelDescription
party_id string

The party to get the deposits for

DepositsResponse

The response for a list of deposits

FieldTypeLabelDescription
deposits vega.Deposit repeated

The list of deposits for the specified party

ERC20WithdrawalApprovalRequest

The request to get all information required to bundle the call to finalise the withdrawal on the erc20 bridge

FieldTypeLabelDescription
withdrawal_id string

The identifier of the withdrawal

ERC20WithdrawalApprovalResponse

The response with all information required to bundle the call to finalise the withdrawal on the erc20 bridge

function withdraw_asset(address asset_source, uint256 asset_id, uint256 amount, uint256 expiry, uint256 nonce, bytes memory signatures)

FieldTypeLabelDescription
asset_source string

The address of asset on ethereum

amount string

The amount to be withdrawn

expiry int64

The expiry / until what time the request is valid

nonce string

The nonce, which is actually the internal reference for the withdrawal

signatures string

The signatures bundle as hex encoded data, forward by 0x e.g: 0x + sig1 + sig2 + ... + sixN

target_address string

The ethereum address to withdraw the funds to, 0x prefixed

creation int64

The creation timestamps

EstimateFeeRequest

Request to fetch the estimated fee if an order were to trade immediately

FieldTypeLabelDescription
order vega.Order

Order to estimate fees for the following fields in the order are required: MarketID (used to specify the fee factors) Price (the price at which the order could trade) Size (the size at which the order could eventually trade)

EstimateFeeResponse

Response to a EstimateFeeRequest, containing the estimated fees for a given order

FieldTypeLabelDescription
fee vega.Fee

Summary of the estimated fees for this order if it were to trade now

EstimateMarginRequest

Request to fetch the estimated MarginLevels if an order were to trade immediately

FieldTypeLabelDescription
order vega.Order

Order to estimate fees for

EstimateMarginResponse

Response to a EstimateMarginRequest, containing the estimated marginLevels for a given order

FieldTypeLabelDescription
margin_levels vega.MarginLevels

Summary of the estimated margins for this order if it were to trade now

FeeInfrastructureAccountsRequest

Request for a list of infrastructure fee accounts

FieldTypeLabelDescription
asset string

Asset identifier, required field - Set to an empty string to return all accounts - Set to an asset ID to return a single infrastructure fee account for a given asset

FeeInfrastructureAccountsResponse

Response for a list of infrastructure fee accounts

FieldTypeLabelDescription
accounts vega.Account repeated

A list of 0 or more infrastructure fee accounts

GetEpochRequest

FieldTypeLabelDescription
id uint64

Optional - if id omitted it gets the current epoch

GetEpochResponse

FieldTypeLabelDescription
epoch vega.Epoch

GetKeyRotationsByNodeRequest

Request to list all key rotations per node

FieldTypeLabelDescription
node_id string

Required id of node

GetKeyRotationsByNodeResponse

Response with all key rotations per node

FieldTypeLabelDescription
rotations KeyRotation repeated

GetKeyRotationsRequest

Request to list all key rotations

GetKeyRotationsResponse

Response with all key rotations

FieldTypeLabelDescription
rotations KeyRotation repeated

GetNetworkParametersProposalsRequest

Request for a list of network parameter proposals

FieldTypeLabelDescription
select_in_state OptionalProposalState

Optional proposal state

GetNetworkParametersProposalsResponse

Response for a list of network parameter proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetNewAssetProposalsRequest

Request for a list of new asset proposals

FieldTypeLabelDescription
select_in_state OptionalProposalState

Optional proposal state

GetNewAssetProposalsResponse

Response for a list of new asset proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetNewFreeformProposalsRequest

Request for a list of new freeform proposals

FieldTypeLabelDescription
select_in_state OptionalProposalState

Optional proposal state

GetNewFreeformProposalsResponse

Response for a list of new freeform proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetNewMarketProposalsRequest

Request for a list of new market proposals

FieldTypeLabelDescription
select_in_state OptionalProposalState

Optional proposal state

GetNewMarketProposalsResponse

Response for a list of new market proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetNodeByIDRequest

Request to list all nodes

FieldTypeLabelDescription
id string

Required id of node

GetNodeByIDResponse

Response with all nodes

FieldTypeLabelDescription
node vega.Node

GetNodeDataRequest

Request for current Node data

GetNodeDataResponse

Response with node data

FieldTypeLabelDescription
node_data vega.NodeData

GetNodeSignaturesAggregateRequest

Request to specify the identifier of the resource we want to retrieve aggregated signatures for

FieldTypeLabelDescription
id string

Resource identifier, required field

GetNodeSignaturesAggregateResponse

Response to specify the identifier of the resource we want to retrieve aggregated signatures for

FieldTypeLabelDescription
signatures vega.commands.v1.NodeSignature repeated

A list of 0 or more signatures

GetNodesRequest

Request to list all nodes

GetNodesResponse

Response with all nodes

FieldTypeLabelDescription
nodes vega.Node repeated

GetProposalByIDRequest

Request for a governance proposal given a proposal identifier

FieldTypeLabelDescription
proposal_id string

Proposal identifier, required field

GetProposalByIDResponse

Response for a governance proposal given a proposal identifier

FieldTypeLabelDescription
data vega.GovernanceData

Governance data, if found

GetProposalByReferenceRequest

Request for a governance proposal given a proposal reference

FieldTypeLabelDescription
reference string

Proposal reference. Required field

GetProposalByReferenceResponse

Response for a governance proposal given a proposal reference

FieldTypeLabelDescription
data vega.GovernanceData

Governance data, if found

GetProposalsByPartyRequest

Request for a list of proposals for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

select_in_state OptionalProposalState

Optional proposal state

GetProposalsByPartyResponse

Response for a list of proposals for a party

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetProposalsRequest

Request for a list of proposals

FieldTypeLabelDescription
select_in_state OptionalProposalState

Optional proposal state

GetProposalsResponse

Response for a list of proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetRewardSummariesRequest

A request to get reward details for a party

FieldTypeLabelDescription
party_id string

asset_id string

GetRewardSummariesResponse

The return message with reward details in for a single party

FieldTypeLabelDescription
summaries vega.RewardSummary repeated

GetRewardsRequest

A request to get reward details for a party

FieldTypeLabelDescription
party_id string

asset_id string

pagination Pagination

GetRewardsResponse

The return message with reward details in for a single party

FieldTypeLabelDescription
rewards vega.Reward repeated

GetRiskFactorsRequest

FieldTypeLabelDescription
market_id string

GetRiskFactorsResponse

FieldTypeLabelDescription
risk_factor vega.RiskFactor

GetUpdateMarketProposalsRequest

Request for a list of update market proposals

FieldTypeLabelDescription
market_id string

Market identifier, required field

select_in_state OptionalProposalState

Proposal state

GetUpdateMarketProposalsResponse

Response for a list of update market proposals

FieldTypeLabelDescription
data vega.GovernanceData repeated

A list of 0 or more governance data

GetVegaTimeRequest

Request for the current time of the vega network

GetVegaTimeResponse

Response for the current consensus coordinated time on the Vega network, referred to as "VegaTime"

FieldTypeLabelDescription
timestamp int64

Timestamp representation of current VegaTime as represented in Nanoseconds since the epoch, for example `1580473859111222333` corresponds to `2020-01-31T12:30:59.111222333Z`

GetVotesByPartyRequest

Request for a list of votes for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

GetVotesByPartyResponse

Response for a list of votes for a party

FieldTypeLabelDescription
votes vega.Vote repeated

A list of 0 or more votes

GlobalRewardPoolAccountsRequest

Request for a list of global reward pool accounts

FieldTypeLabelDescription
asset string

Asset identifier, required field - Set to an empty string to return all accounts - Set to an asset ID to return a single global reward pool account for a given asset

GlobalRewardPoolAccountsResponse

Response for a list of global reward pool accounts

FieldTypeLabelDescription
accounts vega.Account repeated

A list of 0 or more global reward pool accounts

KeyRotation

FieldTypeLabelDescription
node_id string

old_pub_key string

new_pub_key string

block_height uint64

LastTradeRequest

Request for the latest trade that occurred on Vega for a given market

FieldTypeLabelDescription
market_id string

Market identifier, required field

LastTradeResponse

Response for the latest trade that occurred on Vega for a given market

FieldTypeLabelDescription
trade vega.Trade

A trade, if found

LiquidityProvisionsRequest

A message requesting for the list of liquidity provision orders for markets

One of the two filters is required (or both)

FieldTypeLabelDescription
market string

The target market for the liquidity provision orders

party string

The party which submitted the liquidity provision orders

LiquidityProvisionsResponse

A response containing all of the Vega liquidity provision orders

FieldTypeLabelDescription
liquidity_provisions vega.LiquidityProvision repeated

ListOracleDataRequest

The request to get all seen oracle data

FieldTypeLabelDescription
pagination Pagination

ListOracleDataResponse

The response to get all seen oracle data

FieldTypeLabelDescription
oracle_data oracles.v1.OracleData repeated

The list of seen oracle data

MarginLevelsRequest

Request for margin levels for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

market_id string

Market identifier

MarginLevelsResponse

Response for margin levels for a party

FieldTypeLabelDescription
margin_levels vega.MarginLevels repeated

A list of 0 or more margin levels

MarginLevelsSubscribeRequest

Request to subscribe to a stream of MarginLevels data matching the given party identifier

Optionally, the list can be additionally filtered by market

FieldTypeLabelDescription
party_id string

Party identifier, required field

market_id string

Market identifier

MarginLevelsSubscribeResponse

FieldTypeLabelDescription
margin_levels vega.MarginLevels

MarketAccountsRequest

Request for a list of accounts for a market

FieldTypeLabelDescription
market_id string

Market identifier

asset string

Asset identifier

MarketAccountsResponse

Response for a list of accounts for a market

FieldTypeLabelDescription
accounts vega.Account repeated

A list of 0 or more accounts

MarketByIDRequest

Request for a market given a market identifier

FieldTypeLabelDescription
market_id string

Market identifier, required field

MarketByIDResponse

Response for a market given a market identifier

FieldTypeLabelDescription
market vega.Market

A market, if found

MarketDataByIDRequest

Request for market data for a market

FieldTypeLabelDescription
market_id string

Market identifier

MarketDataByIDResponse

Response for market data for a market

FieldTypeLabelDescription
market_data vega.MarketData

Market data, if found

MarketDepthRequest

Request for the market depth/order book price levels on a market

Optionally, a maximum depth can be set to limit the number of levels returned

FieldTypeLabelDescription
market_id string

Market identifier, required field

max_depth uint64

Max depth limits the number of levels returned. Default is 0, which returns all levels

MarketDepthResponse

Response for the market depth/order book price levels on a market

FieldTypeLabelDescription
market_id string

Market identifier

buy vega.PriceLevel repeated

Zero or more price levels for the buy side of the market depth data

sell vega.PriceLevel repeated

Zero or more price levels for the sell side of the market depth data

last_trade vega.Trade

Last trade recorded on Vega at the time of retrieving the `MarketDepthResponse`

sequence_number uint64

Sequence number incremented after each update

MarketDepthSubscribeRequest

Request to subscribe to a stream of (MarketDepth)[#vega.MarketDepth] data

FieldTypeLabelDescription
market_id string

Market identifier, required field.

MarketDepthSubscribeResponse

FieldTypeLabelDescription
market_depth vega.MarketDepth

MarketDepthUpdatesSubscribeRequest

Request to subscribe to a stream of (MarketDepth Update)[#vega.MarketDepthUpdate] data

FieldTypeLabelDescription
market_id string

Market identifier, required field

MarketDepthUpdatesSubscribeResponse

FieldTypeLabelDescription
update vega.MarketDepthUpdate

MarketsDataRequest

Request for market data

MarketsDataResponse

Response for market data

FieldTypeLabelDescription
markets_data vega.MarketData repeated

A list of 0 or more market data

MarketsDataSubscribeRequest

Request to subscribe to a stream of MarketsData

Optionally, the list can be additionally filtered by market

FieldTypeLabelDescription
market_id string

Market identifier

MarketsDataSubscribeResponse

FieldTypeLabelDescription
market_data vega.MarketData

MarketsRequest

Request for a list of markets on Vega

MarketsResponse

Response for a list of markets on Vega

FieldTypeLabelDescription
markets vega.Market repeated

A list of 0 or more markets

NetworkParametersRequest

A message requesting for the list of all network parameters

NetworkParametersResponse

A response containing all of the vega network parameters

FieldTypeLabelDescription
network_parameters vega.NetworkParameter repeated

ObserveDelegationsRequest

Request to obsever all event related to delegation with the given filters

FieldTypeLabelDescription
party string

node_id string

ObserveDelegationsResponse

All events related to delegation with the given filters

FieldTypeLabelDescription
delegation vega.Delegation

ObserveEventBusRequest

Request to subscribe to a stream of one or more event types from the Vega event bus

FieldTypeLabelDescription
type vega.events.v1.BusEventType repeated

One or more types of event, required field

market_id string

Market identifier, optional field

party_id string

Party identifier, optional field

batch_size int64

Batch size, optional field - If not specified, any events received will be sent immediately. If the client is not ready for the next data-set, data may be dropped a number of times, and eventually the stream is closed. if specified, the first batch will be sent when ready. To receive the next set of events, the client must write an `ObserveEventBatch` message on the stream to flush the buffer. If no message is received in 5 seconds, the stream is closed. Default: 0, send any and all events when they are available.

ObserveEventBusResponse

Response to a subscribed stream of events from the Vega event bus

FieldTypeLabelDescription
events vega.events.v1.BusEvent repeated

One or more events

ObserveGovernanceRequest

Request to obsever all event related to governance

ObserveGovernanceResponse

All events related to governance

FieldTypeLabelDescription
data vega.GovernanceData

ObservePartyProposalsRequest

Request to subscribe to a stream of governance proposals for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

ObservePartyProposalsResponse

FieldTypeLabelDescription
data vega.GovernanceData

ObservePartyVotesRequest

Request to subscribe to a stream of governance votes for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

ObservePartyVotesResponse

FieldTypeLabelDescription
vote vega.Vote

ObserveProposalVotesRequest

Request to subscribe to a stream of governance votes for a proposal

FieldTypeLabelDescription
proposal_id string

Proposal identifier, required field

ObserveProposalVotesResponse

FieldTypeLabelDescription
vote vega.Vote

ObserveRewardsRequest

FieldTypeLabelDescription
asset_id string

party string

ObserveRewardsResponse

FieldTypeLabelDescription
reward vega.Reward

OptionalProposalState

Optional proposal state

FieldTypeLabelDescription
value vega.Proposal.State

Proposal state value

OracleDataBySpecRequest

A request to all oracle data broadcast to a given spec

FieldTypeLabelDescription
id string

The id to get the oracle spec for

pagination Pagination

OracleDataBySpecResponse

The response for a list of all oracle data broadcast to a given spec

FieldTypeLabelDescription
oracle_data oracles.v1.OracleData repeated

The list of oracle data broadcast to a given spec

OracleSpecRequest

A request to get a specific oracle spec by identifier

FieldTypeLabelDescription
id string

The id to get the oracle spec for

pagination Pagination

OracleSpecResponse

A response for a oracle spec

FieldTypeLabelDescription
oracle_spec oracles.v1.OracleSpec

The withdrawal matching the identifier from the request

OracleSpecsRequest

A request to get a specific oracle spec by identifier

FieldTypeLabelDescription
pagination Pagination

OracleSpecsResponse

The response for a list of withdrawals

FieldTypeLabelDescription
oracle_specs oracles.v1.OracleSpec repeated

The list of oracle specs

OrderByIDRequest

Request for an order with the specified order identifier

Optionally, return a specific version of the order with the `version` field

FieldTypeLabelDescription
order_id string

Order identifier, required field

version uint64

Version of the order: - Set `version` to 0 for most recent version of the order - Set `1` for original version of the order - Set `2` for first amendment, `3` for second amendment, etc

OrderByIDResponse

FieldTypeLabelDescription
order vega.Order

OrderByMarketAndIDRequest

Request for an order on a market given an order identifier

FieldTypeLabelDescription
market_id string

Market identifier, required field

order_id string

Order identifier, required field

OrderByMarketAndIDResponse

Response for an order on a market given an order identifier

FieldTypeLabelDescription
order vega.Order

An order, if found

OrderByReferenceRequest

Request for an order given an order reference

FieldTypeLabelDescription
reference string

Unique reference, required field

OrderByReferenceResponse

Response for an order given an order reference

FieldTypeLabelDescription
order vega.Order

An order, if found

OrderVersionsByIDRequest

Request for a list of all versions of an order given the specified order identifier

FieldTypeLabelDescription
order_id string

Order identifier, required field

pagination Pagination

Pagination controls

OrderVersionsByIDResponse

Response to a request for a list of all versions of an order

FieldTypeLabelDescription
orders vega.Order repeated

A list of 0 or more orders (list will contain the same order but with different versions, if it has been amended)

OrdersByMarketRequest

Request for a list of orders for a market

FieldTypeLabelDescription
market_id string

Market identifier, required field

pagination Pagination

Optional pagination controls

OrdersByMarketResponse

Response for a list of orders for a market

FieldTypeLabelDescription
orders vega.Order repeated

A list of 0 or more orders

OrdersByPartyRequest

Request for a list of orders for a party

FieldTypeLabelDescription
party_id string

Party identifier, required field

pagination Pagination

Pagination controls

OrdersByPartyResponse

Response for a list of orders for a party

FieldTypeLabelDescription
orders vega.Order repeated

A list of 0 or more orders

OrdersSubscribeRequest

Request to subscribe to a stream of (Orders)[#vega.Order]

The fields for market identifier and party identifier are optional filters:

If omitted all orders, for all parties on all markets will be returned on the stream

If market identifier is given, orders from that market will be returned on the stream

If party identifier is given, orders from that party will be returned on the stream

Both filters can be combined

FieldTypeLabelDescription
market_id string

Market identifier

party_id string

Party identifier

OrdersSubscribeResponse

A stream of orders

FieldTypeLabelDescription
orders vega.Order repeated

A list of 0 or more orders

Pagination

Pagination controls

FieldTypeLabelDescription
skip uint64

Skip the number of records specified, default is 0

limit uint64

Limit the number of returned records to the value specified, default is 50

descending bool

Descending reverses the order of the records returned, default is true, if false the results will be returned in ascending order

PartiesRequest

Request for a list of all parties

PartiesResponse

Response to a request for a list of parties

FieldTypeLabelDescription
parties vega.Party repeated

A list of 0 or more parties

PartyAccountsRequest

Request for a list of accounts for a party

FieldTypeLabelDescription
party_id string

Party identifier

market_id string

Market identifier

type vega.AccountType

Account type, required field

asset string

Asset identifier

PartyAccountsResponse

Response for a list of accounts for a party

FieldTypeLabelDescription
accounts vega.Account repeated

A list of 0 or more accounts

PartyByIDRequest

Request for a party given a party identifier

FieldTypeLabelDescription
party_id string

Party identifier, required field

PartyByIDResponse

Response for a party given a party identifier

FieldTypeLabelDescription
party vega.Party

A party, if found

PartyStakeRequest

FieldTypeLabelDescription
party string

PartyStakeResponse

FieldTypeLabelDescription
current_stake_available string

stake_linkings vega.events.v1.StakeLinking repeated

PositionsByPartyRequest

Request for a list of positions for a party

Optionally, if a market identifier is set, the results will be filtered for that market only

FieldTypeLabelDescription
party_id string

Party identifier, required field

market_id string

Market identifier

PositionsByPartyResponse

Response for a list of positions for a party

FieldTypeLabelDescription
positions vega.Position repeated

A list of 0 or more positions

PositionsSubscribeRequest

Request to subscribe to a stream of (Positions)[#vega.Position]

FieldTypeLabelDescription
party_id string

Party identifier, optional field

market_id string

Market identifier, optional field

PositionsSubscribeResponse

FieldTypeLabelDescription
position vega.Position

TradesByMarketRequest

Request for a list of trades on a market

FieldTypeLabelDescription
market_id string

Market identifier, required field

pagination Pagination

Pagination controls

TradesByMarketResponse

Response for a list of trades on a market

FieldTypeLabelDescription
trades vega.Trade repeated

A list of 0 or more trades

TradesByOrderRequest

Request for a list of trades related to an order

FieldTypeLabelDescription
order_id string

Order identifier, required field

TradesByOrderResponse

Response for a list of trades related to an order

FieldTypeLabelDescription
trades vega.Trade repeated

A list of 0 or more trades

TradesByPartyRequest

Request for a list of trades relating to the given party

Optionally, the list can be additionally filtered for trades by market

FieldTypeLabelDescription
party_id string

Party identifier. Required field

market_id string

Market identifier

pagination Pagination

Pagination controls

TradesByPartyResponse

Response for a list of trades relating to a party

FieldTypeLabelDescription
trades vega.Trade repeated

A list of 0 or more trades

TradesSubscribeRequest

Request to subscribe to a stream of (Trades)[#vega.Trade]

The fields for market identifier and party identifier are optional filters:

If omitted all trades, for all parties on all markets will be returned on the stream

If market identifier is given, trades from that market will be returned on the stream

If party identifier is given, trades from that party will be returned on the stream

Both filters can be combined

FieldTypeLabelDescription
market_id string

Market identifier

party_id string

Party identifier

TradesSubscribeResponse

A stream of trades

FieldTypeLabelDescription
trades vega.Trade repeated

A list of 0 or more trades

TransferResponsesSubscribeRequest

TransferResponsesSubscribeResponse

FieldTypeLabelDescription
response vega.TransferResponse

TransfersRequest

FieldTypeLabelDescription
pubkey string

is_from bool

is_to bool

TransfersResponse

FieldTypeLabelDescription
transfers vega.events.v1.Transfer repeated

WithdrawalRequest

A request to get a specific withdrawal by identifier

FieldTypeLabelDescription
id string

The identifier of the withdrawal

WithdrawalResponse

A response for a withdrawal

FieldTypeLabelDescription
withdrawal vega.Withdrawal

The withdrawal matching the identifier from the request

WithdrawalsRequest

A request to get a list of withdrawal from a given party

FieldTypeLabelDescription
party_id string

The party to get the withdrawals for

WithdrawalsResponse

The response for a list of withdrawals

FieldTypeLabelDescription
withdrawals vega.Withdrawal repeated

The list of withdrawals for the specified party

TradingDataService

Method NameRequest TypeResponse TypeDescription
MarketAccounts MarketAccountsRequest MarketAccountsResponse

Get a list of Accounts by Market

PartyAccounts PartyAccountsRequest PartyAccountsResponse

Get a list of Accounts by Party

FeeInfrastructureAccounts FeeInfrastructureAccountsRequest FeeInfrastructureAccountsResponse

Get a list of accounts holding infrastructure fees. Can be filtered by asset, there will be 1 infrastructure fee account per asset in the network.

GlobalRewardPoolAccounts GlobalRewardPoolAccountsRequest GlobalRewardPoolAccountsResponse

Get a list of accounts holding reward pools Can be filtered by asset, there will be 1 reward pool account per asset in the network.

Candles CandlesRequest CandlesResponse

Get a list of Candles by Market

MarketDataByID MarketDataByIDRequest MarketDataByIDResponse

Get Market Data by Market ID

MarketsData MarketsDataRequest MarketsDataResponse

Get a list of Market Data

MarketByID MarketByIDRequest MarketByIDResponse

Get a Market by ID

MarketDepth MarketDepthRequest MarketDepthResponse

Get Market Depth

Markets MarketsRequest MarketsResponse

Get a list of Markets

OrderByMarketAndID OrderByMarketAndIDRequest OrderByMarketAndIDResponse

Get an Order by Market and Order ID

OrderByReference OrderByReferenceRequest OrderByReferenceResponse

Get an Order by Pending Order reference (UUID)

OrdersByMarket OrdersByMarketRequest OrdersByMarketResponse

Get a list of Orders by Market

OrdersByParty OrdersByPartyRequest OrdersByPartyResponse

Get a list of Orders by Party

OrderByID OrderByIDRequest OrderByIDResponse

Get a specific order by order ID

OrderVersionsByID OrderVersionsByIDRequest OrderVersionsByIDResponse

Get all versions of the order by its orderID

MarginLevels MarginLevelsRequest MarginLevelsResponse

Get Margin Levels by Party ID

Parties PartiesRequest PartiesResponse

Get a list of Parties

PartyByID PartyByIDRequest PartyByIDResponse

Get a Party by ID

PositionsByParty PositionsByPartyRequest PositionsByPartyResponse

Get a list of Positions by Party

LastTrade LastTradeRequest LastTradeResponse

Get latest Trade

TradesByMarket TradesByMarketRequest TradesByMarketResponse

Get a list of Trades by Market

TradesByOrder TradesByOrderRequest TradesByOrderResponse

Get a list of Trades by Order

TradesByParty TradesByPartyRequest TradesByPartyResponse

Get a list of Trades by Party

GetProposals GetProposalsRequest GetProposalsResponse

Get governance data (proposals and votes) for all proposals

GetProposalsByParty GetProposalsByPartyRequest GetProposalsByPartyResponse

Get governance data (proposals and votes) for proposals by party authoring them

GetVotesByParty GetVotesByPartyRequest GetVotesByPartyResponse

Get votes by party casting them

GetNewMarketProposals GetNewMarketProposalsRequest GetNewMarketProposalsResponse

Get governance data (proposals and votes) for proposals that aim creating new markets

GetUpdateMarketProposals GetUpdateMarketProposalsRequest GetUpdateMarketProposalsResponse

Get governance data (proposals and votes) for proposals that aim updating markets

GetNetworkParametersProposals GetNetworkParametersProposalsRequest GetNetworkParametersProposalsResponse

Get governance data (proposals and votes) for proposals that aim updating Vega network parameters

GetNewAssetProposals GetNewAssetProposalsRequest GetNewAssetProposalsResponse

Get governance data (proposals and votes) for proposals aiming to create new assets

GetNewFreeformProposals GetNewFreeformProposalsRequest GetNewFreeformProposalsResponse

Get governance data (proposals and votes) for proposals aiming to create freeform proposals

GetProposalByID GetProposalByIDRequest GetProposalByIDResponse

Get governance data (proposals and votes) for a proposal located by ID

GetProposalByReference GetProposalByReferenceRequest GetProposalByReferenceResponse

Get governance data (proposals and votes) for a proposal located by reference

ObserveGovernance ObserveGovernanceRequest ObserveGovernanceResponse stream

Subscribe to a stream of all governance updates

ObservePartyProposals ObservePartyProposalsRequest ObservePartyProposalsResponse stream

Subscribe to a stream of proposal updates

ObservePartyVotes ObservePartyVotesRequest ObservePartyVotesResponse stream

Subscribe to a stream of votes cast by a specific party

ObserveProposalVotes ObserveProposalVotesRequest ObserveProposalVotesResponse stream

Subscribe to a stream of proposal votes

ObserveEventBus ObserveEventBusRequest stream ObserveEventBusResponse stream

Subscribe to a stream of events from the core

GetNodeData GetNodeDataRequest GetNodeDataResponse

Get data of current node

GetNodes GetNodesRequest GetNodesResponse

List all known network nodes

GetNodeByID GetNodeByIDRequest GetNodeByIDResponse

Get a specific node by ID

GetKeyRotations GetKeyRotationsRequest GetKeyRotationsResponse

Get all key rotations

GetKeyRotationsByNode GetKeyRotationsByNodeRequest GetKeyRotationsByNodeResponse

Get all key rotations by node

GetEpoch GetEpochRequest GetEpochResponse

Get data for a specific epoch, if id omitted it gets the current epoch

GetVegaTime GetVegaTimeRequest GetVegaTimeResponse

Get Time

AccountsSubscribe AccountsSubscribeRequest AccountsSubscribeResponse stream

Subscribe to a stream of Accounts

CandlesSubscribe CandlesSubscribeRequest CandlesSubscribeResponse stream

Subscribe to a stream of Candles

MarginLevelsSubscribe MarginLevelsSubscribeRequest MarginLevelsSubscribeResponse stream

Subscribe to a stream of Margin Levels

MarketDepthSubscribe MarketDepthSubscribeRequest MarketDepthSubscribeResponse stream

Subscribe to a stream of Market Depth

MarketDepthUpdatesSubscribe MarketDepthUpdatesSubscribeRequest MarketDepthUpdatesSubscribeResponse stream

Subscribe to a stream of Market Depth Price Level Updates

MarketsDataSubscribe MarketsDataSubscribeRequest MarketsDataSubscribeResponse stream

Subscribe to a stream of Markets Data

OrdersSubscribe OrdersSubscribeRequest OrdersSubscribeResponse stream

Subscribe to a stream of Orders

PositionsSubscribe PositionsSubscribeRequest PositionsSubscribeResponse stream

Subscribe to a stream of Positions

TradesSubscribe TradesSubscribeRequest TradesSubscribeResponse stream

Subscribe to a stream of Trades

TransferResponsesSubscribe TransferResponsesSubscribeRequest TransferResponsesSubscribeResponse stream

Subscribe to a stream of Transfer Responses

GetNodeSignaturesAggregate GetNodeSignaturesAggregateRequest GetNodeSignaturesAggregateResponse

Get an aggregate of signatures from all the nodes of the network

AssetByID AssetByIDRequest AssetByIDResponse

Get an asset by its identifier

Assets AssetsRequest AssetsResponse

Get a list of all assets on Vega

EstimateFee EstimateFeeRequest EstimateFeeResponse

Get an estimate for the fee to be paid for a given order

EstimateMargin EstimateMarginRequest EstimateMarginResponse

Get an estimate for the margin required for a new order

ERC20WithdrawalApproval ERC20WithdrawalApprovalRequest ERC20WithdrawalApprovalResponse

Get the bundle approval for an ERC20 withdrawal, these data are being used to bundle the call to the smart contract on the ethereum bridge

Withdrawal WithdrawalRequest WithdrawalResponse

Get a withdrawal by its identifier

Withdrawals WithdrawalsRequest WithdrawalsResponse

Get withdrawals for a party

Deposit DepositRequest DepositResponse

Get a deposit by its identifier

Deposits DepositsRequest DepositsResponse

Get deposits for a party

NetworkParameters NetworkParametersRequest NetworkParametersResponse

Get the network parameters

LiquidityProvisions LiquidityProvisionsRequest LiquidityProvisionsResponse

Get the liquidity provision orders

OracleSpec OracleSpecRequest OracleSpecResponse

Get an oracle spec by ID.

OracleSpecs OracleSpecsRequest OracleSpecsResponse

Get the oracle specs

OracleDataBySpec OracleDataBySpecRequest OracleDataBySpecResponse

Get oracle data that matched the given spec

ListOracleData ListOracleDataRequest ListOracleDataResponse

Get all oracle data

ObserveRewards ObserveRewardsRequest ObserveRewardsResponse stream

subscribe to rewards

GetRewards GetRewardsRequest GetRewardsResponse

Get rewards

GetRewardSummaries GetRewardSummariesRequest GetRewardSummariesResponse

Get reward summaries

Checkpoints CheckpointsRequest CheckpointsResponse

Delegations DelegationsRequest DelegationsResponse

Get delegation data

ObserveDelegations ObserveDelegationsRequest ObserveDelegationsResponse stream

subscribe to delegation events

PartyStake PartyStakeRequest PartyStakeResponse

Transfers TransfersRequest TransfersResponse

GetRiskFactors GetRiskFactorsRequest GetRiskFactorsResponse

Get Risk Factor data for a given market

data-node/api/v2/trading_data.proto

Top

AccountFilter

FieldTypeLabelDescription
asset_id string

Restrict accounts to those holding balances in this asset ID

party_ids string repeated

Restrict accounts to those owned by the parties in this list (pass an empty list for no filter)

market_ids string repeated

Restrict accounts to those connected to the marketsin this list (pass an empty list for no filter)

account_types vega.AccountType repeated

Restrict accounts to those connected to any of the types in this list (pass an empty list for no filter)

AggregatedBalance

FieldTypeLabelDescription
timestamp int64

Timestamp to of block the balance is referring to, in nanoseconds since the epoch

balance string

The balance of the set of requested accounts at the time above

account_id string optional

If grouping by account ID, the account ID

party_id string optional

If grouping by party, the party ID

asset_id string optional

If grouping by asset, the asset ID

market_id string optional

If grouping by market, the market ID

account_type vega.AccountType

If grouping by account type, the account type

Candle

Represents the high, low, open, and closing prices for an interval of trading,

referred to commonly as a candlestick or candle

FieldTypeLabelDescription
start int64

Timestamp for the point in time when the candle was initially created/opened, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

last_update int64

Timestamp for the point in time when the candle was last updated, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

high string

Highest price for trading during the candle interval

low string

Lowest price for trading during the candle interval

open string

Open trade price

close string

Closing trade price

volume uint64

Total trading volume during the candle interval

ERC20MultiSigSignerAddedBundle

FieldTypeLabelDescription
new_signer string

The ethereum address of the signer to be removed

submitter string

The ethereum address of the submitter

nonce string

The nonce used in the signing operation

timestamp int64

unixnano timestamp for when the validator was added

signatures string

The bundle of signatures from current validators to sign in the new signer

epoch_seq string

The epoch in which the validator was added

ERC20MultiSigSignerRemovedBundle

FieldTypeLabelDescription
old_signer string

The ethereum address of the signer to be removed

submitter string

The ethereum address of the submitter

nonce string

The nonce used in the signing operation

timestamp int64

unixnano timestamp for when the validator was added

signatures string

The bundle of signatures from current validators to sign in the new signer

epoch_seq string

The epoch in which the validator was removed

GetBalanceHistoryRequest

-- Balances --

FieldTypeLabelDescription
filter AccountFilter

Limit the accounts considered according to the filter supplied

group_by AccountField repeated

By default the net balances of all the accounts specified by the filter are returned. If a list if fields is given in group_by, split out those balances by the supplied crietera.

GetBalanceHistoryResponse

FieldTypeLabelDescription
balances AggregatedBalance repeated

GetCandleDataRequest

Request for a list of candles for a market at an interval

FieldTypeLabelDescription
candle_id string

Candle identifier, required field.

from_timestamp int64

Timestamp to retrieve candles since, in nanoseconds since the epoch, required field - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

to_timestamp int64

Timestamp to retrieve candles since, in nanoseconds since the epoch, required field - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

interval string

Time interval for the candles, required field specified as a valid postgres interval

pagination OffsetPagination

pagination controls

GetCandleDataResponse

Response for list of candles for a market at an interval

FieldTypeLabelDescription
candles Candle repeated

A list of 0 or more candles

GetCandlesForMarketRequest

-- Candles --

Request to get a list of supported intervals for the given market along with the corresponding candle id

FieldTypeLabelDescription
market_id string

The unique identifier for the market

GetCandlesForMarketResponse

A list of interval to candle id mappings for a given market

FieldTypeLabelDescription
interval_to_candle_id IntervalToCandleId repeated

GetERC20ListAssetBundleRequest

A request to get an asset bundle details

FieldTypeLabelDescription
asset_id string

The ID of the asset requested

GetERC20ListAssetBundleResponse

The response with all information required to bundle the call to propose an erc20 asset

FieldTypeLabelDescription
asset_source string

The address of the asset on ethereum

vega_asset_id string

The ID of the vega asset

nonce string

The nonce, which is actually the internal reference for the proposal

signatures string

The signatures bundle as hex encoded data, forward by 0x e.g: 0x + sig1 + sig2 + ... + sixN

GetERC20MultiSigSignerAddedBundlesRequest

-- ERC20 Multi Sig --

FieldTypeLabelDescription
node_id string

The node id of the validator of which a signature bundle is required

epoch_seq string

The epoch which generated the bundle i.e the epoch in which the node became a tendermint validator

pagination OffsetPagination

Pagination controls

GetERC20MultiSigSignerAddedBundlesResponse

FieldTypeLabelDescription
bundles ERC20MultiSigSignerAddedBundle repeated

list of bundles for that validator, it may have been added multiple times if removed in between

GetERC20MultiSigSignerRemovedBundlesRequest

FieldTypeLabelDescription
node_id string

The node id of the validator of which a signature bundle is required

submitter string

The ethereum address of the validator which will submit the bundle

epoch_seq string

The epoch which generated the bundle i.e the epoch in which the node was demoted from a tendermint validator

pagination OffsetPagination

Pagination controls

GetERC20MultiSigSignerRemovedBundlesResponse

FieldTypeLabelDescription
bundles ERC20MultiSigSignerRemovedBundle repeated

list of signer bundles for that validator

GetMarginLevelsRequest

FieldTypeLabelDescription
party_id string

market_id string

pagination Pagination

GetMarginLevelsResponse

FieldTypeLabelDescription
margin_levels MarginConnection

GetMarketDataHistoryByIDRequest

-- Market Data --

Request for Market Data History

FieldTypeLabelDescription
market_id string

Market identifier, required field

start_timestamp int64 optional

Optional Unix time in nanoseconds

end_timestamp int64 optional

Optional Unix time in nanoseconds

pagination Pagination optional

Optional pagination control

offset_pagination OffsetPagination optional

Deprecated. Optional offset pagination control in order to support existing version of the Market Data History query that is available in the GraphQL API. That function has been deprecated, but until it's removed we have added this to support pagination queries that use an offset.

Fields with deprecated option

Name Option
offset_pagination

true

GetMarketDataHistoryByIDResponse

Response for Market Data History

FieldTypeLabelDescription
market_data MarketDataConnection

GetMarketsRequest

-- Markets --

FieldTypeLabelDescription
market_id string

pagination Pagination

GetMarketsResponse

FieldTypeLabelDescription
markets MarketConnection

GetNetworkLimitsRequest

-- Network Limits --

Request for the current network limits

GetNetworkLimitsResponse

Response for the current network limits

FieldTypeLabelDescription
limits vega.NetworkLimits

GetOracleDataBySpecIDRequest

The request to get all oracle data broadcast to a given oracle spec

FieldTypeLabelDescription
oracle_spec_id string

The oracle spec ID the oracle data are broadcast to

pagination Pagination

Pagination controls

GetOracleDataBySpecIDResponse

The response for a list of all oracle data broadcast to a given spec

FieldTypeLabelDescription
oracle_data oracles.v1.OracleData repeated

The list of oracle data broadcast to a given spec

GetOracleSpecByIDRequest

The request to get a specific oracle spec by identifier

FieldTypeLabelDescription
oracle_spec_id string

The ID to get the oracle spec for

GetOracleSpecByIDResponse

The response for a oracle spec

FieldTypeLabelDescription
oracle_spec oracles.v1.OracleSpec

The oracle spec matching the ID.

GetOrderVersionsByIDPagedRequest

Request for a list of all versions of an order given the specified order identifier

FieldTypeLabelDescription
order_id string

Order identifier, required field

pagination Pagination

Pagination controls

GetOrderVersionsByIDPagedResponse

Response to a request for a list of all versions of an order

FieldTypeLabelDescription
orders OrderConnection

A list of 0 or more orders (list will contain the same order but with different versions, if it has been amended)

GetOrderVersionsByIDRequest

Request for a list of all versions of an order given the specified order identifier

FieldTypeLabelDescription
order_id string

Order identifier, required field

pagination OffsetPagination

Pagination controls

GetOrderVersionsByIDResponse

Response to a request for a list of all versions of an order

FieldTypeLabelDescription
orders OrderConnection

Paged connection with 0 or more orders (list will contain the same order but with different versions, if it has been amended)

GetOrdersByMarketPagedRequest

Request for a list of orders for a market

FieldTypeLabelDescription
market_id string

Market identifier, required field

pagination Pagination

Optional pagination controls

GetOrdersByMarketPagedResponse

Response for a list of orders for a market

FieldTypeLabelDescription
orders OrderConnection

Paged order connection

GetOrdersByMarketRequest

-- Orders --

Request for a list of orders for a market

FieldTypeLabelDescription
market_id string

Market identifier, required field

pagination OffsetPagination

Optional pagination controls

GetOrdersByMarketResponse

Response for a list of orders for a market

FieldTypeLabelDescription
orders vega.Order repeated

A list of 0 or more orders

GetOrdersByPartyPagedRequest

Request for a list of orders for a market

FieldTypeLabelDescription
party_id string

Market identifier, required field

market_id string

pagination Pagination

Optional pagination controls

GetOrdersByPartyPagedResponse

Response for a list of orders for a market

FieldTypeLabelDescription
orders OrderConnection

Paged order connection

GetPartiesRequest

-- Parties --

FieldTypeLabelDescription
party_id string

pagination Pagination

GetPartiesResponse

FieldTypeLabelDescription
party PartyConnection

GetRewardSummariesRequest

A request to get reward details for a party

FieldTypeLabelDescription
party_id string

asset_id string

GetRewardSummariesResponse

The return message with reward details in for a single party

FieldTypeLabelDescription
summaries vega.RewardSummary repeated

GetRewardsRequest

A request to get reward details for a party

FieldTypeLabelDescription
party_id string

asset_id string

pagination Pagination

GetRewardsResponse

The return message with reward details in for a single party

FieldTypeLabelDescription
rewards RewardsConnection

GetTradesByMarketRequest

FieldTypeLabelDescription
market_id string

pagination Pagination

GetTradesByMarketResponse

FieldTypeLabelDescription
trades TradeConnection

GetTradesByOrderIDRequest

FieldTypeLabelDescription
market_id string

order_id string

pagination Pagination

GetTradesByOrderIDResponse

FieldTypeLabelDescription
trades TradeConnection

GetTradesByPartyRequest

FieldTypeLabelDescription
party_id string

market_id string

pagination Pagination

GetTradesByPartyResponse

FieldTypeLabelDescription
trades TradeConnection

IntervalToCandleId

Maps an interval for a given market to its corresponding candle_id

FieldTypeLabelDescription
interval string

The interval for the candle

candle_id string

The unique id of the candle

ListOracleDataRequest

The request to get all seen oracle data

FieldTypeLabelDescription
pagination Pagination

Pagination controls

ListOracleDataResponse

The response to get all seen oracle data

FieldTypeLabelDescription
oracle_data oracles.v1.OracleData repeated

The list of seen oracle data

ListOracleSpecsRequest

The request to get all active oracle specs

FieldTypeLabelDescription
pagination Pagination

Pagination controls

ListOracleSpecsResponse

The response to get all active oracle specs

FieldTypeLabelDescription
oracle_specs oracles.v1.OracleSpec repeated

The list of active oracle specs

MarginConnection

FieldTypeLabelDescription
total_count int64

edges MarginEdge repeated

page_info PageInfo

MarginEdge

FieldTypeLabelDescription
node vega.MarginLevels

cursor string

MarketConnection

FieldTypeLabelDescription
total_count int64

edges MarketEdge repeated

page_info PageInfo

MarketDataConnection

FieldTypeLabelDescription
total_count int64

edges MarketDataEdge repeated

page_info PageInfo

MarketDataEdge

FieldTypeLabelDescription
node vega.MarketData

cursor string

MarketEdge

FieldTypeLabelDescription
node vega.Market

cursor string

OffsetPagination

-- Pagination --

Pagination controls

FieldTypeLabelDescription
skip uint64

Skip the number of records specified, default is 0

limit uint64

Limit the number of returned records to the value specified, default is 50

descending bool

Descending reverses the order of the records returned, default is true, if false the results will be returned in ascending order

OrderConnection

FieldTypeLabelDescription
total_count int64

edges OrderEdge repeated

page_info PageInfo

OrderEdge

FieldTypeLabelDescription
node vega.Order

cursor string

PageInfo

Page information for cursor based pagination

FieldTypeLabelDescription
has_next_page bool

has_previous_page bool

start_cursor string

end_cursor string

Pagination

Cursor information for cursor based pagination requests

FieldTypeLabelDescription
first int32 optional

after string optional

last int32 optional

before string optional

PartyConnection

FieldTypeLabelDescription
total_count int64

edges PartyEdge repeated

page_info PageInfo

PartyEdge

FieldTypeLabelDescription
node vega.Party

cursor string

RewardEdge

FieldTypeLabelDescription
node vega.Reward

cursor string

RewardsConnection

FieldTypeLabelDescription
total_count int64

edges RewardEdge repeated

page_info PageInfo

SubscribeToCandleDataRequest

Request to subscribe to a stream of (Candles)[#vega.Candle]

FieldTypeLabelDescription
candle_id string

The unique identifier for the candle

SubscribeToCandleDataResponse

FieldTypeLabelDescription
candle Candle

TradeConnection

FieldTypeLabelDescription
total_count int64

edges TradeEdge repeated

page_info PageInfo

TradeEdge

-- Trades --

FieldTypeLabelDescription
node vega.Trade

cursor string

AccountField

A list of the properties of an account, used for grouping

NameNumberDescription
ACCOUNT_FIELD_UNSPECIFIED 0

ACCOUNT_FIELD_ID 1

ACCOUNT_FIELD_PARTY_ID 2

ACCOUNT_FIELD_ASSET_ID 3

ACCOUNT_FIELD_MARKET_ID 4

ACCOUNT_FIELD_TYPE 5

TradingDataService

Method NameRequest TypeResponse TypeDescription
GetOrdersByMarket GetOrdersByMarketRequest GetOrdersByMarketResponse

-- Orders -- Get a list of Orders by Market

GetOrderVersionsByID GetOrderVersionsByIDRequest GetOrderVersionsByIDResponse

Get all versions of the order by its orderID

GetOrdersByMarketPaged GetOrdersByMarketPagedRequest GetOrdersByMarketPagedResponse

Get a list of Orders by Market using cursor based pagination

GetOrdersByPartyPaged GetOrdersByPartyPagedRequest GetOrdersByPartyPagedResponse

Get a list of Orders by Party using cursor based pagination

GetOrderVersionsByIDPaged GetOrderVersionsByIDPagedRequest GetOrderVersionsByIDPagedResponse

Get all versions of the order by its orderID using cursor based pagination

GetBalanceHistory GetBalanceHistoryRequest GetBalanceHistoryResponse

-- Balances -- Get an aggregated list of the changes in balances in a set of accounts over time

GetMarketDataHistoryByID GetMarketDataHistoryByIDRequest GetMarketDataHistoryByIDResponse

-- Market Data -- Get Market Data History for a Market ID between given dates using a cursor based pagination model

GetNetworkLimits GetNetworkLimitsRequest GetNetworkLimitsResponse

-- Network Limits -- Get the current network limits (is bootstrapping finished, are proposals enabled etc..)

GetCandleData GetCandleDataRequest GetCandleDataResponse

-- Candles -- Get candle data for a given candle id

SubscribeToCandleData SubscribeToCandleDataRequest SubscribeToCandleDataResponse stream

Subscribe to a stream of Candle updates

GetCandlesForMarket GetCandlesForMarketRequest GetCandlesForMarketResponse

Gets all available intervals for a given market along with the corresponding candle id

GetERC20MultiSigSignerAddedBundles GetERC20MultiSigSignerAddedBundlesRequest GetERC20MultiSigSignerAddedBundlesResponse

-- ERC20 Multi Sig -- Gets the signature bundles that add a particular validator to the multisig contract

GetERC20MultiSigSignerRemovedBundles GetERC20MultiSigSignerRemovedBundlesRequest GetERC20MultiSigSignerRemovedBundlesResponse

Gets the signature bundles that remove a particular validator to the multisig contract

GetTradesByMarket GetTradesByMarketRequest GetTradesByMarketResponse

-- Trades -- Get trades by market using a cursor based pagination model

GetTradesByParty GetTradesByPartyRequest GetTradesByPartyResponse

Get trades by party using a cursor based pagination model

GetTradesByOrderID GetTradesByOrderIDRequest GetTradesByOrderIDResponse

Get trades by market with the corresponding orderID using a cursor based pagination model

GetOracleSpecByID GetOracleSpecByIDRequest GetOracleSpecByIDResponse

-- Oracles -- Get an oracle spec by ID.

ListOracleSpecs ListOracleSpecsRequest ListOracleSpecsResponse

Get the oracle specs

GetOracleDataBySpecID GetOracleDataBySpecIDRequest GetOracleDataBySpecIDResponse

Get oracle data that matched the given spec

ListOracleData ListOracleDataRequest ListOracleDataResponse

Get all oracle data

GetMarkets GetMarketsRequest GetMarketsResponse

-- Markets -- Get all markets using a cursor based pagination model

GetParties GetPartiesRequest GetPartiesResponse

-- Parties -- Get Parties using a cursor based pagination model

GetMarginLevels GetMarginLevelsRequest GetMarginLevelsResponse

-- Margin Levels -- Get Margin Levels using a cursor based pagination model -- Rewards --

GetRewards GetRewardsRequest GetRewardsResponse

Get rewards

GetRewardSummaries GetRewardSummariesRequest GetRewardSummariesResponse

Get reward summaries

vega/commands/v1/transaction.proto

Top

InputData

FieldTypeLabelDescription
nonce uint64

A number to provide uniqueness to prevent accidental replays and, in combination with `block_height`, deliberate attacks. A nonce provides uniqueness for otherwise identical transactions, ensuring that the transaction hash uniquely identifies a specific transaction. Granted all other fields are equal, the nonce can either be a counter or generated at random to submit multiple transactions within the same block (see below), without being identified as replays. Please note that Protocol Buffers do not have a canonical, unique encoding and therefore different libraries or binaries may encode the same message slightly differently, causing a different hash.

block_height uint64

The block height at which the transaction was made. This should be the current block height. The transaction will be valid from the block and up to the `tolerance` block height. Example: If the network has a tolerance of 150 blocks and `block_height` is set to `200`, then the transaction will be valid until block `350`. Note that a `block_height` that is ahead of the real block height will be rejected. The tolerance can be queried from the chain's network parameters. `block_height` prevents replay attacks in conjunction with `nonce` (see above).

order_submission OrderSubmission

User commands

order_cancellation OrderCancellation

order_amendment OrderAmendment

withdraw_submission WithdrawSubmission

proposal_submission ProposalSubmission

vote_submission VoteSubmission

liquidity_provision_submission LiquidityProvisionSubmission

delegate_submission DelegateSubmission

undelegate_submission UndelegateSubmission

liquidity_provision_cancellation LiquidityProvisionCancellation

liquidity_provision_amendment LiquidityProvisionAmendment

transfer Transfer

cancel_transfer CancelTransfer

announce_node AnnounceNode

node_vote NodeVote

Validator commands

node_signature NodeSignature

chain_event ChainEvent

key_rotate_submission KeyRotateSubmission

state_variable_proposal StateVariableProposal

validator_heartbeat ValidatorHeartbeat

ethereum_key_rotate_submission EthereumKeyRotateSubmission

oracle_data_submission OracleDataSubmission

Oracles

restore_snapshot_submission RestoreSnapshot

Checkpoints

ProofOfWork

FieldTypeLabelDescription
tid string

nonce uint64

hash_function string

Transaction

Represents a transaction to be sent to Vega.

FieldTypeLabelDescription
input_data bytes

One of the set of Vega commands (proto marshalled).

signature Signature

The signature of the inputData.

address string

The address of the sender (hex-encoded). Not supported yet.

pub_key string

The public key of the sender (hex-encoded).

version uint32

A version of the transaction, to be used in the future in case changes are implemented to the Transaction format.

pow ProofOfWork

Proof of work contains the random transaction id used by the client and the nonce.

vega/api/v1/core.proto

Top

CheckRawTransactionRequest

Request for checking a version agnostic transaction on Vega

FieldTypeLabelDescription
tx bytes

A bundle of signed payload and signature marshalled into a byte array, to form a transaction that would be submitted to the Vega blockchain

CheckRawTransactionResponse

Response for checking a version agnostic transaction on Vega

FieldTypeLabelDescription
success bool

Success will be true if the transaction was checked by the node

code uint32

Check code result

gas_wanted int64

Gas wanted for transaction

gas_used int64

Gas used for transaction

CheckTransactionRequest

Request for checking a transaction v2 on Vega

FieldTypeLabelDescription
tx vega.commands.v1.Transaction

A bundle of signed payload and signature, to form a transaction that would be submitted to the Vega blockchain

CheckTransactionResponse

FieldTypeLabelDescription
success bool

Success will be true if the transaction was checked by the node

code uint32

Check code result

gas_wanted int64

Gas wanted for transaction

gas_used int64

Gas used for transaction

GetVegaTimeRequest

Request for the current time of the vega network

GetVegaTimeResponse

Response for the current consensus coordinated time on the Vega network, referred to as "VegaTime"

FieldTypeLabelDescription
timestamp int64

Timestamp representation of current VegaTime as represented in Nanoseconds since the epoch, for example `1580473859111222333` corresponds to `2020-01-31T12:30:59.111222333Z`

LastBlockHeightRequest

A request to get the height of the very last block processed

by tendermint

LastBlockHeightResponse

A response with the height of the last block processed by

tendermint

FieldTypeLabelDescription
height uint64

last block height

hash string

last block hash

spam_pow_hash_function string

supported proof of work hash function

spam_pow_difficulty uint32

the difficulty of the proof of work (target number of zeros)

spam_pow_number_of_past_blocks uint32

supported proof of work number of blocks behind current height allowed

spam_pow_number_of_tx_per_block uint32

allowed number of transactions per block

spam_pow_increasing_difficulty bool

is increasing difficulty allowed for using the same height for more than `spam_pow_number_of_past_blocks` transactions

ObserveEventBusRequest

Request to subscribe to a stream of one or more event types from the Vega event bus

FieldTypeLabelDescription
type vega.events.v1.BusEventType repeated

One or more types of event, required field

market_id string

Market identifier, optional field

party_id string

Party identifier, optional field

batch_size int64

Batch size, optional field - If not specified, any events received will be sent immediately. If the client is not ready for the next data-set, data may be dropped a number of times, and eventually the stream is closed. if specified, the first batch will be sent when ready. To receive the next set of events, the client must write an `ObserveEventBatch` message on the stream to flush the buffer. If no message is received in 5 seconds, the stream is closed. Default: 0, send any and all events when they are available.

ObserveEventBusResponse

Response to a subscribed stream of events from the Vega event bus

FieldTypeLabelDescription
events vega.events.v1.BusEvent repeated

One or more events

PropagateChainEventRequest

Request for a new event sent by the blockchain queue to be propagated on Vega

FieldTypeLabelDescription
event bytes

Chain event

pub_key string

Public key

signature bytes

Signature

PropagateChainEventResponse

Response for a new event sent by the blockchain queue to be propagated on Vega

FieldTypeLabelDescription
success bool

Success will be true if the event was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus

Statistics

Vega domain specific statistics as reported by the node the caller is connected to

FieldTypeLabelDescription
block_height uint64

Current block height as reported by the Vega blockchain

backlog_length uint64

Current backlog length (number of transactions) that are waiting to be included in a block

total_peers uint64

Total number of connected peers to this node

genesis_time string

Genesis block date and time formatted in ISO-8601 datetime format with nanosecond precision

current_time string

Current system date and time formatted in ISO-8601 datetime format with nanosecond precision

vega_time string

Current Vega date and time formatted in ISO-8601 datetime format with nanosecond precision

status vega.ChainStatus

Status of the connection to the Vega blockchain - See [`ChainStatus`](#vega.ChainStatus)

tx_per_block uint64

Transactions per block

average_tx_bytes uint64

Average transaction size in bytes

average_orders_per_block uint64

Average orders per block

trades_per_second uint64

Trades emitted per second

orders_per_second uint64

Orders processed per second

total_markets uint64

Total markets on this Vega network

total_amend_order uint64

Total number of order amendments since genesis (on all markets)

total_cancel_order uint64

Total number of order cancellations since genesis (on all markets)

total_create_order uint64

Total number of order submissions since genesis (on all markets)

total_orders uint64

Total number of orders processed since genesis (on all markets)

total_trades uint64

Total number of trades emitted since genesis (on all markets)

order_subscriptions uint32

Current number of stream subscribers to order data

trade_subscriptions uint32

Current number of stream subscribers to trade data

candle_subscriptions uint32

Current number of stream subscribers to candle-stick data

market_depth_subscriptions uint32

Current number of stream subscribers to market depth data

positions_subscriptions uint32

Current number of stream subscribers to positions data

account_subscriptions uint32

Current number of stream subscribers to account data

market_data_subscriptions uint32

Current number of stream subscribers to market data

app_version_hash string

The version hash of the Vega node software

app_version string

The version of the Vega node software

chain_version string

The version of the underlying Vega blockchain

block_duration uint64

Current block duration, in nanoseconds

uptime string

Total uptime for this node formatted in ISO-8601 datetime format with nanosecond precision

chain_id string

Unique identifier for the underlying Vega blockchain

market_depth_updates_subscriptions uint32

Current number of stream subscribers to market depth update data

block_hash string

Current block hash

StatisticsRequest

A a request for statistics about the Vega network

StatisticsResponse

FieldTypeLabelDescription
statistics Statistics

SubmitRawTransactionRequest

Request for submitting a version agnostic transaction on Vega

FieldTypeLabelDescription
tx bytes

A bundle of signed payload and signature marshalled into a byte array, to form a transaction that will be submitted to the Vega blockchain

type SubmitRawTransactionRequest.Type

Type of transaction request, for example ASYNC, meaning the transaction will be submitted and not block on a response

SubmitRawTransactionResponse

Response for submitting a version agnostic transaction on Vega

FieldTypeLabelDescription
success bool

Success will be true if the transaction was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus

tx_hash string

Hash of the transaction, if accepted

code uint32

data string

log string

height int64

SubmitTransactionRequest

Request for submitting a transaction v2 on Vega

FieldTypeLabelDescription
tx vega.commands.v1.Transaction

A bundle of signed payload and signature, to form a transaction that will be submitted to the Vega blockchain

type SubmitTransactionRequest.Type

Type of transaction request, for example ASYNC, meaning the transaction will be submitted and not block on a response

SubmitTransactionResponse

Response for submitting a transaction v2 on Vega

FieldTypeLabelDescription
success bool

Success will be true if the transaction was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus

tx_hash string

Hash of the transaction, if accepted

code uint32

Result code success if unsucessful

data string

Data for details

log string

height int64

Height for commit

SubmitRawTransactionRequest.Type

Blockchain transaction type

NameNumberDescription
TYPE_UNSPECIFIED 0

TYPE_ASYNC 1

The transaction will be submitted without waiting for response

TYPE_SYNC 2

The transaction will be submitted, and blocking until the tendermint mempool return a response

TYPE_COMMIT 3

The transaction will submitted, and blocking until the tendermint network will have committed it into a block

SubmitTransactionRequest.Type

Blockchain transaction type

NameNumberDescription
TYPE_UNSPECIFIED 0

TYPE_ASYNC 1

The transaction will be submitted without waiting for response

TYPE_SYNC 2

The transaction will be submitted, and blocking until the tendermint mempool return a response

TYPE_COMMIT 3

The transaction will submitted, and blocking until the tendermint network will have committed it into a block

CoreService

Method NameRequest TypeResponse TypeDescription
SubmitTransaction SubmitTransactionRequest SubmitTransactionResponse

Submit a signed transaction

PropagateChainEvent PropagateChainEventRequest PropagateChainEventResponse

Propagate a chain event

Statistics StatisticsRequest StatisticsResponse

Get Statistics on Vega

LastBlockHeight LastBlockHeightRequest LastBlockHeightResponse

Get the height of the last tendermint block

GetVegaTime GetVegaTimeRequest GetVegaTimeResponse

Get Time

ObserveEventBus ObserveEventBusRequest stream ObserveEventBusResponse stream

Subscribe to a stream of events from the core

SubmitRawTransaction SubmitRawTransactionRequest SubmitRawTransactionResponse

Submit a version agnostic signed transaction

CheckTransaction CheckTransactionRequest CheckTransactionResponse

Check a signed transaction

CheckRawTransaction CheckRawTransactionRequest CheckRawTransactionResponse

Check a raw signed transaction

vega/api/v1/corestate.proto

Top

Account

FieldTypeLabelDescription
party string

market string

balance string

asset string

type string

ListAccountsRequest

FieldTypeLabelDescription
party string

market string

ListAccountsResponse

FieldTypeLabelDescription
accounts Account repeated

ListAssetsRequest

FieldTypeLabelDescription
asset string

optional ID

ListAssetsResponse

FieldTypeLabelDescription
assets vega.Asset repeated

ListDelegationsRequest

FieldTypeLabelDescription
party string

node string

epoch_seq string

ListDelegationsResponse

FieldTypeLabelDescription
delegations vega.Delegation repeated

ListMarketsDataRequest

FieldTypeLabelDescription
market string

ListMarketsDataResponse

FieldTypeLabelDescription
markets_data vega.MarketData repeated

ListMarketsRequest

FieldTypeLabelDescription
market string

ListMarketsResponse

FieldTypeLabelDescription
markets vega.Market repeated

ListNetworkLimitsRequest

ListNetworkLimitsResponse

FieldTypeLabelDescription
network_limits vega.NetworkLimits

ListNetworkParametersRequest

FieldTypeLabelDescription
network_parameter_key string

optional parameter key

ListNetworkParametersResponse

FieldTypeLabelDescription
network_parameters vega.NetworkParameter repeated

ListPartiesRequest

ListPartiesResponse

FieldTypeLabelDescription
parties vega.Party repeated

ListPartiesStakeRequest

FieldTypeLabelDescription
party string

ListPartiesStakeResponse

FieldTypeLabelDescription
parties_stake PartyStake repeated

ListProposalsRequest

FieldTypeLabelDescription
proposal string

optional ID

proposer string

optional party

ListProposalsResponse

FieldTypeLabelDescription
proposals vega.Proposal repeated

ListValidatorsRequest

ListValidatorsResponse

FieldTypeLabelDescription
validators vega.events.v1.ValidatorUpdate repeated

ListVotesRequest

FieldTypeLabelDescription
proposal string

party string

ListVotesResponse

FieldTypeLabelDescription
votes vega.Vote repeated

PartyStake

FieldTypeLabelDescription
party string

current_stake_available string

stake_linkings vega.events.v1.StakeLinking repeated

CoreStateService

Method NameRequest TypeResponse TypeDescription
ListAccounts ListAccountsRequest ListAccountsResponse

ListAssets ListAssetsRequest ListAssetsResponse

ListNetworkParameters ListNetworkParametersRequest ListNetworkParametersResponse

ListNetworkLimits ListNetworkLimitsRequest ListNetworkLimitsResponse

ListParties ListPartiesRequest ListPartiesResponse

ListValidators ListValidatorsRequest ListValidatorsResponse

ListMarkets ListMarketsRequest ListMarketsResponse

ListProposals ListProposalsRequest ListProposalsResponse

ListMarketsData ListMarketsDataRequest ListMarketsDataResponse

ListVotes ListVotesRequest ListVotesResponse

ListPartiesStake ListPartiesStakeRequest ListPartiesStakeResponse

ListDelegations ListDelegationsRequest ListDelegationsResponse

vega/checkpoint/v1/checkpoint.proto

Top

AssetBalance

AssetBalance represents the total balance of a given asset for a party

FieldTypeLabelDescription
party string

asset string

balance string

AssetEntry

AssetEntrty is a single (enabled) asset

FieldTypeLabelDescription
id string

asset_details vega.AssetDetails

Assets

Assets contains all the enabled assets as AssetEntries

FieldTypeLabelDescription
assets AssetEntry repeated

Banking

FieldTypeLabelDescription
transfers_at_time ScheduledTransferAtTime repeated

recurring_transfers RecurringTransfers

Block

Block message contains data related to block at which the checkpoint

was created (ie block height)

FieldTypeLabelDescription
height int64

Checkpoint

Checkpoint aggregates the various engine snapshots

FieldTypeLabelDescription
governance bytes

assets bytes

collateral bytes

network_parameters bytes

delegation bytes

epoch bytes

will just be an epoch event

block bytes

rewards bytes

banking bytes

validators bytes

staking bytes

multisig_control bytes

market_tracker bytes

CheckpointState

CheckpointState is the entire checkpoint serialised (basically serialised the Checkpoint message + hash)

FieldTypeLabelDescription
hash bytes

state bytes

Collateral

Collateral contains the balances per party

FieldTypeLabelDescription
balances AssetBalance repeated

Delegate

Delegate contains all entries for a checkpoint

FieldTypeLabelDescription
active DelegateEntry repeated

pending DelegateEntry repeated

auto_delegation string repeated

DelegateEntry

Delegated amounts for party/node

undelegate and epoch seq are only relevant for pending entries

FieldTypeLabelDescription
party string

node string

amount string

undelegate bool

epoch_seq uint64

MarketActivityTracker

FieldTypeLabelDescription
market string

asset string

maker_fees PartyFees repeated

taker_fees PartyFees repeated

lp_fees PartyFees repeated

proposer string

bonus_paid bool

value_traded string

ready_to_delete bool

MarketTracker

FieldTypeLabelDescription
market_activity MarketActivityTracker repeated

MultisigControl

FieldTypeLabelDescription
signers vega.events.v1.ERC20MultiSigSignerEvent repeated

threshold_set vega.events.v1.ERC20MultiSigThresholdSetEvent

last_block_seen uint64

NetParams

NetParams contains all network parameters

FieldTypeLabelDescription
params vega.NetworkParameter repeated

PartyAmount

FieldTypeLabelDescription
party string

amount string

PartyFees

FieldTypeLabelDescription
party string

fee string

PendingEthereumKeyRotation

FieldTypeLabelDescription
relative_target_block_height uint64

Relative target block height is: target block height - current block height. Useful for cross blockchain compatibility.

node_id string

new_address string

PendingKeyRotation

FieldTypeLabelDescription
relative_target_block_height uint64

Relative target block height is: target block height - current block height. Useful for cross blockchain compatibility.

node_id string

new_pub_key string

new_pub_key_index uint32

PendingRewardPayout

FieldTypeLabelDescription
from_account string

asset string

party_amount PartyAmount repeated

total_reward string

epoch_seq string

timestamp int64

Proposals

Proposals will contain all accepted proposals

FieldTypeLabelDescription
proposals vega.Proposal repeated

RecurringTransfers

FieldTypeLabelDescription
recurring_transfers vega.events.v1.Transfer repeated

RewardPayout

FieldTypeLabelDescription
payout_time int64

rewards_payout PendingRewardPayout repeated

Rewards

FieldTypeLabelDescription
rewards RewardPayout repeated

ScheduledTransfer

FieldTypeLabelDescription
transfer vega.Transfer

account_type vega.AccountType

reference string

oneoff_transfer vega.events.v1.Transfer

ScheduledTransferAtTime

FieldTypeLabelDescription
deliver_on int64

transfers ScheduledTransfer repeated

Staking

FieldTypeLabelDescription
accepted vega.events.v1.StakeLinking repeated

last_block_seen uint64

ValidatorState

FieldTypeLabelDescription
validator_update vega.events.v1.ValidatorUpdate

status int32

eth_events_forwarded uint64

validator_power int64

ranking_score vega.RankingScore

Validators

FieldTypeLabelDescription
validator_state ValidatorState repeated

pending_key_rotations PendingKeyRotation repeated

pending_ethereum_key_rotations PendingEthereumKeyRotation repeated

vega/snapshot/v1/snapshot.proto

Top

ActiveAssets

FieldTypeLabelDescription
assets vega.Asset repeated

AppState

FieldTypeLabelDescription
height uint64

block string

time int64

chain_id string

AssetAction

FieldTypeLabelDescription
id string

state uint32

asset string

block_number uint64

tx_index uint64

hash string

builtin_deposit vega.BuiltinAssetDeposit

erc20_deposit vega.ERC20Deposit

asset_list vega.ERC20AssetList

erc20_asset_limits_updated vega.ERC20AssetLimitsUpdated

AuctionState

FieldTypeLabelDescription
mode vega.Market.TradingMode

default_mode vega.Market.TradingMode

trigger vega.AuctionTrigger

begin int64

end vega.AuctionDuration

start bool

stop bool

extension vega.AuctionTrigger

extension_event_sent bool

BankingAssetActions

FieldTypeLabelDescription
asset_action AssetAction repeated

BankingDeposits

FieldTypeLabelDescription
deposit Deposit repeated

BankingRecurringTransfers

FieldTypeLabelDescription
recurring_tranfers vega.checkpoint.v1.RecurringTransfers

BankingScheduledTransfers

FieldTypeLabelDescription
transfers_at_time vega.checkpoint.v1.ScheduledTransferAtTime repeated

BankingSeen

FieldTypeLabelDescription
refs TxRef repeated

BankingWithdrawals

FieldTypeLabelDescription
withdrawals Withdrawal repeated

BannedParty

FieldTypeLabelDescription
party string

until_epoch uint64

BlockRejectStats

FieldTypeLabelDescription
rejected uint64

total uint64

Checkpoint

FieldTypeLabelDescription
next_cp int64

Chunk

Chunk is simply an as-is chunk belonging to a snapshot

not sure how usable this type would be

FieldTypeLabelDescription
data Payload repeated

nr int64

in case of multi-part data, this is chunk nr...

of int64

...of a total of N chunks

CollateralAccounts

FieldTypeLabelDescription
accounts vega.Account repeated

CollateralAssets

FieldTypeLabelDescription
assets vega.Asset repeated

CurrentPrice

FieldTypeLabelDescription
price string

volume uint64

DecimalMap

FieldTypeLabelDescription
key int64

val string

DelegationActive

FieldTypeLabelDescription
delegations vega.Delegation repeated

DelegationAuto

FieldTypeLabelDescription
parties string repeated

DelegationLastReconciliationTime

FieldTypeLabelDescription
last_reconciliation_time int64

DelegationPending

FieldTypeLabelDescription
delegations vega.Delegation repeated

undelegation vega.Delegation repeated

Deposit

FieldTypeLabelDescription
id string

deposit vega.Deposit

ERC20MultiSigTopologyPending

FieldTypeLabelDescription
pending_signers vega.events.v1.ERC20MultiSigSignerEvent repeated

pending_threshold_set vega.events.v1.ERC20MultiSigThresholdSetEvent repeated

witnessed_signers string repeated

witnessed_threshold_sets string repeated

ERC20MultiSigTopologyVerified

FieldTypeLabelDescription
signers string repeated

events_per_address SignerEventsPerAddress repeated

threshold vega.events.v1.ERC20MultiSigThresholdSetEvent

seen_events string repeated

EpochState

EpochState details

FieldTypeLabelDescription
seq uint64

Sequence number that increases by one each epoch

start_time int64

What time did this epoch start

expire_time int64

What time should this epoch end

ready_to_start_new_epoch bool

Ready to start a new epoch

ready_to_end_epoch bool

Ready to end epoch

EquityShare

FieldTypeLabelDescription
mvp string

opening_auction_ended bool

lps EquityShareLP repeated

r string

p_mvp string

EquityShareLP

FieldTypeLabelDescription
id string

stake string

share string

avg string

vshare string

EventForwarder

FieldTypeLabelDescription
acked_events vega.commands.v1.ChainEvent repeated

ExecutionMarkets

FieldTypeLabelDescription
markets Market repeated

FeeSplitter

FieldTypeLabelDescription
time_window_start int64

trade_value string

FloatingPointConsensus

snapshot payload for floating point consensus

FieldTypeLabelDescription
next_time_trigger NextTimeTrigger repeated

state_variables StateVarInternalState repeated

FloatingPointValidatorResult

FieldTypeLabelDescription
id string

bundle vega.KeyValueBundle repeated

FutureState

FieldTypeLabelDescription
market_id string

settlement_price string

trading_terminated bool

GovernanceActive

FieldTypeLabelDescription
proposals ProposalData repeated

GovernanceEnacted

FieldTypeLabelDescription
proposals ProposalData repeated

GovernanceNode

FieldTypeLabelDescription
proposals vega.Proposal repeated

HeartbeatTracker

FieldTypeLabelDescription
expected_next_hash string

expected_next_hash_since int64

block_index int32

block_sigs bool repeated

LimitState

LimitState details

FieldTypeLabelDescription
block_count uint32

Number of blocks into the boostrapping phase

can_propose_market bool

whether the limit on market proposals has been lifted

can_propose_asset bool

whether the limit on asset proposals has been lifted

genesis_loaded bool

whether the genesis state is loaded

propose_market_enabled bool

fields derived from the genesis state

propose_asset_enabled bool

propose_market_enabled_from int64

propose_asset_enabled_from int64

LiquidityParameters

FieldTypeLabelDescription
max_fee string

max_shape_size string

stake_to_obligation_factor string

market_id string

required for key generation

LiquidityPartiesLiquidityOrders

FieldTypeLabelDescription
party_orders PartyOrders repeated

market_id string

required for key generation

LiquidityPartiesOrders

FieldTypeLabelDescription
party_orders PartyOrders repeated

market_id string

required for key generation

LiquidityPendingProvisions

FieldTypeLabelDescription
pending_provisions string repeated

market_id string

required for key generation

LiquidityPriceProbabilityPair

FieldTypeLabelDescription
price string

probability string

LiquidityProvisions

FieldTypeLabelDescription
liquidity_provisions vega.LiquidityProvision repeated

market_id string

required for key generation

LiquiditySupplied

FieldTypeLabelDescription
market_id string

consensus_reached bool

bid_cache LiquidityPriceProbabilityPair repeated

ask_cache LiquidityPriceProbabilityPair repeated

LiquidityTarget

FieldTypeLabelDescription
market_id string

current_time int64

scheduled_truncate int64

current_open_interests uint64 repeated

previous_open_interests TimestampedOpenInterest repeated

max_open_interests TimestampedOpenInterest

Market

FieldTypeLabelDescription
market vega.Market

price_monitor PriceMonitor

auction_state AuctionState

pegged_orders vega.Order repeated

expiring_orders vega.Order repeated

last_best_bid string

last_best_ask string

last_mid_bid string

last_mid_ask string

last_market_value_proxy string

last_equity_share_distributed int64

equity_share EquityShare

current_mark_price string

risk_factor_short string

risk_factor_long string

risk_factor_consensus_reached bool

fee_splitter FeeSplitter

MarketPositions

FieldTypeLabelDescription
market_id string

positions Position repeated

MarketTracker

FieldTypeLabelDescription
market_activity vega.checkpoint.v1.MarketActivityTracker repeated

MatchingBook

FieldTypeLabelDescription
market_id string

buy vega.Order repeated

sell vega.Order repeated

last_traded_price string

auction bool

batch_id uint64

Metadata

FieldTypeLabelDescription
version int64

chunk_hashes string repeated

node_hashes NodeHash repeated

hashes used by snapshot engine, different to chunk hash if data was split up, or combined into a single chunk

NetParams

FieldTypeLabelDescription
params vega.NetworkParameter repeated

NextTimeTrigger

FieldTypeLabelDescription
asset string

market string

id string

next_trigger int64

NodeHash

NodeHash represents an exported node from the AVL tree and contains all the data necessary to recontruct and identical copy of the

AVL tree after we've serialised it

FieldTypeLabelDescription
key string

The node's full key, for example epoch.all

hash string

The hash of the node's value

height int32

The height of the node in the tree

version int64

The version of that node i.e how many times its value has changed during tree updates

is_leaf bool

Whether or not the node contains a snapshot payload, only leaf nodes in the AVL contain payloads

Notary

FieldTypeLabelDescription
notary_sigs NotarySigs repeated

NotarySigs

FieldTypeLabelDescription
id string

kind int32

node string

sig string

OracleData

FieldTypeLabelDescription
pub_keys string repeated

data OracleDataPair repeated

OracleDataBatch

FieldTypeLabelDescription
oracle_data OracleData repeated

OracleDataPair

FieldTypeLabelDescription
key string

value string

PartyOrders

FieldTypeLabelDescription
party string

orders vega.Order repeated

PartyProposalVoteCount

FieldTypeLabelDescription
party string

proposal string

count uint64

PartyTokenBalance

FieldTypeLabelDescription
party string

balance string

PastPrice

FieldTypeLabelDescription
time int64

volume_weighted_price string

Payload

FieldTypeLabelDescription
active_assets ActiveAssets

pending_assets PendingAssets

banking_withdrawals BankingWithdrawals

banking_deposits BankingDeposits

banking_seen BankingSeen

banking_asset_actions BankingAssetActions

checkpoint Checkpoint

collateral_accounts CollateralAccounts

collateral_assets CollateralAssets

delegation_active DelegationActive

delegation_pending DelegationPending

delegation_auto DelegationAuto

governance_active GovernanceActive

governance_enacted GovernanceEnacted

staking_accounts StakingAccounts

matching_book MatchingBook

network_parameters NetParams

execution_markets ExecutionMarkets

market_positions MarketPositions

app_state AppState

epoch EpochState

rewards_pending_payouts RewardsPendingPayouts

governance_node GovernanceNode

limit_state LimitState

vote_spam_policy VoteSpamPolicy

simple_spam_policy SimpleSpamPolicy

notary Notary

replay_protection ReplayProtection

future_state FutureState

event_forwarder EventForwarder

stake_verifier_deposited StakeVerifierDeposited

stake_verifier_removed StakeVerifierRemoved

witness Witness

delegation_last_reconciliation_time DelegationLastReconciliationTime

topology Topology

oracle_data OracleDataBatch

liquidity_parameters LiquidityParameters

liquidity_pending_provisions LiquidityPendingProvisions

liquidity_parties_liquidity_orders LiquidityPartiesLiquidityOrders

liquidity_parties_orders LiquidityPartiesOrders

liquidity_provisions LiquidityProvisions

liquidity_supplied LiquiditySupplied

liquidity_target LiquidityTarget

floating_point_consensus FloatingPointConsensus

market_tracker MarketTracker

banking_recurring_transfers BankingRecurringTransfers

banking_scheduled_transfers BankingScheduledTransfers

erc20_multisig_topology_verified ERC20MultiSigTopologyVerified

erc20_multisig_topology_pending ERC20MultiSigTopologyPending

proof_of_work ProofOfWork

pending_asset_updates PendingAssetUpdates

PendingAssetUpdates

FieldTypeLabelDescription
assets vega.Asset repeated

PendingAssets

FieldTypeLabelDescription
assets vega.Asset repeated

PendingEthereumKeyRotation

FieldTypeLabelDescription
block_height uint64

node_id string

new_address string

PendingKeyRotation

FieldTypeLabelDescription
block_height uint64

node_id string

new_pub_key string

new_pub_key_index uint32

PerformanceStats

FieldTypeLabelDescription
validator_address string

proposed uint64

elected uint64

voted uint64

last_height_voted int64

last_height_proposed int64

last_height_elected int64

Position

FieldTypeLabelDescription
party_id string

size int64

buy int64

sell int64

price string

vw_buy_price string

vw_sell_price string

PriceBound

FieldTypeLabelDescription
active bool

up_factor string

down_factor string

trigger vega.PriceMonitoringTrigger

PriceMonitor

FieldTypeLabelDescription
initialised bool

fp_horizons DecimalMap repeated

now int64

update int64

bounds PriceBound repeated

price_range_cache_time int64

price_range_cache PriceRangeCache repeated

ref_price_cache_time int64

ref_price_cache DecimalMap repeated

prices_now CurrentPrice repeated

prices_past PastPrice repeated

consensus_reached bool

PriceRange

FieldTypeLabelDescription
min string

max string

ref string

PriceRangeCache

FieldTypeLabelDescription
bound PriceBound

range PriceRange

PriceVolume

FieldTypeLabelDescription
price string

volume uint64

ProofOfWork

FieldTypeLabelDescription
block_height uint64 repeated

block_hash string repeated

tx_at_height TransactionsAtHeight repeated

tid_at_height TransactionsAtHeight repeated

banned BannedParty repeated

pow_params ProofOfWorkParams repeated

ProofOfWorkParams

FieldTypeLabelDescription
spam_pow_number_of_past_blocks uint64

spam_pow_difficulty uint32

spam_pow_hash_function string

spam_pow_number_of_tx_per_block uint64

spam_pow_increasing_difficulty bool

from_block uint64

until_block int64

ProposalData

FieldTypeLabelDescription
proposal vega.Proposal

yes vega.Vote repeated

no vega.Vote repeated

invalid vega.Vote repeated

ReplayProtection

FieldTypeLabelDescription
transactions TransactionAtHeight repeated

back_tol uint64

forward_tol uint64

Resource

FieldTypeLabelDescription
id string

check_until int64

votes string repeated

state uint32

RewardsPartyAmount

FieldTypeLabelDescription
party string

amount string

RewardsPayout

FieldTypeLabelDescription
from_account string

asset string

reward_party_amount RewardsPartyAmount repeated

total_reward string

epoch_seq string

timestamp int64

RewardsPendingPayouts

FieldTypeLabelDescription
scheduled_rewards_payout ScheduledRewardsPayout repeated

ScheduledRewardsPayout

FieldTypeLabelDescription
payout_time int64

rewards_payout RewardsPayout repeated

SignerEventsPerAddress

FieldTypeLabelDescription
address string

events vega.events.v1.ERC20MultiSigSignerEvent repeated

SimpleSpamPolicy

FieldTypeLabelDescription
policy_name string

party_to_count SpamPartyTransactionCount repeated

banned_parties BannedParty repeated

token_balance PartyTokenBalance repeated

current_epoch_seq uint64

Snapshot

FieldTypeLabelDescription
height uint64

format Format

chunks uint32

hash bytes

metadata bytes

SpamPartyTransactionCount

FieldTypeLabelDescription
party string

count uint64

StakeVerifierDeposited

FieldTypeLabelDescription
pending_deposited StakeVerifierPending repeated

StakeVerifierPending

FieldTypeLabelDescription
ethereum_address string

vega_public_key string

amount string

block_time int64

block_number uint64

log_index uint64

tx_id string

id string

StakeVerifierRemoved

FieldTypeLabelDescription
pending_removed StakeVerifierPending repeated

StakingAccount

FieldTypeLabelDescription
party string

balance string

events vega.events.v1.StakeLinking repeated

StakingAccounts

FieldTypeLabelDescription
accounts StakingAccount repeated

staking_asset_total_supply string

StateVarInternalState

FieldTypeLabelDescription
id string

state int32

event_id string

validators_results FloatingPointValidatorResult repeated

rounds_since_meaningful_update int32

TimePrice

FieldTypeLabelDescription
time int64

price string

TimestampedOpenInterest

FieldTypeLabelDescription
open_interest uint64

time int64

Topology

FieldTypeLabelDescription
validator_data ValidatorState repeated

chain_keys string repeated

pending_pub_key_rotations PendingKeyRotation repeated

validator_performance ValidatorPerformance

pending_ethereum_key_rotations PendingEthereumKeyRotation repeated

TransactionAtHeight

FieldTypeLabelDescription
tx string

height uint64

TransactionsAtHeight

FieldTypeLabelDescription
height uint64

transactions string repeated

TxRef

FieldTypeLabelDescription
asset string

block_nr uint64

hash string

log_index uint64

ValidatorPerformance

FieldTypeLabelDescription
validator_perf_stats PerformanceStats repeated

ValidatorState

FieldTypeLabelDescription
validator_update vega.events.v1.ValidatorUpdate

block_added uint64

status int32

status_change_block uint64

last_block_with_positive_ranking uint64

eth_events_forwarded uint64

heartbeat_tracker HeartbeatTracker

validator_power int64

ranking_score vega.RankingScore

VoteSpamPolicy

FieldTypeLabelDescription
party_to_vote PartyProposalVoteCount repeated

banned_parties BannedParty repeated

token_balance PartyTokenBalance repeated

recent_blocks_reject_stats BlockRejectStats repeated

current_block_index uint64

last_increase_block uint64

current_epoch_seq uint64

min_voting_tokens_factor string

Withdrawal

FieldTypeLabelDescription
ref string

withdrawal vega.Withdrawal

Witness

FieldTypeLabelDescription
resources Resource repeated

need_resend_resources string repeated

Format

NameNumberDescription
FORMAT_UNSPECIFIED 0

Default value, always invalid

FORMAT_PROTO 1

Standard proto encoding

FORMAT_PROTO_COMPRESSED 2

Compressed proto, might come in handy

FORMAT_JSON 3

Simple JSON serialisation, probably not going to be used

vega/wallet/v1/wallet.proto

Top

SubmitTransactionRequest

FieldTypeLabelDescription
pub_key string

propagate bool

order_submission vega.commands.v1.OrderSubmission

User commands

order_cancellation vega.commands.v1.OrderCancellation

order_amendment vega.commands.v1.OrderAmendment

withdraw_submission vega.commands.v1.WithdrawSubmission

proposal_submission vega.commands.v1.ProposalSubmission

vote_submission vega.commands.v1.VoteSubmission

liquidity_provision_submission vega.commands.v1.LiquidityProvisionSubmission

delegate_submission vega.commands.v1.DelegateSubmission

undelegate_submission vega.commands.v1.UndelegateSubmission

liquidity_provision_cancellation vega.commands.v1.LiquidityProvisionCancellation

liquidity_provision_amendment vega.commands.v1.LiquidityProvisionAmendment

transfer vega.commands.v1.Transfer

cancel_transfer vega.commands.v1.CancelTransfer

announce_node vega.commands.v1.AnnounceNode

node_vote vega.commands.v1.NodeVote

Validator commands

node_signature vega.commands.v1.NodeSignature

chain_event vega.commands.v1.ChainEvent

key_rotate_submission vega.commands.v1.KeyRotateSubmission

state_variable_proposal vega.commands.v1.StateVariableProposal

validator_heartbeat vega.commands.v1.ValidatorHeartbeat

ethereum_key_rotate_submission vega.commands.v1.EthereumKeyRotateSubmission

oracle_data_submission vega.commands.v1.OracleDataSubmission

Oracle commands

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)