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

vega.proto

vega.proto

path vega/vega.proto

package vega


Messages

Account

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

NameTypeDescription
idstringUnique account identifier (used internally by Vega)
ownerstringThe 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
balancestringBalance 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
assetstringAsset identifier for the account
market_idstringMarket identifier for the account, if [`AccountType`](#vega.AccountType).`ACCOUNT_TYPE_GENERAL` this will be empty
typeAccountTypeThe account type related to this account

AuctionIndicativeState

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

NameTypeDescription
market_idstringThe market identifier for which this state relates to
indicative_pricestringThe Indicative Uncrossing Price is the price at which all trades would occur if the auction uncrossed now
indicative_volumeuint64The Indicative Uncrossing Volume is the volume available at the Indicative crossing price if the auction uncrossed now
auction_startint64The timestamp at which the auction started
auction_endint64The 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

NameTypeDescription
timestampint64Timestamp for the point in time when the candle was initially created/opened, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
datetimestringAn ISO-8601 datetime with nanosecond precision for when the candle was last updated
highstringHighest price for trading during the candle interval
lowstringLowest price for trading during the candle interval
openstringOpen trade price
closestringClosing trade price
volumeuint64Total trading volume during the candle interval
intervalIntervalTime interval for the candle - See [`Interval`](#vega.Interval)

Delegation

NameTypeDescription
partystringParty which is delegating
node_idstringNode ID
amountstringAmount delegated
epoch_seqstringEpoch of delegation

Deposit

A deposit on to the Vega network

NameTypeDescription
idstringUnique identifier for the deposit
statusDeposit.StatusStatus of the deposit
party_idstringParty identifier of the user initiating the deposit
assetstringThe Vega asset targeted by this deposit
amountstringThe amount to be deposited
tx_hashstringThe hash of the transaction from the foreign chain
credited_timestampint64Timestamp for when the Vega account was updated with the deposit
created_timestampint64Timestamp for when the deposit was created on the Vega network

DispatchStrategy

NameTypeDescription
asset_for_metricstringThe asset to use for metric
metricDispatchMetricThe metric to apply
marketsstringOptional markets in scope

Epoch

NameTypeDescription
sequint64Sequence is used as epoch identifier
timestampsEpochTimestampsTimestamps for start/end etc
validatorsNodeValidators that participated in this epoch
delegationsDelegationList of all delegations in epoch

EpochData

NameTypeDescription
totalint32Total number of epochs since node was created
offlineint32Total number of offline epochs since node was created
onlineint32Total number of online epochs since node was created

EpochParticipation

NameTypeDescription
epochEpoch
offlineuint64
onlineuint64
total_rewardsdouble

EpochTimestamps

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

NameTypeDescription
start_timeint64Timestamp of epoch start in nanoseconds - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
expiry_timeint64Timestamp of epoch expiry in nanoseconds - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
end_timeint64Timestamp of epoch end in nanoseconds, empty if not started - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
first_blockuint64Height of first block in the epoch
last_blockuint64Height of last block in the epoch, empty if not ended

Erc20WithdrawExt

An extension of data required for the withdraw submissions

NameTypeDescription
receiver_addressstringThe address into which the bridge will release the funds

ErrorDetail

Represents Vega domain specific error information over gRPC/Protobuf

NameTypeDescription
codeint32A Vega API domain specific unique error code, useful for client side mappings, e.g. 10004
messagestringA message that describes the error in more detail, should describe the problem encountered
innerstringAny inner error information that could add more context, or be helpful for error reporting

EthereumConfig

Ethereum configuration details.

NameTypeDescription
network_idstringNetwork identifier of this Ethereum network.
chain_idstringChain identifier of this Ethereum network.
collateral_bridge_contractEthereumContractConfigContract configuration of the collateral bridge contract for this Ethereum network.
confirmationsuint32Number 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_contractEthereumContractConfigContract configuration of the stacking bridge contract for this Ethereum network.
token_vesting_contractEthereumContractConfigContract configuration of the token vesting contract for this Ethereum network.
multisig_control_contractEthereumContractConfigContract configuration of the multisig controld contract for this Ethereum network.

EthereumContractConfig

NameTypeDescription
addressstringAddress of the contract for this Ethereum network. The address should start with "0x".
deployment_block_heightuint64Block 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

NameTypeDescription
maker_feestringFee amount paid to the non-aggressive party of the trade
infrastructure_feestringFee amount paid for maintaining the Vega infrastructure
liquidity_feestringFee amount paid to market makers

FinancialAmount

Asset value information used within a transfer

NameTypeDescription
amountstringA signed integer amount of asset
assetstringAsset identifier

KeyValueBundle

NameTypeDescription
keystring
tolerancestring
valueStateVarValue

LedgerEntry

Represents a ledger entry on Vega

NameTypeDescription
from_accountstringOne or more accounts to transfer from
to_accountstringOne or more accounts to transfer to
amountstringAn amount to transfer
referencestringA reference for auditing purposes
typestringType of ledger entry
timestampint64Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`

LiquidityOrder

Represents a liquidity order

NameTypeDescription
referencePeggedReferenceThe pegged reference point for the order
proportionuint32The relative proportion of the commitment to be allocated at a price level
offsetstringThe 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

NameTypeDescription
order_idstringUnique identifier of the pegged order generated by the core to fulfil this liquidity order
liquidity_orderLiquidityOrderThe liquidity order from the original submission

LiquidityProviderFeeShare

The equity like share of liquidity fee for each liquidity provider

NameTypeDescription
partystringThe liquidity provider party id
equity_like_sharestringThe share own by this liquidity provider (float)
average_entry_valuationstringThe average entry valuation of the liquidity provider for the market

LiquidityProvision

An Liquidity provider commitment

NameTypeDescription
idstringUnique identifier
party_idstringUnique party identifier for the creator of the provision
created_atint64Timestamp for when the order was created at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
updated_atint64Timestamp for when the order was updated at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
market_idstringMarket identifier for the order, required field
commitment_amountstringSpecified as a unitless number that represents the amount of settlement asset of the market
feestringNominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers
sellsLiquidityOrderReferenceA set of liquidity sell orders to meet the liquidity provision obligation
buysLiquidityOrderReferenceA set of liquidity buy orders to meet the liquidity provision obligation
versionuint64Version of this liquidity provision order
statusLiquidityProvision.StatusStatus of this liquidity provision order
referencestringA reference shared between this liquidity provision and all its orders

MarginLevels

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

NameTypeDescription
maintenance_marginstringMaintenance margin value
search_levelstringSearch level value
initial_marginstringInitial margin value
collateral_release_levelstringCollateral release level value
party_idstringParty identifier
market_idstringMarket identifier
assetstringAsset identifier
timestampint64Timestamp 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

NameTypeDescription
mark_pricestringMark price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places
best_bid_pricestringHighest 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_volumeuint64Aggregated volume being bid at the best bid price
best_offer_pricestringLowest price level on an order book for offer orders
best_offer_volumeuint64Aggregated 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_pricestringHighest price on the order book for buy orders not including pegged orders
best_static_bid_volumeuint64Total volume at the best static bid price excluding pegged orders
best_static_offer_pricestringLowest price on the order book for sell orders not including pegged orders
best_static_offer_volumeuint64Total volume at the best static offer price excluding pegged orders
mid_pricestringArithmetic 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_pricestringArithmetic average of the best static bid price and best static offer price
marketstringMarket identifier for the data
timestampint64Timestamp at which this mark price was relevant, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
open_interestuint64The sum of the size of all positions greater than 0 on the market
auction_endint64Time in seconds until the end of the auction (0 if currently not in auction period)
auction_startint64Time until next auction, or start time of the current auction if market is in auction period
indicative_pricestringIndicative price (zero if not in auction)
indicative_volumeuint64Indicative volume (zero if not in auction)
market_trading_modeMarket.TradingModeThe current trading mode for the market
triggerAuctionTriggerWhen a market is in an auction trading mode, this field indicates what triggered the auction
extension_triggerAuctionTriggerWhen a market auction is extended, this field indicates what caused the extension
target_stakestringTargeted stake for the given market
supplied_stakestringAvailable stake for the given market
price_monitoring_boundsPriceMonitoringBoundsOne or more price monitoring bounds for the current timestamp
market_value_proxystringthe market value proxy
liquidity_provider_fee_shareLiquidityProviderFeeSharethe equity like share of liquidity fee for each liquidity provider

MarketDepth

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

NameTypeDescription
market_idstringMarket identifier
buyPriceLevelCollection of price levels for the buy side of the book
sellPriceLevelCollection of price levels for the sell side of the book
sequence_numberuint64Sequence number for the market depth data returned

MarketDepthUpdate

Represents the changed market depth since the last update

NameTypeDescription
market_idstringMarket identifier
buyPriceLevelCollection of updated price levels for the buy side of the book
sellPriceLevelCollection of updated price levels for the sell side of the book
sequence_numberuint64Sequence number for the market depth update data returned. It is increasing but not monotonic.
previous_sequence_numberuint64Sequence number of of the previous market depth update, for checking there are no gaps.

MatrixValue

NameTypeDescription
valueVectorValue

NetworkLimits

Network limits, defined in the genesis file

NameTypeDescription
can_propose_marketboolAre market proposals allowed at this point in time
can_propose_assetboolAre asset proposals allowed at this point in time
bootstrap_finishedboolTrue once block count > bootstrapBlockCount
propose_market_enabledboolAre market proposals enabled on this chain
propose_asset_enabledboolAre asset proposals enabled on this chain
bootstrap_block_countuint32How many blocks before the chain comes out of bootstrap mode
genesis_loadedboolTrue once the genesis file is loaded
propose_market_enabled_fromint64The date/timestamp in unix nanoseconds at which market proposals will be enabled (0 indicates not set)
propose_asset_enabled_fromint64The date/timestamp in unix nanoseconds at which asset proposals will be enabled (0 indicates not set)

NetworkParameter

Represents a network parameter on Vega

NameTypeDescription
keystringThe unique key
valuestringThe value for the network parameter

Node

NameTypeDescription
idstringThe node ID (wallet ID)
pub_keystringPub key of the node operator
tm_pub_keystringPublic key of Tendermint
ethereum_adddressstringEthereum public key of the node
info_urlstringURL where I can find out more info on the node
locationstringCountry code for the location of the node
staked_by_operatorstringThe amount the node has put up themselves
staked_by_delegatesstringThe amount of stake that has been delegated by token holders
staked_totalstringTotal amount staked on node
max_intended_stakestringMax amount of (wanted) stake, is this a network param or a node param
pending_stakestringAmount of stake on the next epoch
epoch_dataEpochDataInformation about epoch
statusNodeStatusNode status
delegationsDelegationNode's delegations
reward_scoreRewardScoreNode reward score
ranking_scoreRankingScoreNode ranking information
namestringNode name
avatar_urlstringAvatar url

NodeData

NameTypeDescription
staked_totalstringTotal staked amount across all nodes
total_nodesuint32Total number of nodes
inactive_nodesuint32Number of inactive nodes
validating_nodesuint32Number of nodes validating
uptimefloatTotal 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

NameTypeDescription
idstringUnique identifier for the order (set by the system after consensus)
market_idstringMarket identifier for the order
party_idstringParty identifier for the order
sideSideSide for the order, e.g. SIDE_BUY or SIDE_SELL
pricestringPrice 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
sizeuint64Size for the order, for example, in a futures market the size equals the number of contracts
remaininguint64Size remaining, when this reaches 0 then the order is fully filled and status becomes STATUS_FILLED
time_in_forceOrder.TimeInForceTime in force indicates how long an order will remain active before it is executed or expires. - See OrderTimeInForce
typeOrder.TypeType for the order - See OrderType
created_atint64Timestamp for when the order was created at, in nanoseconds since the epoch
statusOrder.StatusThe current status for the order. - For detail on `STATUS_REJECTED` please check the OrderError value given in the `reason` field
expires_atint64Timestamp for when the order will expire, in nanoseconds since the epoch
referencestringReference 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
reasonOrderErrorIf the Order `status` is `STATUS_REJECTED` then an OrderError reason will be specified - The default for this field is `ORDER_ERROR_NONE` which signifies that there were no errors
updated_atint64Timestamp for when the order was last updated, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
versionuint64The version for the order, initial value is version 1 and is incremented after each successful amend
batch_iduint64Batch 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_orderPeggedOrderPegged order details, used only if the order represents a pegged order.
liquidity_provision_idstringIs this order created as part of a liquidity provision, will be empty if not.

OrderCancellationConfirmation

Used when cancelling an order

NameTypeDescription
orderOrderThe order that was cancelled

OrderConfirmation

Used when confirming an order

NameTypeDescription
orderOrderThe order that was confirmed
tradesTrade0 or more trades that were emitted
passive_orders_affectedOrder0 or more passive orders that were affected

Party

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

NameTypeDescription
idstringA 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

NameTypeDescription
referencePeggedReferenceThe price point the order is linked to
offsetstringOffset from the price reference

Position

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

NameTypeDescription
market_idstringMarket identifier
party_idstringParty identifier
open_volumeint64Open volume for the position, value is signed +ve for long and -ve for short
realised_pnlstringRealised profit and loss for the position, value is signed +ve for long and -ve for short
unrealised_pnlstringUnrealised profit and loss for the position, value is signed +ve for long and -ve for short
average_entry_pricestringAverage 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_atint64Timestamp for the latest time the position was updated

PositionTrade

NameTypeDescription
volumeint64Volume for the position trade, value is signed +ve for long and -ve for short
pricestringPrice 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

PriceLevel

Represents a price level from market depth or order book data

NameTypeDescription
pricestringPrice 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_ordersuint64Number of orders at the price level
volumeuint64Volume at the price level

PriceMonitoringBounds

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

NameTypeDescription
min_valid_pricestringMinimum price that isn't currently breaching the specified price monitoring trigger
max_valid_pricestringMaximum price that isn't currently breaching the specified price monitoring trigger
triggerPriceMonitoringTriggerPrice monitoring trigger associated with the bounds
reference_pricestringReference price used to calculate the valid price range

RankingScore

NameTypeDescription
stake_scorestringstake based score - no anti-whaling
performance_scorestringperformance based score
previous_statusValidatorNodeStatusthe status of the validator in the previous epoch
statusValidatorNodeStatusthe status of the validator in the current epoch
voting_poweruint32tendermint voting power of the validator
ranking_scorestringfinal score

Reward

Details for a single reward payment

NameTypeDescription
asset_idstring
party_idstring
epochuint64
amountstring
percentage_of_totalstring
received_atint64
market_idstring
reward_typestring

RewardScore

NameTypeDescription
raw_validator_scorestringstake based score - with anti-whaling
performance_scorestringperformance based score
multisig_scorestringmultisig score
validator_scorestringun-normalised score
normalised_scorestringnormalised validator score for rewards
validator_statusValidatorNodeStatusthe status of the validator for reward

RewardSummary

Details for rewards for a single asset

NameTypeDescription
asset_idstring
party_idstring
amountstringTotal amount of rewards for the asset

RiskFactor

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

NameTypeDescription
marketstringMarket ID that relates to this risk factor
shortstringShort Risk factor value
longstringLong Risk factor value

ScalarValue

NameTypeDescription
valuestring

StateValueProposal

NameTypeDescription
state_var_idstringstate variable identifier
event_idstringevent identifier
kvbKeyValueBundlekey value tolerance triplets

StateVarValue

NameTypeDescription
scalar_valScalarValue
vector_valVectorValue
matrix_valMatrixValue

Trade

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

NameTypeDescription
idstringUnique identifier for the trade (generated by Vega)
market_idstringMarket identifier (the market that the trade occurred on)
pricestringPrice 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
sizeuint64Size filled for the trade
buyerstringUnique party identifier for the buyer
sellerstringUnique party identifier for the seller
aggressorSideDirection of the aggressive party e.g. SIDE_BUY or SIDE_SELL - See [`Side`](#vega.Side)
buy_orderstringIdentifier of the order from the buy side
sell_orderstringIdentifier of the order from the sell side
timestampint64Timestamp for when the trade occurred, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
typeTrade.TypeType for the trade - See [`Trade.Type`](#vega.Trade.Type)
buyer_feeFeeFee amount charged to the buyer party for the trade
seller_feeFeeFee amount charged to the seller party for the trade
buyer_auction_batchuint64Auction batch number that the buy side order was placed in
seller_auction_batchuint64Auction batch number that the sell side order was placed in

TradeSet

NameTypeDescription
tradesTradeA set of one or more trades

Transfer

Represents a financial transfer within Vega

NameTypeDescription
ownerstringParty identifier for the owner of the transfer
amountFinancialAmountA financial amount (of an asset) to transfer
typeTransferTypeThe type of transfer, gives the reason for the transfer
min_amountstringA minimum amount
market_idstringoptional dispatch strategy

TransferBalance

Represents the balance for an account during a transfer

NameTypeDescription
accountAccountThe account relating to the transfer
balancestringThe balance relating to the transfer

TransferRequest

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

NameTypeDescription
from_accountAccountOne or more accounts to transfer from
to_accountAccountOne or more accounts to transfer to
amountstringAn amount to transfer for the asset
min_amountstringA minimum amount
assetstringAsset identifier
referencestringA reference for auditing purposes

TransferResponse

Represents the response from a transfer

NameTypeDescription
transfersLedgerEntryOne or more ledger entries representing the transfers
balancesTransferBalanceOne or more account balances

VectorValue

NameTypeDescription
valuestring

WithdrawExt

Withdrawal external details

NameTypeDescription
erc20Erc20WithdrawExtERC20 withdrawal details

Withdrawal

A withdrawal from the Vega network

NameTypeDescription
idstringUnique identifier for the withdrawal
party_idstringUnique party identifier of the user initiating the withdrawal
amountstringThe amount to be withdrawn
assetstringThe asset to withdraw funds from
statusWithdrawal.StatusThe status of the withdrawal
refstringThe reference which is used by the foreign chain to refer to this withdrawal
expiryint64The time until when the withdrawal is valid
tx_hashstringThe hash of the foreign chain for this transaction
created_timestampint64Timestamp for when the network started to process this withdrawal
withdrawn_timestampint64Timestamp for when the withdrawal was finalised by the network
extWithdrawExtForeign chain specifics

Enums

AccountType

Various collateral/account types as used by Vega

NameNumberDescription
ACCOUNT_TYPE_UNSPECIFIED0Default value
ACCOUNT_TYPE_INSURANCE1Insurance pool accounts contain insurance pool funds for a market
ACCOUNT_TYPE_SETTLEMENT2Settlement accounts exist only during settlement or mark-to-market
ACCOUNT_TYPE_MARGIN3Margin accounts contain funds set aside for the margin needed to support a party's open positions. Each party will have a margin account for each market they have traded in. The required initial margin is allocated to each market from your general account. Collateral in the margin account can't be withdrawn or used as margin on another market until it is released back to the general account. The Vega protocol uses an internal accounting system to segregate funds held as margin from other funds to ensure they are never lost or 'double spent' Margin account funds will vary as margin requirements on positions change
ACCOUNT_TYPE_GENERAL4General accounts contain the collateral for a party that is not otherwise allocated. 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_INFRASTRUCTURE5Infrastructure accounts contain fees earned by providing infrastructure on Vega
ACCOUNT_TYPE_FEES_LIQUIDITY6Liquidity accounts contain fees earned by providing liquidity on Vega markets
ACCOUNT_TYPE_FEES_MAKER7This 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_BOND9This account is created to maintain liquidity providers funds commitments
ACCOUNT_TYPE_EXTERNAL10External account represents an external source (deposit/withdrawal)
ACCOUNT_TYPE_GLOBAL_INSURANCE11Global insurance account for the asset
ACCOUNT_TYPE_GLOBAL_REWARD12Global reward account for the asset
ACCOUNT_TYPE_PENDING_TRANSFERS13Per asset account used to store pending transfers (if any)
ACCOUNT_TYPE_REWARD_TAKER_PAID_FEES14Per asset reward account for fees paid by takers
ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES15Per asset reward account for fees received by makers
ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES16Per asset reward account for fees received by liquidity providers
ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS17Per 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_UNSPECIFIED0Default value for AuctionTrigger, no auction triggered
AUCTION_TRIGGER_BATCH1Batch auction
AUCTION_TRIGGER_OPENING2Opening auction
AUCTION_TRIGGER_PRICE3Price monitoring trigger
AUCTION_TRIGGER_LIQUIDITY4Liquidity monitoring trigger

ChainStatus

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

NameNumberDescription
CHAIN_STATUS_UNSPECIFIED0Default value, always invalid
CHAIN_STATUS_DISCONNECTED1Blockchain is disconnected
CHAIN_STATUS_REPLAYING2Blockchain is replaying historic transactions
CHAIN_STATUS_CONNECTED3Blockchain is connected and receiving transactions

Deposit.Status

The status of the deposit

NameNumberDescription
STATUS_UNSPECIFIED0Default value, always invalid
STATUS_OPEN1The deposit is being processed by the network
STATUS_CANCELLED2The deposit has been cancelled by the network
STATUS_FINALIZED3The deposit has been finalised and accounts have been updated

DispatchMetric

NameNumberDescription
DISPATCH_METRIC_UNSPECIFIED0
DISPATCH_METRIC_TAKER_FEES_PAID1Dispatch metric that is using the total taker fees paid in the market
DISPATCH_METRIC_MAKER_FEES_RECEIVED2Dispatch metric that is using the total maker fees received in the market
DISPATCH_METRIC_LP_FEES_RECEIVED3Dispatch metric that is using the total LP fees received in the market
DISPATCH_METRIC_MARKET_VALUE4Dispatch 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_UNSPECIFIED0
EPOCH_ACTION_START1The epoch update is for a new epoch
EPOCH_ACTION_END2The 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_UNSPECIFIED0Default value, always invalid
INTERVAL_I1M601 minute.
INTERVAL_I5M3005 minutes.
INTERVAL_I15M90015 minutes.
INTERVAL_I1H36001 hour.
INTERVAL_I6H216006 hours.
INTERVAL_I1D864001 day.

LiquidityProvision.Status

Status of a liquidity provision order

NameNumberDescription
STATUS_UNSPECIFIED0The default value
STATUS_ACTIVE1The liquidity provision is active
STATUS_STOPPED2The liquidity provision was stopped by the network
STATUS_CANCELLED3The liquidity provision was cancelled by the liquidity provider
STATUS_REJECTED4The liquidity provision was invalid and got rejected
STATUS_UNDEPLOYED5The liquidity provision is valid and accepted by network, but orders aren't deployed
STATUS_PENDING6The liquidity provision is valid and accepted by network but has never been deployed. If when it's possible to deploy the orders for the first time margin check fails, then they will be cancelled without any penalties.

NodeStatus

Node status type

NameNumberDescription
NODE_STATUS_UNSPECIFIED0
NODE_STATUS_VALIDATOR1The node is validating
NODE_STATUS_NON_VALIDATOR2The node is non-validating

Order.Status

Status values for an order

NameNumberDescription
STATUS_UNSPECIFIED0Default value, always invalid
STATUS_ACTIVE1Used for active unfilled or partially filled orders
STATUS_EXPIRED2Used for expired GTT orders
STATUS_CANCELLED3Used for orders cancelled by the party that created the order
STATUS_STOPPED4Used for unfilled FOK or IOC orders, and for orders that were stopped by the network
STATUS_FILLED5Used for closed fully filled orders
STATUS_REJECTED6Used for orders when not enough collateral was available to fill the margin requirements
STATUS_PARTIALLY_FILLED7Used for closed partially filled IOC orders
STATUS_PARKED8Order 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

NameNumberDescription
TIME_IN_FORCE_UNSPECIFIED0Default value for TimeInForce, can be valid for an amend
TIME_IN_FORCE_GTC1Good until cancelled, the order trades any amount and as much as possible and remains on the book until it either trades completely or is cancelled
TIME_IN_FORCE_GTT2Good until specified time, this order type trades any amount and as much as possible and remains on the book until it either trades completely, is cancelled, or expires at a set time NOTE: this may in future be multiple types or have sub types for orders that provide different ways of specifying expiry
TIME_IN_FORCE_IOC3Immediate or cancel, the order trades any amount and as much as possible but does not remain on the book (whether it trades or not)
TIME_IN_FORCE_FOK4Fill or kill, The order either trades completely (remainingSize == 0 after adding) or not at all, does not remain on the book if it doesn't trade
TIME_IN_FORCE_GFA5Good for auction, this order is only accepted during an auction period
TIME_IN_FORCE_GFN6Good for normal, this order is only accepted during normal trading (that can be continuous trading or frequent batched auctions)

Order.Type

Type values for an order

NameNumberDescription
TYPE_UNSPECIFIED0Default value, always invalid
TYPE_LIMIT1Used for Limit orders
TYPE_MARKET2Used for Market orders
TYPE_NETWORK3Used 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_UNSPECIFIED0Default value, no error reported
ORDER_ERROR_INVALID_MARKET_ID1Order was submitted for a market that does not exist
ORDER_ERROR_INVALID_ORDER_ID2Order was submitted with an invalid identifier
ORDER_ERROR_OUT_OF_SEQUENCE3Order was amended with a sequence number that was not previous version + 1
ORDER_ERROR_INVALID_REMAINING_SIZE4Order was amended with an invalid remaining size (e.g. remaining greater than total size)
ORDER_ERROR_TIME_FAILURE5Node was unable to get Vega (blockchain) time
ORDER_ERROR_REMOVAL_FAILURE6Failed to remove an order from the book
ORDER_ERROR_INVALID_EXPIRATION_DATETIME7An 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_REFERENCE8Order was submitted or amended with an invalid reference field
ORDER_ERROR_EDIT_NOT_ALLOWED9Order amend was submitted for an order field that cannot not be amended (e.g. order identifier)
ORDER_ERROR_AMEND_FAILURE10Amend failure because amend details do not match original order
ORDER_ERROR_NOT_FOUND11Order not found in an order book or store
ORDER_ERROR_INVALID_PARTY_ID12Order was submitted with an invalid or missing party identifier
ORDER_ERROR_MARKET_CLOSED13Order was submitted for a market that has closed
ORDER_ERROR_MARGIN_CHECK_FAILED14Order was submitted, but the party did not have enough collateral to cover the order
ORDER_ERROR_MISSING_GENERAL_ACCOUNT15Order was submitted, but the party did not have an account for this asset
ORDER_ERROR_INTERNAL_ERROR16Unspecified internal error
ORDER_ERROR_INVALID_SIZE17Order was submitted with an invalid or missing size (e.g. 0)
ORDER_ERROR_INVALID_PERSISTENCE18Order was submitted with an invalid persistence for its type
ORDER_ERROR_INVALID_TYPE19Order was submitted with an invalid type field
ORDER_ERROR_SELF_TRADING20Order was stopped as it would have traded with another order submitted from the same party
ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES21Order was submitted, but the party did not have enough collateral to cover the fees for the order
ORDER_ERROR_INCORRECT_MARKET_TYPE22Order was submitted with an incorrect or invalid market type
ORDER_ERROR_INVALID_TIME_IN_FORCE23Order was submitted with invalid time in force
ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION24A GFN order has got to the market when it is in auction mode
ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING25A GFA order has got to the market when it is in continuous trading mode
ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT26Attempt to amend order to GTT without ExpiryAt
ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT27Attempt to amend ExpiryAt to a value before CreatedAt
ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT28Attempt to amend to GTC without an ExpiryAt value
ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC29Amending to FOK or IOC is invalid
ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN30Amending to GFA or GFN is invalid
ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN31Amending from GFA or GFN is invalid
ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION32IOC orders are not allowed during auction
ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION33FOK orders are not allowed during auction
ORDER_ERROR_MUST_BE_LIMIT_ORDER34Pegged orders must be LIMIT orders
ORDER_ERROR_MUST_BE_GTT_OR_GTC35Pegged orders can only have TIF GTC or GTT
ORDER_ERROR_WITHOUT_REFERENCE_PRICE36Pegged order must have a reference price
ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE37Buy pegged order cannot reference best ask price
ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO40Pegged order offset must be >= 0
ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE41Sell pegged order cannot reference best bid price
ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO42Pegged order offset must be > zero
ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE43The 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_ORDER44Cannot amend details of a non pegged details
ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER45Could not re-price a pegged order because a market price is unavailable
ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER46It is not possible to amend the price of an existing pegged order
ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS47An 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_UNSPECIFIED0Default value for PeggedReference, no reference given
PEGGED_REFERENCE_MID1Mid price reference
PEGGED_REFERENCE_BEST_BID2Best bid price reference
PEGGED_REFERENCE_BEST_ASK3Best ask price reference

Side

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

NameNumberDescription
SIDE_UNSPECIFIED0Default value, always invalid
SIDE_BUY1Buy order
SIDE_SELL2Sell order

Trade.Type

Type values for a trade

NameNumberDescription
TYPE_UNSPECIFIED0Default value, always invalid
TYPE_DEFAULT1Normal trading between two parties
TYPE_NETWORK_CLOSE_OUT_GOOD2Trading 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_BAD3Trading 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_UNSPECIFIED0Default value, always invalid
TRANSFER_TYPE_LOSS1Loss
TRANSFER_TYPE_WIN2Win
TRANSFER_TYPE_CLOSE3Close
TRANSFER_TYPE_MTM_LOSS4Mark to market loss
TRANSFER_TYPE_MTM_WIN5Mark to market win
TRANSFER_TYPE_MARGIN_LOW6Margin too low
TRANSFER_TYPE_MARGIN_HIGH7Margin too high
TRANSFER_TYPE_MARGIN_CONFISCATED8Margin was confiscated
TRANSFER_TYPE_MAKER_FEE_PAY9Pay maker fee
TRANSFER_TYPE_MAKER_FEE_RECEIVE10Receive maker fee
TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY11Pay infrastructure fee
TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE12Receive infrastructure fee
TRANSFER_TYPE_LIQUIDITY_FEE_PAY13Pay liquidity fee
TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE14Receive liquidity fee
TRANSFER_TYPE_BOND_LOW15Bond too low
TRANSFER_TYPE_BOND_HIGH16Bond too high
TRANSFER_TYPE_WITHDRAW_LOCK17Lock amount for withdraw
TRANSFER_TYPE_WITHDRAW18Actual withdraw from system
TRANSFER_TYPE_DEPOSIT19Deposit funds
TRANSFER_TYPE_BOND_SLASHING20Bond slashing
TRANSFER_TYPE_STAKE_REWARD21Stake reward
TRANSFER_TYPE_TRANSFER_FUNDS_SEND22Transfer funds
TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE23Transfer funds

ValidatorNodeStatus

Validation status of the node

NameNumberDescription
VALIDATOR_NODE_STATUS_UNSPECIFIED0
VALIDATOR_NODE_STATUS_TENDERMINT1The node is a tendermint validator
VALIDATOR_NODE_STATUS_ERSATZ2The node is an ersatz validator
VALIDATOR_NODE_STATUS_PENDING3The node is a pending validator

Withdrawal.Status

The status of the withdrawal

NameNumberDescription
STATUS_UNSPECIFIED0Default value, always invalid
STATUS_OPEN1The withdrawal is open and being processed by the network
STATUS_REJECTED2The withdrawal have been cancelled
STATUS_FINALIZED3The 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